コード例 #1
0
 public void ResolveCombatEffects(AttackResult p_result, EEquipSlots p_attackHand, Monster p_target)
 {
     if (p_result.Result == EResultType.CRITICAL_HIT)
     {
         BaseItem itemAt = m_character.Equipment.GetItemAt(p_attackHand);
         List <SkillEffectStaticData> requiredSkillEffects = GetRequiredSkillEffects(itemAt);
         foreach (SkillEffectStaticData skillEffectStaticData in requiredSkillEffects)
         {
             if (skillEffectStaticData.Condition == ESkillEffectCondition.CRITICAL_HIT)
             {
                 if (skillEffectStaticData.Type == ESkillEffectType.STUN_MONSTER)
                 {
                     MonsterBuffMaceStun p_buff = (MonsterBuffMaceStun)BuffFactory.CreateMonsterBuff(EMonsterBuffType.MACE_STUN, 0f);
                     p_target.AddBuff(p_buff);
                     m_character.FightHandler.FeedActionLog(skillEffectStaticData);
                 }
             }
             else if (skillEffectStaticData.Condition == ESkillEffectCondition.FIRST_CRITICAL_HIT && skillEffectStaticData.Type == ESkillEffectType.APPLY_GASH && !m_criticalStrikeCounter.Contains(skillEffectStaticData.Type))
             {
                 MonsterBuffGash p_buff2 = (MonsterBuffGash)BuffFactory.CreateMonsterBuff(EMonsterBuffType.GASH, p_result.DamageDone);
                 p_target.AddBuff(p_buff2);
                 m_character.FightHandler.FeedActionLog(skillEffectStaticData);
                 m_criticalStrikeCounter.Add(skillEffectStaticData.Type);
             }
         }
     }
 }
コード例 #2
0
        public Boolean IsSkillRequirementFulfilled(Equipment p_equip, EEquipSlots p_slot)
        {
            Int32       requiredSkillID = GetRequiredSkillID(p_equip);
            ETier       p_skillTier     = GetRequiredSkillTier(p_equip);
            Int32       skillId         = 0;
            MeleeWeapon meleeWeapon     = p_equip as MeleeWeapon;

            if (meleeWeapon != null)
            {
                if (meleeWeapon.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND)
                {
                    if (meleeWeapon.GetWeaponType() != EEquipmentType.SPEAR)
                    {
                        skillId = 8;
                    }
                }
                else if (p_slot == EEquipSlots.OFF_HAND)
                {
                    skillId = 10;
                }
            }
            MagicFocus magicFocus = p_equip as MagicFocus;

            if (magicFocus != null && p_slot == EEquipSlots.OFF_HAND)
            {
                p_skillTier = ETier.MASTER;
            }
            return((requiredSkillID == 0 || HasRequiredSkillTier(requiredSkillID, p_skillTier)) && (skillId == 0 || HasRequiredSkillTier(skillId, ETier.NOVICE)));
        }
コード例 #3
0
 private void DecreaseDamageValuePenalty(FightValues p_fightValues, EEquipSlots p_slot, SkillEffectStaticData p_effect, Skill p_skill)
 {
     if (p_slot == EEquipSlots.OFF_HAND)
     {
         p_fightValues.DualWieldDamageBonus = ResolveValue(p_fightValues.DualWieldDamageBonus, p_effect, p_skill);
     }
 }
コード例 #4
0
        public Int32 GetAdditionalStrikeCount(EEquipSlots p_attackHand)
        {
            Int32    num    = 0;
            BaseItem itemAt = m_character.Equipment.GetItemAt(p_attackHand);
            List <SkillEffectStaticData> requiredSkillEffects = GetRequiredSkillEffects(itemAt);

            foreach (SkillEffectStaticData skillEffectStaticData in requiredSkillEffects)
            {
                if (skillEffectStaticData.Type == ESkillEffectType.ADDITIONAL_STRIKE)
                {
                    num++;
                }
            }
            if (p_attackHand == EEquipSlots.OFF_HAND && HasRequiredSkill(10))
            {
                Skill skill = FindSkill(10);
                foreach (SkillEffectStaticData skillEffectStaticData2 in skill.CurrentlyAvailableEffects)
                {
                    if (skillEffectStaticData2.Type == ESkillEffectType.ADDITIONAL_STRIKE)
                    {
                        num++;
                    }
                }
            }
            return(num);
        }
