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:
@@ -287,8 +287,8 @@ namespace Framework.Constants
|
||||
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
|
||||
ModDisarmRanged = 278,
|
||||
InitializeImages = 279,
|
||||
ProvideSpellFocus = 280,
|
||||
ModGuildReputationGainPct = 281, // NYI
|
||||
ModArmorPenetrationPct = 280,
|
||||
ProvideSpellFocus = 281,
|
||||
ModBaseHealthPct = 282,
|
||||
ModHealingReceived = 283, // Possibly Only For Some Spell Family Class Spells
|
||||
Linked = 284,
|
||||
|
||||
@@ -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