Example #1
0
        public void OnLoadSkillSlotsData(ConfigData data)
        {
            ModifyItem modifyItem = new ModifyItem();

            if (modifyItem == null)
            {
                return;
            }

            modifyItem.m_DataID   = data.GetInt("DataID");
            modifyItem.m_ModifyID = data.GetInt("ModifyID");
            string valueName = data.GetString("ValueName");

            modifyItem.m_ValueID = SkillData.GetModifyValueID(valueName);
            modifyItem.m_IValue  = data.GetInt("IValue");
            modifyItem.m_FValue  = data.GetFloat("FValue");
            modifyItem.m_Precent = data.GetFloat("Precent");

            m_SkillSlotsModifyDict.AddModifyItem(modifyItem);

            SkillData skillData = GetData(modifyItem.m_DataID);

            if (skillData != null)
            {
                skillData.m_nSlotsMask |= modifyItem.m_ModifyID;

                SkillData baseSkill = GetData(skillData.MSV_BaseSkillID);
                if (baseSkill != null)
                {
                    baseSkill.m_nSlotsMask |= modifyItem.m_ModifyID;
                }
            }
        }
Example #2
0
        public void AddModifyItem(ModifyItem modifyItem)
        {
            ModifyData modifyData = null;

            if (!TryGetValue(modifyItem.m_DataID, out modifyData))
            {
                modifyData = new ModifyData();
                Add(modifyItem.m_DataID, modifyData);
            }
            modifyData.AddModifyItem(modifyItem);
        }
Example #3
0
        public void AddModifyItem(ModifyItem modifyItem)
        {
            ModifyList modifyList = null;

            if (!TryGetValue(modifyItem.m_ModifyID, out modifyList))
            {
                modifyList = new ModifyList();
                Add(modifyItem.m_ModifyID, modifyList);
            }
            modifyList.Add(modifyItem);
        }