aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_04_23_01_world_conditions.sql5
-rw-r--r--src/server/scripts/Spells/spell_item.cpp31
2 files changed, 36 insertions, 0 deletions
diff --git a/sql/updates/world/2012_04_23_01_world_conditions.sql b/sql/updates/world/2012_04_23_01_world_conditions.sql
new file mode 100644
index 00000000000..c731426aa3f
--- /dev/null
+++ b/sql/updates/world/2012_04_23_01_world_conditions.sql
@@ -0,0 +1,5 @@
+-- setup alternate conditions for spell 46488
+DELETE FROM `conditions` WHERE `SourceEntry` = 46488 AND `ElseGroup` = 1;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,46488,0,1,31,1,3,26817,0,0,0,'',''),
+(13,1,46488,0,1,36,1,0,0,0,1,0,'','');
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 73a77b06408..3c5d6438275 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -2021,6 +2021,37 @@ class spell_item_muisek_vessel : public SpellScriptLoader
}
};
+enum GreatmothersSoulcather
+{
+ SPELL_FORCE_CAST_SUMMON_GNOME_SOUL = 46486,
+};
+class spell_item_greatmothers_soulcatcher : public SpellScriptLoader
+{
+public:
+ spell_item_greatmothers_soulcatcher() : SpellScriptLoader("spell_item_greatmothers_soulcatcher") { }
+
+ class spell_item_greatmothers_soulcatcher_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_greatmothers_soulcatcher_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ GetCaster()->CastSpell(GetCaster(),SPELL_FORCE_CAST_SUMMON_GNOME_SOUL);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_greatmothers_soulcatcher_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_greatmothers_soulcatcher_SpellScript();
+ }
+};
+
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling