Core/Scripts: move forge_of_souls gossip to DB
(cherry picked from commit 537074a8092ae694cf5d797a2a8f0ffa5013d43c) Rename 2016_08_24_20_world.sql to 2016_08_25_03_world.sql (cherry picked from commit 8500d0f9e01964531f469e9bbf2f146e03915a8e)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- NPC ID 37596, Lady Sylvanas Windrunner
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`= 10971;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`,`VerifiedBuild`) VALUES
|
||||
(10971, 0, 0, "What would you have of me, Banshee Queen?", 37549, 1, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
@@ -36,10 +36,6 @@ enum Events
|
||||
EVENT_INTRO_8,
|
||||
};
|
||||
|
||||
/****************************************SYLVANAS************************************/
|
||||
#define GOSSIP_SYLVANAS_ITEM "What would you have of me, Banshee Queen?"
|
||||
#define GOSSIP_JAINA_ITEM "What would you have of me, my lady?"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
SAY_JAINA_INTRO_1 = 0,
|
||||
@@ -61,8 +57,10 @@ enum Yells
|
||||
|
||||
enum Misc
|
||||
{
|
||||
GOSSIP_SPEECHINTRO = 13525,
|
||||
ACTION_INTRO,
|
||||
MENU_ID_JAINA = 10943,
|
||||
MENU_ID_SYLVANAS = 10971,
|
||||
GOSSIP_OPTION_ID = 0
|
||||
};
|
||||
|
||||
enum Phase
|
||||
@@ -101,19 +99,17 @@ public:
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
switch (actionId)
|
||||
{
|
||||
case ACTION_INTRO:
|
||||
if (menuId == MENU_ID_SYLVANAS && gossipListId == GOSSIP_OPTION_ID)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
phase = PHASE_INTRO;
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_INTRO_1, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -164,36 +160,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->GetEntry() == NPC_JAINA_PART1)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_JAINA_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SYLVANAS_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
if (creature->AI())
|
||||
creature->AI()->DoAction(ACTION_INTRO);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<npc_sylvanas_fosAI>(creature);
|
||||
@@ -230,19 +196,17 @@ public:
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
switch (actionId)
|
||||
{
|
||||
case ACTION_INTRO:
|
||||
if (menuId == MENU_ID_JAINA && gossipListId == GOSSIP_OPTION_ID)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
phase = PHASE_INTRO;
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_INTRO_1, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -304,36 +268,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->GetEntry() == NPC_JAINA_PART1)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_JAINA_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SYLVANAS_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
if (creature->AI())
|
||||
creature->AI()->DoAction(ACTION_INTRO);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<npc_jaina_fosAI>(creature);
|
||||
|
||||
Reference in New Issue
Block a user