Core/Spells: Implemented using base weapon damage in spell attack power formulas

Port From (https://github.com/TrinityCore/TrinityCore/commit/dd21e7ff404aed1d449b09db2b7fcbe2be8536c3)
This commit is contained in:
hondacrx
2020-09-10 19:53:09 -04:00
parent c0e06c540c
commit 0c036ef4db
8 changed files with 67 additions and 35 deletions
+8 -2
View File
@@ -128,8 +128,14 @@ namespace Game.Entities
ApCoeffMod /= 100.0f;
}
WeaponAttackType attType = (spellProto.IsRangedWeaponSpell() && spellProto.DmgClass != SpellDmgClass.Melee) ? WeaponAttackType.RangedAttack : WeaponAttackType.BaseAttack;
float APbonus = victim.GetTotalAuraModifier(attType == WeaponAttackType.BaseAttack ? AuraType.MeleeAttackPowerAttackerBonus : AuraType.RangedAttackPowerAttackerBonus);
WeaponAttackType attType = WeaponAttackType.BaseAttack;
if ((spellProto.IsRangedWeaponSpell() && spellProto.DmgClass != SpellDmgClass.Melee))
attType = WeaponAttackType.RangedAttack;
if (spellProto.HasAttribute(SpellAttr3.ReqOffhand) && !spellProto.HasAttribute(SpellAttr3.MainHand))
attType = WeaponAttackType.OffAttack;
float APbonus = (float)(victim.GetTotalAuraModifier(attType != WeaponAttackType.RangedAttack ? AuraType.MeleeAttackPowerAttackerBonus : AuraType.RangedAttackPowerAttackerBonus));
APbonus += GetTotalAttackPowerValue(attType);
DoneTotal += (int)(stack * ApCoeffMod * APbonus);
}