Core/Spells: rework part 4: iterate over effects first

Implement far spell queue processing

# Conflicts:
#	src/server/game/Spells/Spell.cpp
This commit is contained in:
ariel- authored and Ovahlord committed 2022-09-12 09:15:13 +02:00
1 parent 3fbbea61bd
commit 4bb8c93df8
12 files changed
+765 -834

No files matched your search

@@ -629,29 +629,6 @@ class npc_pummeller : public CreatureScript
* XE-321 BOOMBOT
*
*///----------------------------------------------------
class BoomEvent : public BasicEvent
{
public:
BoomEvent(Creature* me) : _me(me)
{
}
bool Execute(uint64 /*time*/, uint32 /*diff*/) override
{
// This hack is here because we suspect our implementation of spell effect execution on targets
// is done in the wrong order. We suspect that EFFECT_0 needs to be applied on all targets,
// then EFFECT_1, etc - instead of applying each effect on target1, then target2, etc.
// The above situation causes the visual for this spell to be bugged, so we remove the instakill
// effect and implement a script hack for that.
_me->CastSpell(_me, SPELL_BOOM, false);
return true;
}
private:
Creature* _me;
};
class npc_boombot : public CreatureScript
{
public:
@@ -703,12 +680,7 @@ class npc_boombot : public CreatureScript
damage = 0;
// Visual only seems to work if the instant kill event is delayed or the spell itself is delayed
// Casting done from player and caster source has the same targetinfo flags,
// so that can't be the issue
// See BoomEvent class
// Schedule 1s delayed
me->m_Events.AddEvent(new BoomEvent(me), me->m_Events.CalculateTime(1*IN_MILLISECONDS));
DoCastAOE(SPELL_BOOM);
}
}