コード例 #5
0
        private void AddFightValues(FightValues p_fightValues, BaseItem p_equipment, EEquipSlots p_slot)
        {
            if (p_equipment is MagicFocus && p_slot == EEquipSlots.OFF_HAND && m_character.Equipment.GetItemAt(EEquipSlots.MAIN_HAND) is MagicFocus)
            {
                return;
            }
            Skill requiredSkill = GetRequiredSkill(p_equipment);

            if (requiredSkill != null && p_equipment is Equipment)
            {
                AddSkillEffects(p_fightValues, (Equipment)p_equipment, p_slot, requiredSkill);
            }
            MeleeWeapon meleeWeapon  = p_equipment as MeleeWeapon;
            MeleeWeapon meleeWeapon2 = m_character.Equipment.GetItemAt(EEquipSlots.MAIN_HAND) as MeleeWeapon;

            if (meleeWeapon2 != null && meleeWeapon != null && p_slot == EEquipSlots.OFF_HAND)
            {
                Skill skill = FindSkill(10);
                if (skill != null)
                {
                    AddSkillEffects(p_fightValues, meleeWeapon, p_slot, skill);
                }
            }
            if (meleeWeapon != null && meleeWeapon.GetSubType() == EEquipmentType.TWOHANDED)
            {
                Skill skill2 = FindSkill(8);
                if (skill2 != null)
                {
                    AddSkillEffects(p_fightValues, meleeWeapon, p_slot, skill2);
                }
            }
        }
コード例 #6
0
 public List <Attack> GetAdditionalStrikesFromResult(AttackResult p_result, EEquipSlots p_attackHand)
 {
     if (p_result.Result == EResultType.CRITICAL_HIT)
     {
         return(GetAdditionalStrikesFromCriticalHit(p_attackHand));
     }
     return(null);
 }
コード例 #7
0
        public Boolean AddItem(Equipment p_item)
        {
            EEquipSlots autoSlot = GetAutoSlot(p_item);

            if (autoSlot >= EEquipSlots.MAIN_HAND)
            {
                AddItem(p_item, autoSlot);
                p_item.PriceMultiplicator = LegacyLogic.Instance.WorldManager.ItemResellMultiplicator;
            }
            return(autoSlot >= EEquipSlots.MAIN_HAND);
        }
コード例 #8
0
        public void UpdateTwoHandedHighlight(EquipmentSlot p_hoveredSlot, DragHoverEventArgs p_eventArgs)
        {
            EEquipSlots eequipSlots = EEquipSlots.MAIN_HAND;

            if (p_hoveredSlot.Index == 0)
            {
                eequipSlots = EEquipSlots.OFF_HAND;
            }
            EquipmentSlot equipmentSlot = (EquipmentSlot)m_itemSlots[(Int32)eequipSlots];

            equipmentSlot.ForceDragHover(p_eventArgs);
        }
コード例 #9
0
        public Int32 SaveItem(EEquipSlots p_slot, Int32 p_counter, BaseItem p_item, SaveGameData p_data)
        {
            p_data.Set <Int32>("Slot" + p_counter, (Int32)p_slot);
            EDataType itemType = p_item.GetItemType();

            p_data.Set <Int32>("DataType" + p_counter, (Int32)itemType);
            if (itemType != EDataType.NONE)
            {
                SaveGameData saveGameData = new SaveGameData("Item" + p_counter);
                p_item.Save(saveGameData);
                p_data.Set <SaveGameData>(saveGameData.ID, saveGameData);
            }
            p_counter++;
            return(p_counter);
        }
コード例 #10
0
        public Int32 AddAdditionalStrikeSuffix(EEquipSlots p_slot)
        {
            Equipment equipment = (Equipment)m_character.Equipment.GetItemAt(p_slot);
            List <SuffixStaticData> suffixes = equipment.Suffixes;
            Int32 num = 0;

            foreach (SuffixStaticData suffixStaticData in suffixes)
            {
                if (suffixStaticData.Effect == ESuffixEffect.ADDITIONAL_STRIKE)
                {
                    num++;
                }
            }
            return(num);
        }
