예제 #1
0
 public CEquipInfo(ushort equipID)
 {
     this.m_equipID          = equipID;
     this.m_resEquipInBattle = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((uint)equipID);
     if (this.m_resEquipInBattle != null)
     {
         this.m_equipName     = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szName);
         this.m_equipDesc     = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szDesc);
         this.m_equipIconPath = CUIUtility.s_Sprite_System_BattleEquip_Dir + StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szIcon);
         string text = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szActiveSkillDes);
         for (int i = 0; i < 3; i++)
         {
             this.m_equipBuffDescs[i] = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.astEffectCombine[i].szDesc);
         }
         this.m_requiredEquipIDs  = this.GetRequiredEquipIDs(this.m_resEquipInBattle);
         this.m_equipPropertyDesc = string.Empty;
         string equipPropertyValueDesc = this.GetEquipPropertyValueDesc(this.m_resEquipInBattle);
         if (!string.IsNullOrEmpty(equipPropertyValueDesc))
         {
             this.m_equipPropertyDesc = this.m_equipPropertyDesc + equipPropertyValueDesc + "\n";
         }
         string equipPassiveSkillDesc = this.GetEquipPassiveSkillDesc(this.m_resEquipInBattle);
         string equipPassiveEftDesc   = this.GetEquipPassiveEftDesc(this.m_resEquipInBattle);
         string text2 = equipPassiveSkillDesc + equipPassiveEftDesc;
         if (!string.IsNullOrEmpty(text2))
         {
             this.m_equipPropertyDesc += text2;
         }
         if (!string.IsNullOrEmpty(text))
         {
             this.m_equipPropertyDesc += text;
         }
     }
 }
예제 #2
0
 public void Refresh(stEquipInfo[] equipInfos)
 {
     if (equipInfos == null)
     {
         return;
     }
     this.Clear();
     for (int i = 0; i < equipInfos.Length; i++)
     {
         if (equipInfos[i].m_equipID != 0)
         {
             bool flag = false;
             for (int j = 0; j < this.m_existEquipInfoCount; j++)
             {
                 if (this.m_existEquipInfos[j].m_equipID == equipInfos[i].m_equipID)
                 {
                     flag = true;
                     stExistEquipInfo[] existEquipInfos = this.m_existEquipInfos;
                     int num = j;
                     existEquipInfos[num].m_amount = existEquipInfos[num].m_amount + equipInfos[i].m_amount;
                     break;
                 }
             }
             if (!flag)
             {
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_equipID = equipInfos[i].m_equipID;
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_amount  = equipInfos[i].m_amount;
                 ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((uint)equipInfos[i].m_equipID);
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_unitBuyPrice = ((dataByKey != null) ? dataByKey.dwBuyPrice : 0);
                 this.m_existEquipInfoCount++;
             }
         }
     }
 }
예제 #3
0
        private ushort[] GetRequiredEquipIDs(ResEquipInBattle resEquipInBattle)
        {
            string text = StringHelper.UTF8BytesToString(ref resEquipInBattle.szRequireEquip);

            if (!string.IsNullOrEmpty(text))
            {
                string[] array = text.Split(new char[]
                {
                    ','
                });
                ushort[] array2 = new ushort[array.Length];
                for (int i = 0; i < array.Length; i++)
                {
                    try
                    {
                        array2[i] = ushort.Parse(array[i].Trim());
                    }
                    catch (Exception)
                    {
                        array2[i] = 0;
                    }
                }
                return(array2);
            }
            return(null);
        }
예제 #4
0
 public void ValidateEquip()
 {
     stEquipInfo[] equips = this._heroInfo.actorHero.handle.EquipComponent.GetEquips();
     for (int i = 0; i < 6; i++)
     {
         Image  image   = this._equipIcons[i];
         ushort equipID = equips[i].m_equipID;
         bool   flag    = false;
         if (equipID > 0)
         {
             ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((uint)equipID);
             if (dataByKey != null)
             {
                 image.gameObject.CustomSetActive(true);
                 string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_System_BattleEquip_Dir, dataByKey.szIcon);
                 CUIUtility.SetImageSprite(image, prefabPath, Singleton <CBattleSystem> .GetInstance().WatchFormScript, true, false, false, false);
                 flag = true;
             }
         }
         if (!flag)
         {
             image.SetSprite(string.Format((this.listCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? "{0}EquipmentSpace" : "{0}EquipmentSpaceRed", CUIUtility.s_Sprite_Dynamic_Talent_Dir), Singleton <CBattleSystem> .GetInstance().WatchFormScript, true, false, false, false);
         }
     }
 }
예제 #5
0
 public void BuildEquipInBattle(ref ActorPreloadTab result)
 {
     Dictionary <long, object> .Enumerator enumerator = GameDataMgr.m_equipInBattleDatabin.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <long, object> current          = enumerator.get_Current();
         ResEquipInBattle            resEquipInBattle = current.get_Value() as ResEquipInBattle;
         if (resEquipInBattle != null)
         {
             string path = CUIUtility.s_Sprite_System_BattleEquip_Dir + StringHelper.UTF8BytesToString(ref resEquipInBattle.szIcon);
             result.AddSprite(path);
             if (resEquipInBattle.astEffectCombine != null && resEquipInBattle.astEffectCombine.Length > 0)
             {
                 for (int i = 0; i < resEquipInBattle.astEffectCombine.Length; i++)
                 {
                     uint dwID = resEquipInBattle.astEffectCombine[i].dwID;
                     this.AnalyseSkillCombine(ref result, (int)dwID);
                 }
             }
             if (resEquipInBattle.astPassiveSkill != null && resEquipInBattle.astPassiveSkill.Length > 0)
             {
                 for (int j = 0; j < resEquipInBattle.astPassiveSkill.Length; j++)
                 {
                     if (resEquipInBattle.astPassiveSkill[j].dwID > 0u)
                     {
                         this.AnalysePassiveSkill(ref result, (int)resEquipInBattle.astPassiveSkill[j].dwID);
                     }
                 }
             }
         }
     }
 }
예제 #6
0
        private void InitializeRecommendEquips()
        {
            DebugHelper.Assert(base.actor != null, "InitializeRecommendEquips with actor==null");
            ActorServerData        actorData         = new ActorServerData();
            IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider);

            if (actorDataProvider != null)
            {
                actorDataProvider.GetActorServerData(ref base.actor.TheActorMeta, ref actorData);
            }
            else
            {
                DebugHelper.Assert(false, "Failed Get gameActorDataProvider");
            }
            DebugHelper.Assert(actorData.m_customRecommendEquips != null, "actorServerData.m_customRecommendEquips==null");
            for (int i = 0; i < actorData.m_customRecommendEquips.Length; i++)
            {
                if (actorData.m_customRecommendEquips[i] != 0)
                {
                    ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((uint)actorData.m_customRecommendEquips[i]);
                    if ((dataByKey != null) && (dataByKey.bInvalid <= 0))
                    {
                        this.m_recommendEquipInfos.Add(new CRecommendEquipInfo(actorData.m_customRecommendEquips[i], dataByKey));
                    }
                }
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent <uint>("HeroRecommendEquipInit", base.actor.ObjID);
        }
예제 #7
0
 public void Refresh(stEquipInfo[] equipInfos)
 {
     if (equipInfos != null)
     {
         this.Clear();
         for (int i = 0; i < equipInfos.Length; i++)
         {
             if (equipInfos[i].m_equipID == 0)
             {
                 continue;
             }
             bool flag = false;
             for (int j = 0; j < this.m_existEquipInfoCount; j++)
             {
                 if (this.m_existEquipInfos[j].m_equipID == equipInfos[i].m_equipID)
                 {
                     flag = true;
                     this.m_existEquipInfos[j].m_amount += equipInfos[i].m_amount;
                     break;
                 }
             }
             if (!flag)
             {
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_equipID = equipInfos[i].m_equipID;
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_amount  = equipInfos[i].m_amount;
                 ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((int)equipInfos[i].m_equipID);
                 this.m_existEquipInfos[this.m_existEquipInfoCount].m_unitBuyPrice = (dataByKey == null) ? ((CrypticInt32)0) : ((CrypticInt32)dataByKey.dwBuyPrice);
                 this.m_existEquipInfoCount++;
             }
         }
     }
 }
