Core/Spells: fix wintergrasp water being applied to players. small codestyle fix
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 36444;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(36444, 'spell_gen_wg_water');
|
||||
@@ -1234,30 +1234,30 @@ class spell_gen_magic_rooster : public SpellScriptLoader
|
||||
|
||||
class spell_gen_allow_cast_from_item_only : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_allow_cast_from_item_only() : SpellScriptLoader("spell_gen_allow_cast_from_item_only") { }
|
||||
public:
|
||||
spell_gen_allow_cast_from_item_only() : SpellScriptLoader("spell_gen_allow_cast_from_item_only") { }
|
||||
|
||||
class spell_gen_allow_cast_from_item_only_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_allow_cast_from_item_only_SpellScript);
|
||||
|
||||
SpellCastResult CheckRequirement()
|
||||
class spell_gen_allow_cast_from_item_only_SpellScript : public SpellScript
|
||||
{
|
||||
if (!GetCastItem())
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
PrepareSpellScript(spell_gen_allow_cast_from_item_only_SpellScript);
|
||||
|
||||
void Register()
|
||||
SpellCastResult CheckRequirement()
|
||||
{
|
||||
if (!GetCastItem())
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_allow_cast_from_item_only_SpellScript::CheckRequirement);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_allow_cast_from_item_only_SpellScript::CheckRequirement);
|
||||
return new spell_gen_allow_cast_from_item_only_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gen_allow_cast_from_item_only_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum Launch
|
||||
@@ -2590,6 +2590,34 @@ class spell_gen_ds_flush_knockback : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_wg_water : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_wg_water() : SpellScriptLoader("spell_gen_wg_water") {}
|
||||
|
||||
class spell_gen_wg_water_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_wg_water_SpellScript);
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if (!GetSpellInfo()->CheckTargetCreatureType(GetTargetUnit()))
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_wg_water_SpellScript::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gen_wg_water_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -2640,4 +2668,5 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_tournament_pennant();
|
||||
new spell_gen_chaos_blast();
|
||||
new spell_gen_ds_flush_knockback();
|
||||
new spell_gen_wg_water();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user