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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user