diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index 00b89811f..7fe19ee93 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -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, diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 2705e7778..c1abe64e7 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -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);