Scripting/Spell Stand: Move this spell to spells generic.
This commit is contained in:
1 parent
456deb68e9
commit
716c2918d2
3 files changed
+33
-32
No files matched your search
@@ -3682,6 +3682,37 @@ class spell_gen_gm_freeze : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_stand : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_stand() : SpellScriptLoader("spell_gen_stand") { }
|
||||
|
||||
class spell_gen_stand_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_stand_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
{
|
||||
Creature* target = GetHitCreature();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
target->SetByteValue(UNIT_FIELD_BYTES_1, 0, UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_stand_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_gen_stand_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -3763,4 +3794,5 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_whisper_gulch_yogg_saron_whisper();
|
||||
new spell_gen_eject_all_passengers();
|
||||
new spell_gen_gm_freeze();
|
||||
new spell_gen_stand();
|
||||
}
|
||||
Reference in new issue
Block a user