diff --git a/data/sql/updates/pending_db_world/rev_1766988937503898400.sql b/data/sql/updates/pending_db_world/rev_1766988937503898400.sql new file mode 100644 index 000000000..405b5ffb7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1766988937503898400.sql @@ -0,0 +1,3 @@ +-- +UPDATE `gameobject_template` SET `AIName` = '', `ScriptName` = 'go_ancient_skull_pile' WHERE `entry` = 185928; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 185928 AND `source_type` = 1; diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index 5ffc172d1..63f623cd5 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -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(); }