Implemented AuraType.ModMaxPower

This commit is contained in:
hondacrx
2017-11-22 12:44:25 -05:00
parent 88258e844d
commit 0909720464
4 changed files with 35 additions and 27 deletions
+14
View File
@@ -3587,6 +3587,20 @@ namespace Game.Spells
target.UpdateAttackPowerAndDamage(true);
}
[AuraEffectHandler(AuraType.ModMaxPower)]
void HandleAuraModMaxPower(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
return;
Unit target = aurApp.GetTarget();
PowerType power = (PowerType)GetMiscValue();
UnitMods unitMod = (UnitMods)(UnitMods.PowerStart + (int)power);
target.HandleStatModifier(unitMod, UnitModifierType.TotalValue, GetAmount(), apply);
}
/********************************/
/*** HEAL & ENERGIZE ***/
/********************************/