mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Script/Quest): Terokk's Downfall (#24243)
This commit is contained in:
@@ -572,6 +572,46 @@ private:
|
||||
SpellCastResult _result;
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_ancient_skull_pile
|
||||
######*/
|
||||
|
||||
enum AncientSkullPile
|
||||
{
|
||||
ITEM_TIME_LOST_OFFERING = 32720,
|
||||
SPELL_SUMMON_TEROKK = 41004,
|
||||
|
||||
GOSSIP_MENU_ANCIENT_SKULL_PILE = 8687,
|
||||
GOSSIP_MENU_TEXT_ANCIENT_SKULL_PILE = 11058
|
||||
};
|
||||
|
||||
class go_ancient_skull_pile : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_ancient_skull_pile() : GameObjectScript("go_ancient_skull_pile") {}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 /*action*/) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
|
||||
if (sender == GOSSIP_SENDER_MAIN)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
if (player->HasItemCount(ITEM_TIME_LOST_OFFERING, 1))
|
||||
go->DespawnOrUnsummon();
|
||||
player->CastSpell(player, SPELL_SUMMON_TEROKK);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ANCIENT_SKULL_PILE, 0, GOSSIP_SENDER_MAIN, 0);
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_TEXT_ANCIENT_SKULL_PILE, go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_slim
|
||||
######*/
|
||||
@@ -621,5 +661,6 @@ void AddSC_terokkar_forest()
|
||||
new npc_unkor_the_ruthless();
|
||||
new npc_isla_starmane();
|
||||
new go_skull_pile();
|
||||
new go_ancient_skull_pile();
|
||||
new npc_slim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user