//更新圣物额外属性 public void UpdataHolyItemExAttr(GameClient client, sbyte sShenWu_slot) { Dictionary <sbyte, HolyItemData> holyitemdata = client.ClientData.MyHolyItemDataDic; if (null == holyitemdata) { return; } HolyItemData tmpdata = null; HolyItemPartData tmppartdata = null; int sMinSuit = (int)MAX_HOLY_PART_LEVEL; if (true == holyitemdata.TryGetValue(sShenWu_slot, out tmpdata)) { for (sbyte i = 1; i <= MAX_HOLY_PART_NUM; ++i) { if (true == tmpdata.m_PartArray.TryGetValue(i, out tmppartdata)) { if (sMinSuit > tmppartdata.m_sSuit) { sMinSuit = tmppartdata.m_sSuit; } } else { //存在有0阶情况直接跳 sMinSuit = 0; break; } } } else { //这个圣物不存在按0阶处理 sMinSuit = 0; } HolyInfo xmlData = null; int nDataID = HolyInfo.GetShengwuID((sbyte)sMinSuit, sShenWu_slot); if (true == _holyDataDic.TryGetValue(nDataID, out xmlData)) { for (int j = 0; j < xmlData.m_ExtraPropertyList.Count; ++j) { ProcessAction( client , xmlData.m_ExtraPropertyList[j].MagicActionID , xmlData.m_ExtraPropertyList[j].MagicActionParams , (int)PropsSystemTypes.HolyItem , sShenWu_slot , 100); //0 作为额外属性用 } } }
public void UpdataHolyItemExAttr(GameClient client, sbyte sShenWu_slot) { Dictionary <sbyte, HolyItemData> holyitemdata = client.ClientData.MyHolyItemDataDic; if (null != holyitemdata) { HolyItemData tmpdata = null; HolyItemPartData tmppartdata = null; int sMinSuit = (int)HolyItemManager.MAX_HOLY_PART_LEVEL; if (holyitemdata.TryGetValue(sShenWu_slot, out tmpdata)) { for (sbyte i = 1; i <= HolyItemManager.MAX_HOLY_PART_NUM; i += 1) { if (!tmpdata.m_PartArray.TryGetValue(i, out tmppartdata)) { sMinSuit = 0; break; } if (sMinSuit > (int)tmppartdata.m_sSuit) { sMinSuit = (int)tmppartdata.m_sSuit; } } } else { sMinSuit = 0; } HolyInfo xmlData = null; int nDataID = HolyInfo.GetShengwuID((sbyte)sMinSuit, sShenWu_slot); if (this._holyDataDic.TryGetValue(nDataID, out xmlData)) { for (int j = 0; j < xmlData.m_ExtraPropertyList.Count; j++) { this.ProcessAction(client, xmlData.m_ExtraPropertyList[j].MagicActionID, xmlData.m_ExtraPropertyList[j].MagicActionParams, 16, sShenWu_slot, 100); } } } }