mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
fix(Scripts/ZulAman): Akil'zon storm damage should multiply per tick (#20842)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 43657;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(43657, 'spell_electrical_storm_proc');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user