Core/Units: Implemented versatility

This commit is contained in:
hondacrx
2018-04-29 19:40:29 -04:00
parent 3d6c47336c
commit 9c33d9c20e
6 changed files with 96 additions and 4 deletions
+26
View File
@@ -3136,6 +3136,17 @@ namespace Game.Spells
target.ToPlayer().UpdateSpellDamageAndHealingBonus();
}
[AuraEffectHandler(AuraType.ModHealingDonePercent)]
void HandleModHealingDonePct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
return;
Player player = aurApp.GetTarget().ToPlayer();
if (player)
player.UpdateHealingDonePercentMod();
}
[AuraEffectHandler(AuraType.ModTotalStatPercentage)]
void HandleModTotalPercentStat(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
@@ -3286,6 +3297,21 @@ namespace Game.Spells
target.UpdateAttackPowerAndDamage(true);
}
[AuraEffectHandler(AuraType.ModVersatility)]
void HandleModVersatilityByPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
return;
Player target = aurApp.GetTarget().ToPlayer();
if (target)
{
target.SetStatFloatValue(PlayerFields.VersatilityBonus, target.GetTotalAuraModifier(AuraType.ModVersatility));
target.UpdateHealingDonePercentMod();
target.UpdateVersatilityDamageDone();
}
}
[AuraEffectHandler(AuraType.ModMaxPower)]
void HandleAuraModMaxPower(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{