static void CalcAllGemPropertys(Dictionary <EAttr, int> dict) { Dictionary <int, XItem> .Enumerator em = DataDBSDressGem.Dict.GetEnumerator(); while (em.MoveNext()) { int dressPos = em.Current.Key; int index = MLGem.Instance.GetIndexByDressGemPos(dressPos); if (!DataDBSDressEquip.ContainsKey(index)) { continue; } int instanceID = em.Current.Value.Instance; if (!DataDBSGem.ContainsKey(instanceID)) { continue; } XGem gem = DataDBSGem.GetDataById(instanceID); Dictionary <EAttr, int> .Enumerator em2 = GetPropertys(gem).GetEnumerator(); while (em2.MoveNext()) { dict[em2.Current.Key] += em2.Current.Value; } em2.Dispose(); } em.Dispose(); }
public static Dictionary <EAttr, int> GetAllGemPropertysByIndex(int index) { if (!DataDBSDressEquip.ContainsKey(index)) { return(New()); } Dictionary <EAttr, int> attrValues = New(); for (int i = 1; i <= 5; i++) { int gemPos = MLGem.Instance.GetDressGemPosByIndexAndTargetPos(index, i); XItem item = DataDBSDressGem.GetDataById(gemPos); if (item == null) { continue; } XGem gem = DataDBSGem.GetDataById(item.Instance); if (gem != null) { continue; } CalcGemStrenthLevel(attrValues, gem); } CalcMaxAttrValue(ref attrValues); return(attrValues); }