aboutsummaryrefslogtreecommitdiff
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
parentfa505a22091c051a44535ed83fae2ea5a1c0048c (diff)
Scripts/Spells: Update Gordunni Trap spell script (#27437)
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
-rw-r--r--sql/updates/world/3.3.5/2021_12_23_02_world.sql3
-rw-r--r--src/server/scripts/Kalimdor/zone_feralas.cpp10
2 files changed, 8 insertions, 5 deletions
diff --git a/sql/updates/world/3.3.5/2021_12_23_02_world.sql b/sql/updates/world/3.3.5/2021_12_23_02_world.sql
new file mode 100644
index 00000000000..23b192c9643
--- /dev/null
+++ b/sql/updates/world/3.3.5/2021_12_23_02_world.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `spell_dbc` SET `RangeIndex`=12, `EffectImplicitTargetA1`=47, `EffectImplicitTargetA2`=47, `EffectRadiusIndex1`=15, `EffectRadiusIndex2`=15 WHERE `Id`=11756;
+UPDATE `spell_dbc` SET `RangeIndex`=12, `EffectImplicitTargetA1`=47, `EffectRadiusIndex1`=15 WHERE `Id`=19394;
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);
}
};