fix(Scripts/ZulAman): Akil'zon storm damage should multiply per tick (#20842)
This commit is contained in:
parent
0d0e3a6ce1
commit
00c0e202ef
2 changed files with 27 additions and 0 deletions
|
|
@ -20,6 +20,8 @@
|
|||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Weather.h"
|
||||
|
|
@ -321,9 +323,30 @@ class spell_electrial_storm : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// 43657 - Electrical Storm
|
||||
class spell_electrical_storm_proc : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_electrical_storm_proc);
|
||||
|
||||
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_ELECTRICAL_STORM))
|
||||
{
|
||||
uint8 multiplier = aura->GetEffect(EFFECT_1)->GetTickNumber();
|
||||
SetHitDamage(GetHitDamage() * multiplier);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_electrical_storm_proc::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_akilzon()
|
||||
{
|
||||
RegisterZulAmanCreatureAI(boss_akilzon);
|
||||
RegisterZulAmanCreatureAI(npc_akilzon_eagle);
|
||||
RegisterSpellScript(spell_electrial_storm);
|
||||
RegisterSpellScript(spell_electrical_storm_proc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue