Core/Spells: SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT improvement
*Now it'll correctly increase\decrease % of power *Added helper function for modify power with percent ammount
This commit is contained in:
@@ -4003,8 +4003,18 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurAp
|
||||
// return;
|
||||
|
||||
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
|
||||
float amount = float(GetAmount());
|
||||
|
||||
target->HandleStatModifier(unitMod, TOTAL_PCT, float(GetAmount()), apply);
|
||||
if (apply)
|
||||
{
|
||||
target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
|
||||
target->ModifyPowerPct(powerType, amount, apply);
|
||||
}
|
||||
else
|
||||
{
|
||||
target->ModifyPowerPct(powerType, amount, apply);
|
||||
target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
|
||||
Reference in New Issue
Block a user