Core/Spells: convert some spell effects to SpellScripts
This commit is contained in:
1 parent
58f63509cd
commit
ca07f30d03
26 files changed
+1099
-455
No files matched your search
@@ -618,6 +618,34 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_hun_disengage : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_hun_disengage() : SpellScriptLoader("spell_hun_disengage") { }
|
||||
|
||||
class spell_hun_disengage_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_disengage_SpellScript);
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if (GetCaster()->GetTypeId() == TYPEID_PLAYER && !GetCaster()->isInCombat())
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_hun_disengage_SpellScript::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_hun_disengage_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_hunter_spell_scripts()
|
||||
{
|
||||
@@ -633,4 +661,5 @@ void AddSC_hunter_spell_scripts()
|
||||
new spell_hun_pet_carrion_feeder();
|
||||
new spell_hun_misdirection();
|
||||
new spell_hun_misdirection_proc();
|
||||
new spell_hun_disengage();
|
||||
}
|
||||
Reference in new issue
Block a user