예제 #8
0
        private string GetEquipPassiveSkillDesc(ResEquipInBattle resEquipInBattle)
        {
            if (resEquipInBattle == null)
            {
                return(string.Empty);
            }
            string str = string.Empty;

            for (int i = 0; i < resEquipInBattle.astPassiveSkill.Length; i++)
            {
                if (!string.IsNullOrEmpty(resEquipInBattle.astPassiveSkill[i].szDesc))
                {
                    str = str + resEquipInBattle.astPassiveSkill[i].szDesc + "\n";
                }
            }
            return(str);
        }
예제 #9
0
        private string GetEquipPassiveEftDesc(ResEquipInBattle resEquipInBattle)
        {
            if (resEquipInBattle == null)
            {
                return(string.Empty);
            }
            string text = string.Empty;

            for (int i = 0; i < resEquipInBattle.astEffectCombine.Length; i++)
            {
                if (!string.IsNullOrEmpty(resEquipInBattle.astEffectCombine[i].szDesc))
                {
                    text = text + resEquipInBattle.astEffectCombine[i].szDesc + "\n";
                }
            }
            return(text);
        }
예제 #10
0
        private string GetEquipPassiveEftDesc(ResEquipInBattle resEquipInBattle)
        {
            if (resEquipInBattle == null)
            {
                return(string.Empty);
            }
            string str = string.Empty;

            for (int i = 0; i < resEquipInBattle.astEffectCombine.Length; i++)
            {
                if (!string.IsNullOrEmpty(resEquipInBattle.astEffectCombine[i].szDesc))
                {
                    str = string.Format("{0}{1}\n", str, resEquipInBattle.astEffectCombine[i].szDesc);
                }
            }
            return(str);
        }
예제 #11
0
 public CEquipInfo(ushort equipID)
 {
     this.m_equipID          = equipID;
     this.m_resEquipInBattle = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((int)equipID);
     if (this.m_resEquipInBattle != null)
     {
         this.m_equipName     = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szName);
         this.m_equipDesc     = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szDesc);
         this.m_equipIconPath = CUIUtility.s_Sprite_System_BattleEquip_Dir + StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szIcon);
         for (int i = 0; i < 3; i++)
         {
             this.m_equipBuffDescs[i] = StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.astEffectCombine[i].szDesc);
         }
         this.m_requiredEquipIDs = this.GetRequiredEquipIDs(this.m_resEquipInBattle);
         string[] textArray1 = new string[] { this.GetEquipPropertyValueDesc(this.m_resEquipInBattle), "\n", StringHelper.UTF8BytesToString(ref this.m_resEquipInBattle.szPassiveSkillDes), "\n", this.GetEquipPassiveEftDesc(this.m_resEquipInBattle) };
         this.m_equipPropertyDesc = string.Concat(textArray1);
     }
 }