コード例 #11
0
        public Single GetArmorIgnoreValuePercent(EEquipSlots p_attackHand)
        {
            Single   num           = 0f;
            BaseItem itemAt        = m_character.Equipment.GetItemAt(p_attackHand);
            Skill    requiredSkill = GetRequiredSkill(itemAt);
            List <SkillEffectStaticData> requiredSkillEffects = GetRequiredSkillEffects(itemAt);

            foreach (SkillEffectStaticData skillEffectStaticData in requiredSkillEffects)
            {
                if (skillEffectStaticData.Type == ESkillEffectType.IGNORE_ARMOR_VALUE)
                {
                    num = ResolveValue(num, skillEffectStaticData, requiredSkill);
                }
            }
            return(num);
        }
コード例 #12
0
        public void ResolveCombatEffects(AttackResult p_result, EEquipSlots p_attackHand, Monster p_target, Boolean p_counterAttack)
        {
            m_attackResult  = p_result;
            m_target        = p_target;
            m_counterAttack = p_counterAttack;
            BaseItem itemAt = m_character.Equipment.GetItemAt(p_attackHand);

            if (itemAt != null)
            {
                ResolveCombatEffects(itemAt as Equipment);
            }
            ResolveCombatEffects(m_character.Equipment.GetItemAt(EEquipSlots.BODY) as Equipment);
            ResolveCombatEffects(m_character.Equipment.GetItemAt(EEquipSlots.FEET) as Equipment);
            ResolveCombatEffects(m_character.Equipment.GetItemAt(EEquipSlots.HEAD) as Equipment);
            ResolveCombatEffects(m_character.Equipment.GetItemAt(EEquipSlots.HANDS) as Equipment);
        }
コード例 #13
0
        private void IncreaseCriticalHitDestinyMultiplier(FightValues p_fightValues, EEquipSlots p_slot, SkillEffectStaticData p_effect, Skill p_skill)
        {
            Int32  destiny = m_character.CurrentAttributes.Destiny;
            Single num     = p_effect.Value * destiny;

            if (p_slot == EEquipSlots.OFF_HAND)
            {
                p_fightValues.OffHandCriticalHitDestinyMultiplier += num;
            }
            else if (p_slot == EEquipSlots.MAIN_HAND)
            {
                p_fightValues.MainHandCriticalHitDestinyMultiplier += num;
            }
            else if (p_slot == EEquipSlots.RANGE_WEAPON)
            {
                p_fightValues.RangedCriticalHitDestinyMultiplier += num;
            }
        }
コード例 #14
0
        public void AddItem(BaseItem p_item, EEquipSlots p_slot)
        {
            Equipment equipment = GetItemAt(p_slot) as Equipment;

            if (equipment != null && equipment.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND)
            {
                if (p_slot == EEquipSlots.MAIN_HAND)
                {
                    m_equipment.RemoveItemAt(1);
                }
                else if (p_slot == EEquipSlots.OFF_HAND)
                {
                    m_equipment.RemoveItemAt(0);
                }
            }
            Equipment equipment2 = p_item as Equipment;

            if (p_item != null)
            {
                p_item.PriceMultiplicator = LegacyLogic.Instance.WorldManager.ItemResellMultiplicator;
                if (equipment2.IsRelic() && !equipment2.IsTracked)
                {
                    equipment2.IsTracked = true;
                    LegacyLogic.Instance.TrackingManager.TrackRelicEquipped(equipment2, m_character);
                }
            }
            m_equipment.AddItem(p_item, (Int32)p_slot);
            if (p_item != null && equipment2.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND)
            {
                if (p_slot == EEquipSlots.MAIN_HAND)
                {
                    m_equipment.AddItem(p_item, 1);
                }
                else if (p_slot == EEquipSlots.OFF_HAND)
                {
                    m_equipment.AddItem(p_item, 0);
                }
            }
            LegacyLogic.Instance.EventManager.InvokeEvent(this, EEventType.INVENTORY_ITEM_REPAIR_STATUS_CHANGED, EventArgs.Empty);
            m_character.CalculateCurrentAttributes();
        }
