Core/Auras: Implement SPELL_AURA_MOD_BONUS_ARMOR_PCT and rename HandleModStatBonusArmor
Port From (https://github.com/TrinityCore/TrinityCore/commit/6e9a6700d83f0ad07c7c56becfc3a62434707208)
This commit is contained in:
@@ -1362,6 +1362,7 @@ namespace Game.Entities
|
||||
|
||||
value += GetFlatModifierValue(unitMod, UnitModifierFlatType.Total); // bonus armor from auras and items
|
||||
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Total);
|
||||
value *= GetTotalAuraMultiplier(AuraType.ModBonusArmorPct);
|
||||
|
||||
SetArmor((int)value, (int)(value - baseValue));
|
||||
|
||||
|
||||
@@ -3225,7 +3225,7 @@ namespace Game.Spells
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModBonusArmor)]
|
||||
void HandleModStatBonusArmor(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
void HandleModBonusArmor(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
|
||||
return;
|
||||
@@ -3233,6 +3233,15 @@ namespace Game.Spells
|
||||
aurApp.GetTarget().HandleStatFlatModifier(UnitMods.Armor, UnitModifierFlatType.Base, GetAmount(), apply);
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModBonusArmorPct)]
|
||||
void HandleModBonusArmorPercent(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
|
||||
return;
|
||||
|
||||
aurApp.GetTarget().UpdateArmor();
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModStatBonusPct)]
|
||||
void HandleModStatBonusPercent(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user