mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Scripts/Spells: Update Gordunni Trap spell script (#27437)
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
3
sql/updates/world/3.3.5/2021_12_23_02_world.sql
Normal file
3
sql/updates/world/3.3.5/2021_12_23_02_world.sql
Normal file
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user