Skip to content

Commit a6ffcd6

Browse files
committed
prepare merge
1 parent ebbd36f commit a6ffcd6

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

File renamed without changes.

src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
/*
1919
* Combat timers requires to be revisited
2020
* SAY_EVENT is NYI
21-
* For some reason Electrical Arc spells targets player instead of dest. Works fine outside of Zul'Aman
2221
*/
2322

2423
#include "ScriptMgr.h"
@@ -326,15 +325,9 @@ class spell_akilzon_electrical_overload : public SpellScript
326325

327326
if (SpellInfo const* triggeringSpellSpellInfo = GetTriggeringSpell())
328327
if (AuraEffect const* eff = GetCaster()->GetAuraEffect(triggeringSpellSpellInfo->Id, EFFECT_1))
329-
{
330-
/// !HACK: SPELL_ELECTRICAL_STORM_AURA sometimes fades before last tick, this causes last tick damage. Investigate this
331-
if (eff->GetTickNumber() == triggeringSpellSpellInfo->GetMaxTicks())
332-
return;
333-
334328
GetCaster()->CastSpell(nullptr, uint32(GetEffectInfo().TriggerSpell), CastSpellExtraArgs()
335329
.SetTriggerFlags(TRIGGERED_FULL_MASK)
336330
.AddSpellMod(SPELLVALUE_BASE_POINT0, int32(eff->GetTickNumber() * damageSpellSpellInfo->GetEffect(EFFECT_0).CalcValue())));
337-
}
338331
}
339332

340333
void Register() override
@@ -361,8 +354,12 @@ class spell_akilzon_electrical_storm : public SpellScript
361354
if (Creature* caster = GetCaster()->ToCreature())
362355
caster->AI()->Talk(EMOTE_STORM, target);
363356

364-
target->CastSpell(nullptr, SPELL_ELECTRICAL_STORM_AURA, true);
365-
target->CastSpell(nullptr, SPELL_TELEPORT_SELF, true);
357+
// this is a hack to ensure that DynamicObject granting SPELL_ELECTRICAL_STORM_AURA is only removed after damaging periodic fades
358+
target->m_Events.AddEventAtOffset([target]
359+
{
360+
target->CastSpell(nullptr, SPELL_ELECTRICAL_STORM_AURA, true);
361+
target->CastSpell(nullptr, SPELL_TELEPORT_SELF, true);
362+
}, 100ms);
366363
}
367364

368365
void Register() override

0 commit comments

Comments
 (0)