| | |
| | | curEquipAttrDict.Clear();
|
| | | itemEffectDict.Clear();
|
| | | _equipGSFormulaDict.Clear();
|
| | |
|
| | | try
|
| | | {
|
| | | if (tagChinModel.Effect1 != 0)
|
| | | itemEffectDict.Add(tagChinModel.Effect1, tagChinModel.EffectValueA1);
|
| | | {
|
| | | ConvertAttrId(tagChinModel.Effect1, tagChinModel.EffectValueA1, itemEffectDict);
|
| | | }
|
| | | if (tagChinModel.Effect2 != 0)
|
| | | itemEffectDict.Add(tagChinModel.Effect2, tagChinModel.EffectValueA2);
|
| | | {
|
| | | ConvertAttrId(tagChinModel.Effect2, tagChinModel.EffectValueA2, itemEffectDict);
|
| | | }
|
| | |
|
| | | if (tagChinModel.Effect3 != 0)
|
| | | itemEffectDict.Add(tagChinModel.Effect3, tagChinModel.EffectValueA3);
|
| | | {
|
| | | ConvertAttrId(tagChinModel.Effect3, tagChinModel.EffectValueA3, itemEffectDict);
|
| | | }
|
| | |
|
| | | if (tagChinModel.Effect4 != 0)
|
| | | itemEffectDict.Add(tagChinModel.Effect4, tagChinModel.EffectValueA4);
|
| | | {
|
| | | ConvertAttrId(tagChinModel.Effect4, tagChinModel.EffectValueA4, itemEffectDict);
|
| | | }
|
| | |
|
| | | if (tagChinModel.Effect5 != 0)
|
| | | itemEffectDict.Add(tagChinModel.Effect5, tagChinModel.EffectValueA5);
|
| | | {
|
| | | ConvertAttrId(tagChinModel.Effect5, tagChinModel.EffectValueA5, itemEffectDict);
|
| | | }
|
| | |
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private void ConvertAttrId(int attrId,int attrValue,Dictionary<int,int> keyValues)
|
| | | {
|
| | | switch((AttrEnum)attrId)
|
| | | {
|
| | | case AttrEnum.ATK:
|
| | | if(!keyValues.ContainsKey((int)AttrEnum.MinAtk))
|
| | | {
|
| | | keyValues.Add(((int)AttrEnum.MinAtk),attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | keyValues[(int)AttrEnum.MinAtk] += attrValue;
|
| | | }
|
| | |
|
| | | if (!keyValues.ContainsKey((int)AttrEnum.MaxAtk))
|
| | | {
|
| | | keyValues.Add(((int)AttrEnum.MaxAtk), attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | keyValues[(int)AttrEnum.MaxAtk] += attrValue;
|
| | | }
|
| | | break;
|
| | | default:
|
| | | if (!keyValues.ContainsKey(attrId))
|
| | | {
|
| | | keyValues.Add(attrId, attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | keyValues[attrId] += attrValue;
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 主界面物品弹框展示
|