mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Scripts/Item): Winter Veil Disguise Kit cannot be used during pre… (#12883)
...paration phase.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -3789,4 +3815,5 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_recall);
|
||||
RegisterSpellScript(spell_item_wraith_scythe_drain_life);
|
||||
RegisterSpellScript(spell_item_mirrens_drinking_hat);
|
||||
RegisterSpellScript(spell_item_snowman);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user