コード例 #15
0
        private List <Attack> GetAdditionalStrikesFromCriticalHit(EEquipSlots p_attackHand)
        {
            List <Attack> list   = new List <Attack>();
            BaseItem      itemAt = m_character.Equipment.GetItemAt(p_attackHand);
            List <SkillEffectStaticData> requiredSkillEffects = GetRequiredSkillEffects(itemAt);

            foreach (SkillEffectStaticData skillEffectStaticData in requiredSkillEffects)
            {
                if (skillEffectStaticData.Condition == ESkillEffectCondition.FIRST_CRITICAL_HIT && skillEffectStaticData.Type == ESkillEffectType.ADDITIONAL_MAIN_HAND_STRIKE && !m_criticalStrikeCounter.Contains(skillEffectStaticData.Type))
                {
                    Attack meleeAttack = m_character.FightHandler.GetMeleeAttack(EEquipSlots.MAIN_HAND);
                    if (meleeAttack != null)
                    {
                        list.Add(meleeAttack);
                        m_character.FightHandler.FeedActionLog(skillEffectStaticData);
                    }
                    m_criticalStrikeCounter.Add(skillEffectStaticData.Type);
                    return(list);
                }
            }
            return(list);
        }
コード例 #16
0
        public void AddExtraDamageFromSuffix(Attack p_mainAttack, EEquipSlots p_slot, Monster m_monster)
        {
            Equipment equipment = (Equipment)m_character.Equipment.GetItemAt(p_slot);
            List <SuffixStaticData> suffixes = equipment.Suffixes;

            foreach (SuffixStaticData suffixStaticData in suffixes)
            {
                if ((suffixStaticData.Effect == ESuffixEffect.ADDITIONAL_DAMAGE_UNDEAD && m_monster.StaticData.Class == EMonsterClass.UNDEAD) || (suffixStaticData.Effect == ESuffixEffect.ADDITIONAL_DAMAGE_ELEMENTALS && m_monster.StaticData.Class == EMonsterClass.ELEMENTAL))
                {
                    for (Int32 i = 0; i < p_mainAttack.Damages.Count; i++)
                    {
                        Damage item = p_mainAttack.Damages[i];
                        p_mainAttack.Damages.RemoveAt(i);
                        item.Value += (Int32)Math.Round(item.Value * suffixStaticData.GetValueForLevel(equipment.SuffixLevel, equipment.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND), MidpointRounding.AwayFromZero);
                        p_mainAttack.Damages.Insert(i, item);
                    }
                }
                if (suffixStaticData.Effect == ESuffixEffect.ADDITIONAL_DAMAGE_DEMON)
                {
                    for (Int32 j = 0; j < m_monster.StaticData.Abilities.Length; j++)
                    {
                        if (m_monster.StaticData.Abilities[j].AbilityType == EMonsterAbilityType.DEMONIC_LINEAGE)
                        {
                            for (Int32 k = 0; k < p_mainAttack.Damages.Count; k++)
                            {
                                Damage item2 = p_mainAttack.Damages[k];
                                p_mainAttack.Damages.RemoveAt(k);
                                item2.Value += (Int32)Math.Round(item2.Value * suffixStaticData.GetValueForLevel(equipment.SuffixLevel, equipment.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND), MidpointRounding.AwayFromZero);
                                p_mainAttack.Damages.Insert(k, item2);
                            }
                            break;
                        }
                    }
                }
            }
        }
