From 3171cd3fa9dbcec43f5d70b74ab2f54a2aa44173 Mon Sep 17 00:00:00 2001 From: ForesterDev <11771800+ForesterDev@users.noreply.github.com> Date: Sun, 7 Jun 2020 11:22:13 +0300 Subject: Core/AI: refactor SpellHit and SpellHitTarget. (#24691) * Core/AI: refactor SpellHit and SpellHitTarget. - now caster/target is WorldObject instead of Unit - remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget) - rename parameters in scripts according parent methods * Restore logic in Algalon script * Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2 * Fix build after merge (cherry picked from commit e3b232fe0e5c21a87d3fe71813e9d750259823f1) --- src/server/scripts/Outland/GruulsLair/boss_gruul.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/scripts/Outland/GruulsLair') diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index e8c4b6ab210..62340af1e3c 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -122,11 +122,11 @@ class boss_gruul : public CreatureScript Talk(SAY_DEATH); } - void SpellHitTarget(Unit* target, SpellInfo const* pSpell) override + void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override { //This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction //It's initially wrong, since this will cause fall damage, which is by comments, not intended. - if (pSpell->Id == SPELL_GROUND_SLAM) + if (spellInfo->Id == SPELL_GROUND_SLAM) { if (target->GetTypeId() == TYPEID_PLAYER) { @@ -146,7 +146,7 @@ class boss_gruul : public CreatureScript } //this part should be in the core - if (pSpell->Id == SPELL_SHATTER) + if (spellInfo->Id == SPELL_SHATTER) { /// @todo use eventmap to kill this stuff //clear this, if we are still performing -- cgit v1.2.3