fix(Scripts/Item): Winter Veil Disguise Kit cannot be used during pre… (#12883)
...paration phase.
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=21848;
|
||||||
|
INSERT INTO `spell_script_names` VALUES
|
||||||
|
(21848,'spell_item_snowman');
|
||||||
@@ -3676,6 +3676,32 @@ class spell_item_mirrens_drinking_hat : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_item_snowman : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_snowman);
|
||||||
|
|
||||||
|
SpellCastResult CheckCast()
|
||||||
|
{
|
||||||
|
if (Player* caster = GetCaster()->ToPlayer())
|
||||||
|
{
|
||||||
|
if (Battleground* bg = caster->GetBattleground())
|
||||||
|
{
|
||||||
|
if (bg->GetStatus() == STATUS_WAIT_JOIN)
|
||||||
|
{
|
||||||
|
return SPELL_FAILED_NOT_READY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnCheckCast += SpellCheckCastFn(spell_item_snowman::CheckCast);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_item_spell_scripts()
|
void AddSC_item_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||||
@@ -3789,4 +3815,5 @@ void AddSC_item_spell_scripts()
|
|||||||
RegisterSpellScript(spell_item_recall);
|
RegisterSpellScript(spell_item_recall);
|
||||||
RegisterSpellScript(spell_item_wraith_scythe_drain_life);
|
RegisterSpellScript(spell_item_wraith_scythe_drain_life);
|
||||||
RegisterSpellScript(spell_item_mirrens_drinking_hat);
|
RegisterSpellScript(spell_item_mirrens_drinking_hat);
|
||||||
|
RegisterSpellScript(spell_item_snowman);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user