예제 #12
0
        private void InitializeRecommendEquips()
        {
            ActorServerData actorData = new ActorServerData();

            Singleton <ActorDataCenter> .GetInstance().GetActorDataProvider(GameActorDataProviderType.ServerDataProvider).GetActorServerData(ref base.actor.TheActorMeta, ref actorData);

            for (int i = 0; i < actorData.m_customRecommendEquips.Length; i++)
            {
                if (actorData.m_customRecommendEquips[i] != 0)
                {
                    ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((int)actorData.m_customRecommendEquips[i]);
                    if ((dataByKey != null) && (dataByKey.bInvalid <= 0))
                    {
                        this.m_recommendEquipInfos.Add(new CRecommendEquipInfo(actorData.m_customRecommendEquips[i], dataByKey));
                    }
                }
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent <uint>("HeroRecommendEquipInit", base.actor.ObjID);
        }
예제 #13
0
        private void RemoveEquipEffect(ushort equipID)
        {
            ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((int)equipID);

            if (dataByKey != null)
            {
                this.RemoveEquipPropertyValue(dataByKey);
                if (dataByKey.dwPassiveSkillID > 0)
                {
                    this.RemoveEquipPassiveSkill(equipID, dataByKey.dwPassiveSkillID, dataByKey.wUniquePassiveGroup);
                }
                for (int i = 0; i < dataByKey.astEffectCombine.Length; i++)
                {
                    if (dataByKey.astEffectCombine[i].dwID > 0)
                    {
                        this.RemoveEquipBuff(equipID, dataByKey.astEffectCombine[i].dwID, dataByKey.astEffectCombine[i].wUniquePassiveGroup);
                    }
                }
            }
        }
예제 #14
0
        private void AddEquipEffect(ushort equipID)
        {
            ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey((int)equipID);

            if (dataByKey != null)
            {
                this.AddEquipPropertyValue(dataByKey);
                if (dataByKey.dwPassiveSkillID > 0)
                {
                    this.AddEquipPassiveSkill(equipID, dataByKey.dwPassiveSkillID, dataByKey.wUniquePassiveGroup, (uint)dataByKey.dwBuyPrice, dataByKey.PassiveRmvSkillFuncId, s_equipEffectSequence++);
                }
                for (int i = 0; i < dataByKey.astEffectCombine.Length; i++)
                {
                    if (dataByKey.astEffectCombine[i].dwID > 0)
                    {
                        this.AddEquipBuff(equipID, dataByKey.astEffectCombine[i].dwID, dataByKey.astEffectCombine[i].wUniquePassiveGroup, (uint)dataByKey.dwBuyPrice, s_equipEffectSequence++);
                    }
                }
            }
        }
예제 #15
0
    private void BuildEquipActiveSkill(ref List <ActorPreloadTab> list)
    {
        int             count           = GameDataMgr.m_equipInBattleDatabin.count;
        ActorPreloadTab actorPreloadTab = new ActorPreloadTab();

        actorPreloadTab.ageActions    = new List <AssetLoadBase>();
        actorPreloadTab.parPrefabs    = new List <AssetLoadBase>();
        actorPreloadTab.mesPrefabs    = new List <AssetLoadBase>();
        actorPreloadTab.spritePrefabs = new List <AssetLoadBase>();
        actorPreloadTab.soundBanks    = new List <AssetLoadBase>();
        actorPreloadTab.behaviorXml   = new List <AssetLoadBase>();
        for (int i = 0; i < count; i++)
        {
            ResEquipInBattle dataByIndex = GameDataMgr.m_equipInBattleDatabin.GetDataByIndex(i);
            if (dataByIndex != null && dataByIndex.dwActiveSkillID > 0u)
            {
                this.AnalyseSkill(ref actorPreloadTab, (int)dataByIndex.dwActiveSkillID);
                list.Add(actorPreloadTab);
            }
        }
    }
예제 #16
0
    private void BuildEquipActiveSkill(ref List <ActorPreloadTab> list)
    {
        int             count    = GameDataMgr.m_equipInBattleDatabin.count;
        ActorPreloadTab loadInfo = new ActorPreloadTab {
            ageActions    = new List <AssetLoadBase>(),
            parPrefabs    = new List <AssetLoadBase>(),
            mesPrefabs    = new List <AssetLoadBase>(),
            spritePrefabs = new List <AssetLoadBase>(),
            soundBanks    = new List <AssetLoadBase>(),
            behaviorXml   = new List <AssetLoadBase>()
        };

        for (int i = 0; i < count; i++)
        {
            ResEquipInBattle dataByIndex = GameDataMgr.m_equipInBattleDatabin.GetDataByIndex(i);
            if ((dataByIndex != null) && (dataByIndex.dwActiveSkillID > 0))
            {
                this.AnalyseSkill(ref loadInfo, (int)dataByIndex.dwActiveSkillID);
                list.Add(loadInfo);
            }
        }
    }
예제 #17
0
        private ushort[] GetRequiredEquipIDs(ResEquipInBattle resEquipInBattle)
        {
            string str = StringHelper.UTF8BytesToString(ref resEquipInBattle.szRequireEquip);

            if (string.IsNullOrEmpty(str))
            {
                return(null);
            }
            char[]   separator = new char[] { ',' };
            string[] strArray  = str.Split(separator);
            ushort[] numArray  = new ushort[strArray.Length];
            for (int i = 0; i < strArray.Length; i++)
            {
                try
                {
                    numArray[i] = ushort.Parse(strArray[i].Trim());
                }
                catch (Exception)
                {
                    numArray[i] = 0;
                }
            }
            return(numArray);
        }
        private void AddDamageValue(ref HurtEventResultInfo prm)
        {
            PoolObjHandle <ActorRoot> atker   = prm.atker;
            SkillSlotType             atkSlot = prm.hurtInfo.atkSlot;
            int                 hurtTotal     = prm.hurtTotal;
            HurtTypeDef         hurtType      = prm.hurtInfo.hurtType;
            SKILL_USE_FROM_TYPE skillUseFrom  = prm.hurtInfo.SkillUseFrom;

            if (this.m_listDamageActorValue != null && atkSlot <= SkillSlotType.SLOT_SKILL_VALID && atker)
            {
                uint objID = atker.handle.ObjID;
                this.DeleteTimeoutDamageValue(objID, 0uL);
                DAMAGE_ACTOR_INFO dAMAGE_ACTOR_INFO;
                if (!this.m_listDamageActorValue.TryGetValue(objID, ref dAMAGE_ACTOR_INFO))
                {
                    dAMAGE_ACTOR_INFO           = default(DAMAGE_ACTOR_INFO);
                    dAMAGE_ACTOR_INFO.actorType = atker.handle.TheActorMeta.ActorType;
                    dAMAGE_ACTOR_INFO.actorName = atker.handle.name;
                    dAMAGE_ACTOR_INFO.ConfigId  = atker.handle.TheActorMeta.ConfigId;
                    if (dAMAGE_ACTOR_INFO.actorType == ActorTypeDef.Actor_Type_Monster)
                    {
                        MonsterWrapper monsterWrapper = atker.handle.AsMonster();
                        dAMAGE_ACTOR_INFO.bMonsterType = monsterWrapper.GetActorSubType();
                        dAMAGE_ACTOR_INFO.actorSubType = monsterWrapper.GetActorSubSoliderType();
                    }
                    Player player = Singleton <GamePlayerCenter> .instance.GetPlayer(atker.handle.TheActorMeta.PlayerId);

                    if (player != null)
                    {
                        dAMAGE_ACTOR_INFO.playerName = player.Name;
                    }
                    dAMAGE_ACTOR_INFO.listDamage = new SortedList <ulong, SKILL_SLOT_HURT_INFO[]>();
                    this.m_listDamageActorValue.Add(objID, dAMAGE_ACTOR_INFO);
                }
                ulong logicFrameTick = Singleton <FrameSynchr> .instance.LogicFrameTick;
                SKILL_SLOT_HURT_INFO[] array;
                if (!dAMAGE_ACTOR_INFO.listDamage.TryGetValue(logicFrameTick, ref array))
                {
                    array = new SKILL_SLOT_HURT_INFO[12];
                    dAMAGE_ACTOR_INFO.listDamage.Add(logicFrameTick, array);
                }
                if (array[(int)atkSlot].listHurtInfo == null)
                {
                    array[(int)atkSlot].listHurtInfo = new List <HURT_INFO>();
                }
                if (array[(int)atkSlot].listHurtInfo != null)
                {
                    string text    = null;
                    string strName = null;
                    if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL)
                    {
                        SkillSlot skillSlot;
                        if (atkSlot < SkillSlotType.SLOT_SKILL_COUNT && atker.handle.SkillControl != null && (atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero || atkSlot != SkillSlotType.SLOT_SKILL_0) && atker.handle.SkillControl.TryGetSkillSlot(atkSlot, out skillSlot) && skillSlot.SkillObj != null && skillSlot.SkillObj.cfgData != null)
                        {
                            if (!string.IsNullOrEmpty(skillSlot.SkillObj.IconName))
                            {
                                text = skillSlot.SkillObj.IconName;
                            }
                            if (!string.IsNullOrEmpty(skillSlot.SkillObj.cfgData.szSkillName))
                            {
                                strName = skillSlot.SkillObj.cfgData.szSkillName;
                            }
                        }
                    }
                    else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP)
                    {
                        uint             uiFromId  = prm.hurtInfo.uiFromId;
                        ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey(uiFromId);
                        if (dataByKey != null)
                        {
                            text    = dataByKey.szIcon;
                            strName = dataByKey.szName;
                        }
                    }
                    else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_AREATRIGGER)
                    {
                        uint uiFromId2 = prm.hurtInfo.uiFromId;
                        ResSkillCombineCfgInfo dataByKey2 = GameDataMgr.skillCombineDatabin.GetDataByKey(uiFromId2);
                        if (dataByKey2 != null)
                        {
                            text    = dataByKey2.szIconPath;
                            strName = dataByKey2.szSkillCombineName;
                        }
                    }
                    int count = array[(int)atkSlot].listHurtInfo.get_Count();
                    int i;
                    for (i = 0; i < count; i++)
                    {
                        if (array[(int)atkSlot].listHurtInfo.get_Item(i).strIconName == text)
                        {
                            HURT_INFO hURT_INFO;
                            array[(int)atkSlot].listHurtInfo.get_Item(i).iValue = hURT_INFO.iValue + hurtTotal;
                            break;
                        }
                    }
                    if (i >= count)
                    {
                        HURT_INFO hURT_INFO2 = new HURT_INFO(hurtType, text, strName, hurtTotal, skillUseFrom);
                        array[(int)atkSlot].listHurtInfo.Add(hURT_INFO2);
                    }
                }
                dAMAGE_ACTOR_INFO.listDamage.set_Item(logicFrameTick, array);
                this.m_listDamageActorValue.set_Item(objID, dAMAGE_ACTOR_INFO);
            }
        }
