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:
Hondacrx
2024-11-17 13:11:53 -05:00
parent 447c222665
commit 83f5185fc3
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -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);