diff options
| author | Nay <dnpd.dd@gmail.com> | 2011-04-27 19:13:28 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-04-27 19:13:28 +0200 |
| commit | b0585f5e0d2c4319ec748a44226e68e01b8f4ae2 (patch) | |
| tree | 8fccd34cca8e465d9741fc59707707fbcf9d01d8 /src/server/scripts | |
| parent | 8568f19e5d08e5a6452e8d0fa518883b9868292e (diff) | |
Scripts/Items: Fixed Vanquished Clutches of Yogg-Saron
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 3ddd5af6ed1..a545d342699 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -963,6 +963,51 @@ class spell_item_map_of_the_geyser_fields : public SpellScriptLoader } }; +enum VanquishedClutchesSpells +{ + SPELL_CRUSHER = 64982, + SPELL_CONSTRICTOR = 64983, + SPELL_CORRUPTOR = 64984, +}; + +class spell_item_vanquished_clutches : public SpellScriptLoader +{ + public: + spell_item_vanquished_clutches() : SpellScriptLoader("spell_item_vanquished_clutches") { } + + class spell_item_vanquished_clutches_SpellScript : public SpellScript + { + PrepareSpellScript(spell_item_vanquished_clutches_SpellScript); + + bool Validate(SpellEntry const* /*spellEntry*/) + { + if (!sSpellStore.LookupEntry(SPELL_CRUSHER)) + return false; + if (!sSpellStore.LookupEntry(SPELL_CONSTRICTOR)) + return false; + if (!sSpellStore.LookupEntry(SPELL_CORRUPTOR)) + return false; + return true; + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + uint32 spellId = RAND(SPELL_CRUSHER, SPELL_CONSTRICTOR, SPELL_CORRUPTOR); + GetCaster()->CastSpell(GetCaster(), spellId, true); + } + + void Register() + { + OnEffect += SpellEffectFn(spell_gen_vanquished_clutches_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_item_vanquished_clutches_SpellScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -991,4 +1036,5 @@ void AddSC_item_spell_scripts() new spell_item_book_of_glyph_mastery(); new spell_item_gift_of_the_harvester(); new spell_item_map_of_the_geyser_fields(); + new spell_item_vanquished_clutches(); } |
