Core/Auras: Reimplement SPELL_AURA_MOD_ARMOR_PENETRATION_PCT, it is back from the dead
Port From (https://github.com/TrinityCore/TrinityCore/commit/11f6576f04688fb89d97e2bbe7ae97a8b6585415)
This commit is contained in:
@@ -3833,11 +3833,14 @@ namespace Game.Entities
|
||||
armor = (float)Math.Floor(MathFunctions.AddPct(ref armor, -eff.GetAmount()));
|
||||
}
|
||||
|
||||
// Apply Player CR_ARMOR_PENETRATION rating
|
||||
// Apply Player CR_ARMOR_PENETRATION rating and buffs from stances\specializations etc.
|
||||
if (attacker.IsPlayer())
|
||||
{
|
||||
float arpPct = attacker.ToPlayer().GetRatingBonusValue(CombatRating.ArmorPenetration);
|
||||
|
||||
Item weapon = attacker.ToPlayer().GetWeaponForAttack(attackType, true);
|
||||
arpPct += attacker.GetTotalAuraModifier(AuraType.ModArmorPenetrationPct, aurEff => aurEff.GetSpellInfo().IsItemFitToSpellRequirements(weapon));
|
||||
|
||||
// no more than 100%
|
||||
MathFunctions.RoundToInterval(ref arpPct, 0.0f, 100.0f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user