aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
};