* Converted hunter spell scripts to the new format (mostly for example purposes for the rest of the team).
--HG-- branch : trunk
This commit is contained in:
@@ -34,8 +34,17 @@ enum HunterSpells
|
|||||||
HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED = 54045,
|
HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED = 54045,
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_hun_last_stand_pet_SpellScript : public SpellScript
|
class spell_hun_last_stand_pet : public SpellHandlerScript
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
spell_hun_last_stand_pet()
|
||||||
|
: SpellHandlerScript("spell_hun_last_stand_pet")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class spell_hun_last_stand_pet_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
bool Validate(SpellEntry const * spellEntry)
|
bool Validate(SpellEntry const * spellEntry)
|
||||||
{
|
{
|
||||||
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
|
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
|
||||||
@@ -55,15 +64,25 @@ class spell_hun_last_stand_pet_SpellScript : public SpellScript
|
|||||||
// add dummy effect spell handler to pet's Last Stand
|
// add dummy effect spell handler to pet's Last Stand
|
||||||
EffectHandlers += EffectHandlerFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
EffectHandlers += EffectHandlerFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_hun_last_stand_pet_SpellScript();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript * GetSpellScript_spell_hun_last_stand_pet()
|
class spell_hun_masters_call : public SpellHandlerScript
|
||||||
{
|
{
|
||||||
return new spell_hun_last_stand_pet_SpellScript();
|
public:
|
||||||
}
|
|
||||||
|
|
||||||
class spell_hun_masters_call_SpellScript : public SpellScript
|
spell_hun_masters_call()
|
||||||
{
|
: SpellHandlerScript("spell_hun_masters_call")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class spell_hun_masters_call_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
void HandleDummy(SpellEffIndex effIndex)
|
void HandleDummy(SpellEffIndex effIndex)
|
||||||
{
|
{
|
||||||
Unit *caster = GetCaster();
|
Unit *caster = GetCaster();
|
||||||
@@ -82,15 +101,25 @@ class spell_hun_masters_call_SpellScript : public SpellScript
|
|||||||
// add dummy effect spell handler to Master's Call
|
// add dummy effect spell handler to Master's Call
|
||||||
EffectHandlers += EffectHandlerFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
EffectHandlers += EffectHandlerFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_hun_masters_call_SpellScript();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript * GetSpellScript_spell_hun_masters_call()
|
class spell_hun_readiness : public SpellHandlerScript
|
||||||
{
|
{
|
||||||
return new spell_hun_masters_call_SpellScript();
|
public:
|
||||||
}
|
|
||||||
|
|
||||||
class spell_hun_readiness_SpellScript : public SpellScript
|
spell_hun_readiness()
|
||||||
{
|
: SpellHandlerScript("spell_hun_readiness")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class spell_hun_readiness_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
void HandleDummy(SpellEffIndex effIndex)
|
void HandleDummy(SpellEffIndex effIndex)
|
||||||
{
|
{
|
||||||
Unit *caster = GetCaster();
|
Unit *caster = GetCaster();
|
||||||
@@ -118,15 +147,25 @@ class spell_hun_readiness_SpellScript : public SpellScript
|
|||||||
// add dummy effect spell handler to Readiness
|
// add dummy effect spell handler to Readiness
|
||||||
EffectHandlers += EffectHandlerFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
EffectHandlers += EffectHandlerFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_hun_readiness_SpellScript();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript * GetSpellScript_spell_hun_readiness()
|
class spell_hun_pet_heart_of_the_phoenix : public SpellHandlerScript
|
||||||
{
|
{
|
||||||
return new spell_hun_readiness_SpellScript();
|
public:
|
||||||
}
|
|
||||||
|
|
||||||
class spell_hun_pet_heart_of_the_phoenix : public SpellScript
|
spell_hun_pet_heart_of_the_phoenix()
|
||||||
{
|
: SpellHandlerScript("spell_hun_pet_heart_of_the_phoenix")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
bool Validate(SpellEntry const * spellEntry)
|
bool Validate(SpellEntry const * spellEntry)
|
||||||
{
|
{
|
||||||
if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
|
if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
|
||||||
@@ -148,7 +187,7 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScript
|
|||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
// add dummy effect spell handler to pet's Last Stand
|
// add dummy effect spell handler to pet's Last Stand
|
||||||
EffectHandlers += EffectHandlerFn(spell_hun_pet_heart_of_the_phoenix::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
EffectHandlers += EffectHandlerFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Load()
|
bool Load()
|
||||||
@@ -157,15 +196,25 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScript
|
|||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_hun_pet_heart_of_the_phoenix_SpellScript();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript * GetSpellScript_spell_hun_pet_heart_of_the_phoenix()
|
class spell_hun_pet_carrion_feeder : public SpellHandlerScript
|
||||||
{
|
{
|
||||||
return new spell_hun_pet_heart_of_the_phoenix();
|
public:
|
||||||
}
|
|
||||||
|
|
||||||
class spell_hun_pet_carrion_feeder : public SpellScript
|
spell_hun_pet_carrion_feeder()
|
||||||
{
|
: SpellHandlerScript("spell_hun_pet_carrion_feeder")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
bool Validate(SpellEntry const * spellEntry)
|
bool Validate(SpellEntry const * spellEntry)
|
||||||
{
|
{
|
||||||
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
|
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
|
||||||
@@ -184,7 +233,7 @@ class spell_hun_pet_carrion_feeder : public SpellScript
|
|||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
// add dummy effect spell handler to pet's Last Stand
|
// add dummy effect spell handler to pet's Last Stand
|
||||||
EffectHandlers += EffectHandlerFn(spell_hun_pet_carrion_feeder::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
EffectHandlers += EffectHandlerFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Load()
|
bool Load()
|
||||||
@@ -193,39 +242,19 @@ class spell_hun_pet_carrion_feeder : public SpellScript
|
|||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript * GetSpellScript_spell_hun_pet_carrion_feeder()
|
SpellScript* GetSpellScript() const
|
||||||
{
|
{
|
||||||
return new spell_hun_pet_carrion_feeder();
|
return new spell_hun_pet_carrion_feeder_SpellScript();
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_hunter_spell_scripts()
|
void AddSC_hunter_spell_scripts()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
new spell_hun_last_stand_pet();
|
||||||
|
new spell_hun_masters_call();
|
||||||
newscript = new Script;
|
new spell_hun_readiness();
|
||||||
newscript->Name = "spell_hun_last_stand_pet";
|
new spell_hun_pet_heart_of_the_phoenix();
|
||||||
newscript->GetSpellScript = &GetSpellScript_spell_hun_last_stand_pet;
|
new spell_hun_pet_carrion_feeder();
|
||||||
newscript->RegisterSelf();
|
|
||||||
|
|
||||||
newscript = new Script;
|
|
||||||
newscript->Name = "spell_hun_masters_call";
|
|
||||||
newscript->GetSpellScript = &GetSpellScript_spell_hun_masters_call;
|
|
||||||
newscript->RegisterSelf();
|
|
||||||
|
|
||||||
newscript = new Script;
|
|
||||||
newscript->Name = "spell_hun_readiness";
|
|
||||||
newscript->GetSpellScript = &GetSpellScript_spell_hun_readiness;
|
|
||||||
newscript->RegisterSelf();
|
|
||||||
|
|
||||||
newscript = new Script;
|
|
||||||
newscript->Name = "spell_hun_pet_heart_of_the_phoenix";
|
|
||||||
newscript->GetSpellScript = &GetSpellScript_spell_hun_pet_heart_of_the_phoenix;
|
|
||||||
newscript->RegisterSelf();
|
|
||||||
|
|
||||||
newscript = new Script;
|
|
||||||
newscript->Name = "spell_hun_pet_carrion_feeder";
|
|
||||||
newscript->GetSpellScript = &GetSpellScript_spell_hun_pet_carrion_feeder;
|
|
||||||
newscript->RegisterSelf();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 spell_mage_polymorph_cast_visual_SpellScript::spell_list[6] = {
|
const uint32 spell_mage_polymorph_cast_visual_SpellScript::spell_list[6] =
|
||||||
|
{
|
||||||
SPELL_MAGE_SQUIRREL_FORM,
|
SPELL_MAGE_SQUIRREL_FORM,
|
||||||
SPELL_MAGE_GIRAFFE_FORM,
|
SPELL_MAGE_GIRAFFE_FORM,
|
||||||
SPELL_MAGE_SERPENT_FORM,
|
SPELL_MAGE_SERPENT_FORM,
|
||||||
|
|||||||
Reference in New Issue
Block a user