mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 19:43:48 +00:00
fix(Core/Spells): Script Scourge Banner (#17523)
* fix(Core/Spells): Script Scourge Banner * correct statecheck
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
-- Scourge Banner
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=16989 AND `ScriptName`='spell_gen_planting_scourge_banner';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (16989, 'spell_gen_planting_scourge_banner');
|
||||||
@@ -5023,6 +5023,30 @@ class spell_gen_valthalak_amulet : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ScourgeBanner
|
||||||
|
{
|
||||||
|
GO_COMMAND_TENT = 176210,
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_gen_planting_scourge_banner : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_gen_planting_scourge_banner)
|
||||||
|
|
||||||
|
SpellCastResult CheckCast()
|
||||||
|
{
|
||||||
|
if (GameObject* tent = GetCaster()->FindNearestGameObject(GO_COMMAND_TENT, 20.0f))
|
||||||
|
if (tent->GetGoState() != GO_STATE_READY) // If tent is burned down
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
|
||||||
|
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnCheckCast += SpellCheckCastFn(spell_gen_planting_scourge_banner::CheckCast);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_generic_spell_scripts()
|
void AddSC_generic_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_silithyst);
|
RegisterSpellScript(spell_silithyst);
|
||||||
@@ -5172,4 +5196,5 @@ void AddSC_generic_spell_scripts()
|
|||||||
RegisterSpellScript(spell_gen_spirit_of_competition_participant);
|
RegisterSpellScript(spell_gen_spirit_of_competition_participant);
|
||||||
RegisterSpellScript(spell_gen_spirit_of_competition_winner);
|
RegisterSpellScript(spell_gen_spirit_of_competition_winner);
|
||||||
RegisterSpellScript(spell_gen_valthalak_amulet);
|
RegisterSpellScript(spell_gen_valthalak_amulet);
|
||||||
|
RegisterSpellScript(spell_gen_planting_scourge_banner);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user