예제 #19
0
        private string GetEquipPropertyValueDesc(ResEquipInBattle resEquipInBattle)
        {
            if (resEquipInBattle == null)
            {
                return(string.Empty);
            }
            CTextManager instance = Singleton <CTextManager> .GetInstance();

            string str = string.Empty;

            if (resEquipInBattle.dwPhyAttack > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwPhyAttack, instance.GetText("Hero_Prop_PhyAtkPt"));
            }
            if (resEquipInBattle.dwAttackSpeed > 0)
            {
                str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwAttackSpeed / 100, instance.GetText("Hero_Prop_AtkSpd"));
            }
            if (resEquipInBattle.dwCriticalHit > 0)
            {
                str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwCriticalHit / 100, instance.GetText("Hero_Prop_CritRate"));
            }
            if (resEquipInBattle.dwHealthSteal > 0)
            {
                str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwHealthSteal / 100, instance.GetText("Hero_Prop_PhyVamp"));
            }
            if (resEquipInBattle.dwMagicAttack > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicAttack, instance.GetText("Hero_Prop_MgcAtkPt"));
            }
            if (resEquipInBattle.dwCDReduce > 0)
            {
                str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwCDReduce / 100, instance.GetText("Hero_Prop_CdReduce"));
            }
            if (resEquipInBattle.dwMagicPoint > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicPoint, instance.GetText("Hero_Prop_MaxEp"));
            }
            if (resEquipInBattle.dwMagicRecover > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicRecover, instance.GetText("Hero_Prop_EpRecover"));
            }
            if (resEquipInBattle.dwPhyDefence > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwPhyDefence, instance.GetText("Hero_Prop_PhyDefPt"));
            }
            if (resEquipInBattle.dwMagicDefence > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicDefence, instance.GetText("Hero_Prop_MgcDefPt"));
            }
            if (resEquipInBattle.dwHealthPoint > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwHealthPoint, instance.GetText("Hero_Prop_MaxHp"));
            }
            if (resEquipInBattle.dwHealthRecover > 0)
            {
                str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwHealthRecover, instance.GetText("Hero_Prop_HpRecover"));
            }
            if (resEquipInBattle.dwMoveSpeed > 0)
            {
                str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwMoveSpeed / 100, instance.GetText("Hero_Prop_MoveSpd"));
            }
            return(str);
        }
