Created
October 22, 2011 11:54
-
-
Save DDuarte/1305909 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum ChumTheWaterSummons | |
{ | |
SUMMON_ANGRY_KVALDIR = 66737, | |
SUMMON_NORTH_SEA_MAKO = 66738, | |
SUMMON_NORTH_SEA_THRESHER = 66739, | |
SUMMON_NORTH_SEA_BLUE_SHARK = 66740 | |
}; | |
class spell_q14112_14145_chum_the_water: public SpellScriptLoader | |
{ | |
public: | |
spell_q14112_14145_chum_the_water() : SpellScriptLoader("spell_q14112_14145_chum_the_water") { } | |
class spell_q14112_14145_chum_the_water_SpellScript : public SpellScript | |
{ | |
bool Validate(SpellInfo const* /*spellEntry*/) | |
{ | |
if (!sSpellMgr->GetSpellInfo(SUMMON_ANGRY_KVALDIR)) | |
return false; | |
if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_MAKO)) | |
return false; | |
if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_THRESHER)) | |
return false; | |
if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_BLUE_SHARK)) | |
return false; | |
return true; | |
} | |
void HandleScriptEffect(SpellEffIndex /*effIndex*/) | |
{ | |
Unit* caster = GetCaster(); | |
caster->CastSpell(caster, RAND(SUMMON_ANGRY_KVALDIR, SUMMON_NORTH_SEA_MAKO, SUMMON_NORTH_SEA_THRESHER, SUMMON_NORTH_SEA_BLUE_SHARK)); | |
} | |
void Register() | |
{ | |
OnEffectHitTarget += SpellEffectFn(spell_q14112_14145_chum_the_water_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); | |
} | |
}; | |
SpellScript* GetSpellScript() const | |
{ | |
return new spell_q14112_14145_chum_the_water_SpellScript(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment