mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Scripts: Migrate Tanaris NPC's to SAI (#17390)
This commit is contained in:
@@ -19,15 +19,13 @@
|
||||
/* ScriptData
|
||||
SDName: Tanaris
|
||||
SD%Complete: 80
|
||||
SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path).
|
||||
SDComment: Quest support: 648, 1560, 4005, 10277
|
||||
SDCategory: Tanaris
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_aquementas
|
||||
npc_custodian_of_time
|
||||
npc_steward_of_time
|
||||
npc_stone_watcher_of_norgannon
|
||||
npc_OOX17
|
||||
npc_tooga
|
||||
EndContentData */
|
||||
@@ -297,116 +295,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_steward_of_time
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM_FLIGHT "Please take me to the master's lair."
|
||||
|
||||
class npc_steward_of_time : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_steward_of_time() : CreatureScript("npc_steward_of_time") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == 10279) //Quest: To The Master's Lair
|
||||
player->CastSpell(player, 34891, true); //(Flight through Caverns)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
player->CastSpell(player, 34891, true); //(Flight through Caverns)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(10279) == QUEST_STATUS_INCOMPLETE || player->GetQuestRewardStatus(10279))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(9978, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(9977, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_stone_watcher_of_norgannon
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM_NORGANNON_1 "What function do you serve?"
|
||||
#define GOSSIP_ITEM_NORGANNON_2 "What are the Plates of Uldum?"
|
||||
#define GOSSIP_ITEM_NORGANNON_3 "Where are the Plates of Uldum?"
|
||||
#define GOSSIP_ITEM_NORGANNON_4 "Excuse me? We've been \"reschedueled for visitations\"? What does that mean?!"
|
||||
#define GOSSIP_ITEM_NORGANNON_5 "So, what's inside Uldum?"
|
||||
#define GOSSIP_ITEM_NORGANNON_6 "I will return when i have the Plates of Uldum."
|
||||
|
||||
class npc_stone_watcher_of_norgannon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_stone_watcher_of_norgannon() : CreatureScript("npc_stone_watcher_of_norgannon") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(1675, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(1676, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(1677, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
player->SEND_GOSSIP_MENU(1678, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
|
||||
player->SEND_GOSSIP_MENU(1679, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(2954);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(2954) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(1674, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_OOX17
|
||||
######*/
|
||||
@@ -672,8 +560,6 @@ void AddSC_tanaris()
|
||||
{
|
||||
new npc_aquementas();
|
||||
new npc_custodian_of_time();
|
||||
new npc_steward_of_time();
|
||||
new npc_stone_watcher_of_norgannon();
|
||||
new npc_OOX17();
|
||||
new npc_tooga();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user