예제 #20
0
 public CRecommendEquipInfo(ushort equipID, ResEquipInBattle resEquipInBattle)
 {
     this.m_equipID          = equipID;
     this.m_resEquipInBattle = resEquipInBattle;
     this.m_hasBeenBought    = false;
 }
예제 #21
0
 private void AddEquipPropertyValue(ResEquipInBattle resEquipInBattle)
 {
     this.HandleEquipPropertyValue(resEquipInBattle, 1);
 }
예제 #22
0
 private void HandleEquipPropertyValue(ResEquipInBattle resEquipInBattle, int flag)
 {
     if (resEquipInBattle.dwPhyAttack > 0)
     {
         ValueDataInfo info1 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYATKPT];
         info1.addValue += (int)(resEquipInBattle.dwPhyAttack * flag);
     }
     if (resEquipInBattle.dwAttackSpeed > 0)
     {
         ValueDataInfo info2 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_ATKSPDADD];
         info2.addValue += (int)(resEquipInBattle.dwAttackSpeed * flag);
     }
     if (resEquipInBattle.dwCriticalHit > 0)
     {
         ValueDataInfo info3 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_CRITRATE];
         info3.addValue += (int)(resEquipInBattle.dwCriticalHit * flag);
     }
     if (resEquipInBattle.dwHealthSteal > 0)
     {
         ValueDataInfo info4 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYVAMP];
         info4.addValue += (int)(resEquipInBattle.dwHealthSteal * flag);
     }
     if (resEquipInBattle.dwMagicAttack > 0)
     {
         ValueDataInfo info5 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCATKPT];
         info5.addValue += (int)(resEquipInBattle.dwMagicAttack * flag);
     }
     if (resEquipInBattle.dwCDReduce > 0)
     {
         ValueDataInfo info6 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_CDREDUCE];
         info6.addValue += (int)(resEquipInBattle.dwCDReduce * flag);
     }
     if (base.actor.ValueComponent.IsEnergyType(ENERGY_TYPE.Magic))
     {
         if (resEquipInBattle.dwMagicPoint > 0)
         {
             VFactor       factor = new VFactor((long)base.actor.ValueComponent.actorEp, (long)base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_MAXEP].totalValue);
             ValueDataInfo info7  = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_MAXEP];
             info7.addValue += (int)(resEquipInBattle.dwMagicPoint * flag);
             if (((flag > 0) && !base.actor.ActorControl.IsDeadState) && (base.actor.ValueComponent.actorEp > 0))
             {
                 VFactor factor3 = factor * base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_MAXEP].totalValue;
                 base.actor.ValueComponent.actorEp = factor3.roundInt;
             }
         }
         if (resEquipInBattle.dwMagicRecover > 0)
         {
             ValueDataInfo info8 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_PROPERTY_EPRECOVER];
             info8.addValue += (int)(resEquipInBattle.dwMagicRecover * flag);
         }
     }
     if (resEquipInBattle.dwPhyDefence > 0)
     {
         ValueDataInfo info9 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYDEFPT];
         info9.addValue += (int)(resEquipInBattle.dwPhyDefence * flag);
     }
     if (resEquipInBattle.dwMagicDefence > 0)
     {
         ValueDataInfo info10 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCDEFPT];
         info10.addValue += (int)(resEquipInBattle.dwMagicDefence * flag);
     }
     if (resEquipInBattle.dwHealthPoint > 0)
     {
         VFactor       factor2 = new VFactor((long)base.actor.ValueComponent.actorHp, (long)base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP].totalValue);
         ValueDataInfo info11  = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP];
         info11.addValue += (int)(resEquipInBattle.dwHealthPoint * flag);
         if ((flag > 0) && !base.actor.ActorControl.IsDeadState)
         {
             VFactor factor4 = factor2 * base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MAXHP].totalValue;
             base.actor.ValueComponent.actorHp = factor4.roundInt;
         }
     }
     if (resEquipInBattle.dwHealthRecover > 0)
     {
         ValueDataInfo info12 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_HPRECOVER];
         info12.addValue += (int)(resEquipInBattle.dwHealthRecover * flag);
     }
     if (resEquipInBattle.dwMoveSpeed > 0)
     {
         ValueDataInfo info13 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MOVESPD];
         info13.addRatio += (int)(resEquipInBattle.dwMoveSpeed * flag);
     }
 }
예제 #23
0
 private void RemoveEquipPropertyValue(ResEquipInBattle resEquipInBattle)
 {
     this.HandleEquipPropertyValue(resEquipInBattle, -1);
 }