aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2021-12-23 02:08:46 +0200
committerGitHub <noreply@github.com>2021-12-23 02:08:46 +0200
commit9d6c4e3d931875008cd9ca15754b3edb1aef2a01 (patch)
treeddb86dcc1b6ca236c984fe0318fb0339cde34f76 /src
parentfa505a22091c051a44535ed83fae2ea5a1c0048c (diff)
Scripts/Spells: Update Gordunni Trap spell script (#27437)
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Kalimdor/zone_feralas.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp
index 0776e2be9c0..026104c70e4 100644
--- a/src/server/scripts/Kalimdor/zone_feralas.cpp
+++ b/src/server/scripts/Kalimdor/zone_feralas.cpp
@@ -16,8 +16,8 @@
*/
#include "ScriptMgr.h"
-#include "GameObject.h"
#include "SpellScript.h"
+#include "Unit.h"
enum GordunniTrapSpells
{
@@ -35,15 +35,15 @@ class spell_gordunni_trap : public SpellScript
return ValidateSpellInfo({ SPELL_GORDUNNI_DIRT_MOUND_CHEST, SPELL_GORDUNNI_DIRT_MOUND_JUNK });
}
- void HandleDummy()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- GameObject* caster = GetGObjCaster();
- caster->CastSpell(caster, urand(0, 1) ? SPELL_GORDUNNI_DIRT_MOUND_CHEST : SPELL_GORDUNNI_DIRT_MOUND_JUNK);
+ Unit* target = GetHitUnit();
+ target->CastSpell(target, urand(0, 1) ? SPELL_GORDUNNI_DIRT_MOUND_CHEST : SPELL_GORDUNNI_DIRT_MOUND_JUNK);
}
void Register() override
{
- OnCast += SpellCastFn(spell_gordunni_trap::HandleDummy);
+ OnEffectHitTarget += SpellEffectFn(spell_gordunni_trap::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};