aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_item.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 2538f536ff6..cc7078b8f69 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -32,6 +32,7 @@
#include "Map.h"
#include "ObjectMgr.h"
#include "Player.h"
+#include "Random.h"
#include "ScriptedCreature.h"
#include "SkillDiscovery.h"
#include "Spell.h"
@@ -1727,6 +1728,21 @@ class spell_item_ultrasafe_transporter : public SpellScript
{
PrepareSpellScript(spell_item_ultrasafe_transporter);
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_TRANSPORTER_MALFUNCTION_SMALLER,
+ SPELL_TRANSPORTER_MALFUNCTION_BIGGER,
+ SPELL_SOUL_SPLIT_EVIL,
+ SPELL_SOUL_SPLIT_GOOD,
+ SPELL_TRANSFORM_HORDE,
+ SPELL_TRANSFORM_ALLIANCE,
+ SPELL_TRANSPORTER_MALFUNCTION_CHICKEN,
+ SPELL_EVIL_TWIN,
+ });
+ }
+
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
@@ -1766,6 +1782,8 @@ class spell_item_ultrasafe_transporter : public SpellScript
case 6:
spellId = SPELL_EVIL_TWIN;
break;
+ default:
+ break;
}
caster->CastSpell(caster, spellId, true);
@@ -1782,6 +1800,18 @@ class spell_item_dimensional_ripper_area52 : public SpellScript
{
PrepareSpellScript(spell_item_dimensional_ripper_area52);
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_TRANSPORTER_MALFUNCTION_BIGGER,
+ SPELL_SOUL_SPLIT_EVIL,
+ SPELL_SOUL_SPLIT_GOOD,
+ SPELL_TRANSFORM_HORDE,
+ SPELL_TRANSFORM_ALLIANCE
+ });
+ }
+
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
@@ -1812,6 +1842,8 @@ class spell_item_dimensional_ripper_area52 : public SpellScript
else
spellId = SPELL_TRANSFORM_ALLIANCE;
break;
+ default:
+ break;
}
caster->CastSpell(caster, spellId, true);