コード例 #17
0
        public void AddElementalDamage(PrefixStaticData p_prefix, Int32 p_level, EEquipSlots p_attackHand)
        {
            EDamageType school = p_prefix.School;
            Int32       num    = (Int32)Math.Round(p_prefix.GetValueForLevel(p_level), MidpointRounding.AwayFromZero);

            if (p_attackHand == EEquipSlots.MAIN_HAND)
            {
                DamageData damageData = m_fightValues.MainHandDamage[school];
                DamageData value      = new DamageData(school, damageData.Minimum + num, damageData.Maximum + num);
                m_fightValues.MainHandDamage[school] = value;
            }
            else if (p_attackHand == EEquipSlots.OFF_HAND)
            {
                DamageData damageData2 = m_fightValues.OffHandDamage[school];
                DamageData value2      = new DamageData(school, damageData2.Minimum + num, damageData2.Maximum + num);
                m_fightValues.OffHandDamage[school] = value2;
            }
            else if (p_attackHand == EEquipSlots.RANGE_WEAPON)
            {
                DamageData damageData3 = m_fightValues.RangeDamage[school];
                DamageData value3      = new DamageData(school, damageData3.Minimum + num, damageData3.Maximum + num);
                m_fightValues.RangeDamage[school] = value3;
            }
        }
コード例 #18
0
 private void IncreaseDamageSkillBonus(FightValues p_fightValues, SkillEffectStaticData p_effect, Skill p_skill, EEquipSlots p_slot)
 {
     if (p_effect.Condition == ESkillEffectCondition.IS_EQUIPED)
     {
         if (p_slot == EEquipSlots.MAIN_HAND)
         {
             p_fightValues.MainHandSkillLevelBonus = ResolveValue(p_fightValues.MainHandSkillLevelBonus, p_effect, p_skill);
         }
         else if (p_slot == EEquipSlots.OFF_HAND)
         {
             p_fightValues.OffHandSkillLevelBonus = ResolveValue(p_fightValues.OffHandSkillLevelBonus, p_effect, p_skill);
         }
         else if (p_slot == EEquipSlots.RANGE_WEAPON)
         {
             p_fightValues.RangedSkillLevelBonus = ResolveValue(p_fightValues.RangedSkillLevelBonus, p_effect, p_skill);
         }
     }
 }
コード例 #19
0
 public void RemoveItemAt(EEquipSlots p_slot)
 {
     AddItem(null, p_slot);
 }
コード例 #20
0
 public BaseItem GetItemAt(EEquipSlots p_slotType)
 {
     return(m_equipment.GetItemAt((Int32)p_slotType));
 }
