Core/Auras: reworked multiplicative AuraEffects calculation

This commit is contained in:
ariel- authored and Ovahlord committed 2021-11-28 12:14:05 +01:00
1 parent b1f16bceb0
commit af98e8516c
16 files changed
+868 -519

No files matched your search

@@ -885,26 +885,20 @@ public:
class spell_kelthuzad_chains_AuraScript : public AuraScript
{
void HandleApply(AuraEffect const* /*eff*/, AuraEffectHandleModes /*mode*/)
void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes mode)
{
Unit* target = GetTarget();
float scale = target->GetObjectScale();
ApplyPercentModFloatVar(scale, 200.0f, true);
target->SetObjectScale(scale);
aurEff->HandleAuraModScale(GetTargetApplication(), mode, true);
}
void HandleRemove(AuraEffect const* /*eff*/, AuraEffectHandleModes /*mode*/)
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes mode)
{
Unit* target = GetTarget();
float scale = target->GetObjectScale();
ApplyPercentModFloatVar(scale, 200.0f, false);
target->SetObjectScale(scale);
aurEff->HandleAuraModScale(GetTargetApplication(), mode, false);
}
void Register() override
{
AfterEffectApply.Register(&spell_kelthuzad_chains_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_kelthuzad_chains_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply.Register(&spell_kelthuzad_chains_AuraScript::HandleApply, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_kelthuzad_chains_AuraScript::HandleRemove, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
}
};