コード例 #21
0
        private void AddSkillEffects(FightValues p_fightValues, Equipment p_equipment, EEquipSlots p_slot, Skill p_skill)
        {
            List <SkillEffectStaticData> currentlyAvailableEffects = p_skill.CurrentlyAvailableEffects;

            foreach (SkillEffectStaticData skillEffectStaticData in currentlyAvailableEffects)
            {
                ESkillEffectType type = skillEffectStaticData.Type;
                switch (type)
                {
                case ESkillEffectType.INCREASE_ATTACK_VALUE:
                    IncreaseAttackValue(p_fightValues, skillEffectStaticData, p_skill, p_slot);
                    break;

                case ESkillEffectType.INCREASE_DAMAGE_FACTOR:
                    IncreaseDamageFactor(p_fightValues, skillEffectStaticData, p_skill, p_slot);
                    break;

                case ESkillEffectType.INCREASE_DAMAGE_SKILL_BONUS:
                    IncreaseDamageSkillBonus(p_fightValues, skillEffectStaticData, p_skill, p_slot);
                    break;

                default:
                    if (type == ESkillEffectType.INCREASE_ARMOR_VALUE)
                    {
                        IncreaseArmorValue(p_fightValues, skillEffectStaticData, p_skill);
                    }
                    break;

                case ESkillEffectType.INCREASE_CRITICAL_HIT_CHANCE:
                    IncreaseCriticalHitChances(p_fightValues, skillEffectStaticData, p_skill, p_slot);
                    break;

                case ESkillEffectType.INCREASE_CRITICAL_DAMAGE:
                    IncreaseCriticalDamageFactor(p_fightValues, skillEffectStaticData, p_skill, p_slot);
                    break;

                case ESkillEffectType.INCREASE_CRITICAL_MAGIC_DAMAGE:
                    IncreaseCriticalMagicDamageFactor(p_fightValues, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.INCREASE_CRITICAL_MAGIC_HIT_CHANCE:
                    IncreaseMagicalCriticalHitChances(p_fightValues, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.ADDITIONAL_BLOCK_ATTEMPT:
                    IncreaseBlockAttempts(p_fightValues, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.ADDITIONAL_MELEE_BLOCK_ATTEMPT:
                    IncreaseMeleeBlockAttempts(p_fightValues, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.INCREASE_CRITICAL_HIT_DESTINY_MULTIPLIER:
                    IncreaseCriticalHitDestinyMultiplier(p_fightValues, p_slot, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.DECREASE_DAMAGE_PENALTY:
                    DecreaseDamageValuePenalty(p_fightValues, p_slot, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.DECREASE_ATTACK_VALUE_PENALTY:
                    DecreaseAttackValuePenalty(p_fightValues, skillEffectStaticData, p_skill);
                    break;

                case ESkillEffectType.INCREASE_BLOCK_CHANCE:
                    IncreaseBlockChance(p_fightValues, skillEffectStaticData, p_skill);
                    break;
                }
            }
        }
コード例 #22
0
 private void IncreaseCriticalHitChances(FightValues p_fightValues, SkillEffectStaticData p_effect, Skill p_skill, EEquipSlots p_slot)
 {
     if (p_effect.Condition == ESkillEffectCondition.FOR_EACH_EQUIPMENT)
     {
         p_fightValues.CriticalMainHandHitChance = ResolveValue(p_fightValues.CriticalMainHandHitChance, p_effect, p_skill);
         p_fightValues.CriticalOffHandHitChance  = ResolveValue(p_fightValues.CriticalOffHandHitChance, p_effect, p_skill);
     }
     else if (p_slot == EEquipSlots.RANGE_WEAPON)
     {
         p_fightValues.CriticalRangeHitChance = ResolveValue(p_fightValues.CriticalRangeHitChance, p_effect, p_skill);
     }
     else if (p_slot == EEquipSlots.MAIN_HAND)
     {
         p_fightValues.CriticalMainHandHitChance = ResolveValue(p_fightValues.CriticalMainHandHitChance, p_effect, p_skill);
     }
     else if (p_slot == EEquipSlots.OFF_HAND)
     {
         p_fightValues.CriticalOffHandHitChance = ResolveValue(p_fightValues.CriticalOffHandHitChance, p_effect, p_skill);
     }
 }
コード例 #23
0
 private void IncreaseCriticalDamageFactor(FightValues p_fightValues, SkillEffectStaticData p_effect, Skill p_skill, EEquipSlots p_slot)
 {
     if (p_effect.Condition == ESkillEffectCondition.IS_EQUIPED)
     {
         if (p_slot == EEquipSlots.RANGE_WEAPON)
         {
             p_fightValues.RangeCriticalDamageMod = ResolveValue(p_fightValues.RangeCriticalDamageMod, p_effect, p_skill);
         }
         else if (p_slot == EEquipSlots.MAIN_HAND)
         {
             p_fightValues.MainHandCriticalDamageMod = ResolveValue(p_fightValues.MainHandCriticalDamageMod, p_effect, p_skill);
         }
         else if (p_slot == EEquipSlots.OFF_HAND)
         {
             p_fightValues.OffHandCriticalDamageMod = ResolveValue(p_fightValues.OffHandCriticalDamageMod, p_effect, p_skill);
         }
     }
 }
コード例 #24
0
        public void ResolveFightValueEffects(EEquipSlots p_equipSlot, Equipment p_equip, FightValues p_fightValues)
        {
            m_fightValues = p_fightValues;
            Int32 prefixLevel = p_equip.PrefixLevel;
            List <PrefixStaticData> prefixes = p_equip.Prefixes;

            foreach (PrefixStaticData prefixStaticData in prefixes)
            {
                if (prefixStaticData.Effect == EPrefixEffect.INCREASE_ELEMENTAL_PROTECTION)
                {
                    IncreaseElementalProtection(prefixStaticData, prefixLevel);
                }
                else if (prefixStaticData.Effect == EPrefixEffect.ADD_ELEMENTAL_DAMAGE)
                {
                    AddElementalDamage(prefixStaticData, prefixLevel, p_equipSlot);
                }
            }
            Int32 suffixLevel = p_equip.SuffixLevel;
            List <SuffixStaticData> suffixes = p_equip.Suffixes;

            foreach (SuffixStaticData suffixStaticData in suffixes)
            {
                ESuffixEffect effect = suffixStaticData.Effect;
                switch (effect)
                {
                case ESuffixEffect.INCREASE_MELEE_ATTACK_VALUE:
                    if (p_equipSlot == EEquipSlots.OFF_HAND)
                    {
                        m_fightValues.OffHandAttackValue += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    }
                    else
                    {
                        m_fightValues.MainHandAttackValue += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    }
                    break;

                case ESuffixEffect.INCREASE_RANGE_ATTACK_VALUE:
                    m_fightValues.RangedAttackValue += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    break;

                default:
                    switch (effect)
                    {
                    case ESuffixEffect.PROTECTION_AGAINST_PARALYZED:
                        m_fightValues.ConditionProtectionParalysis += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_SLEEPING:
                        m_fightValues.ConditionProtectionSleep += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_POISONED:
                        m_fightValues.ConditionProtectionPoison += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_CONFUSED:
                        m_fightValues.ConditionProtectionConfusion += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_WEAK:
                        m_fightValues.ConditionProtectionWeakness += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_CURSED:
                        m_fightValues.ConditionProtectionCurses += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;

                    case ESuffixEffect.PROTECTION_AGAINST_KNOCKOUT:
                        m_fightValues.ConditionProtectionKnockOut += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                        break;
                    }
                    break;

                case ESuffixEffect.INCREASE_CRITICAL_HIT_CHANCE:
                    if (p_equipSlot == EEquipSlots.OFF_HAND)
                    {
                        m_fightValues.CriticalOffHandHitChance += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    else if (p_equipSlot == EEquipSlots.RANGE_WEAPON)
                    {
                        m_fightValues.CriticalRangeHitChance += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    else
                    {
                        m_fightValues.CriticalMainHandHitChance += suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    break;

                case ESuffixEffect.INCREASE_CRITICAL_DAMAGE:
                    if (p_equipSlot == EEquipSlots.OFF_HAND)
                    {
                        m_fightValues.OffHandCriticalDamageMod += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    else if (p_equipSlot == EEquipSlots.RANGE_WEAPON)
                    {
                        m_fightValues.RangeCriticalDamageMod += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    else
                    {
                        m_fightValues.MainHandCriticalDamageMod += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND) / 100f;
                    }
                    break;

                case ESuffixEffect.INCREASE_EVADE_VALUE:
                    m_fightValues.EvadeValue += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    break;

                case ESuffixEffect.INCREASE_ARMOR_VALUE:
                    m_fightValues.ArmorValue += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    break;

                case ESuffixEffect.INCREASE_MELEE_BLOCK_ATTEMPTS:
                    m_fightValues.MeleeBlockAttempts += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    break;

                case ESuffixEffect.INCREASE_GENERAL_BLOCK_ATTEMPTS:
                    m_fightValues.GeneralBlockAttempts += (Int32)suffixStaticData.GetValueForLevel(suffixLevel, p_equip.ItemSlot == EItemSlot.ITEM_SLOT_2_HAND);
                    break;
                }
            }
        }
コード例 #25
0
 private void IncreaseAttackValue(FightValues p_fightValues, SkillEffectStaticData p_effect, Skill p_skill, EEquipSlots p_slot)
 {
     if (p_slot == EEquipSlots.MAIN_HAND)
     {
         p_fightValues.MainHandAttackValue = ResolveValue(p_fightValues.MainHandAttackValue, p_effect, p_skill);
     }
     else if (p_slot == EEquipSlots.OFF_HAND)
     {
         p_fightValues.OffHandAttackValue = ResolveValue(p_fightValues.OffHandAttackValue, p_effect, p_skill);
     }
     else if (p_slot == EEquipSlots.RANGE_WEAPON)
     {
         p_fightValues.RangedAttackValue = ResolveValue(p_fightValues.RangedAttackValue, p_effect, p_skill);
     }
 }