Skip to content

Commit

Permalink
Core/Scripts/DB: remove hardcoded text from 'npc_disciple_of_naralex'
Browse files Browse the repository at this point in the history
- moved 2 #define text lines to enum, already in npc_text
- new gossip_menu_option for NPC 3678 Disciple of Naralex
- using `ADD_GOSSIP_ITEM_DB` instead of `ADD_GOSSIP_ITEM`

Tested on both alliance and horde characters, works just like before.

(cherry picked from commit bc03fed)
  • Loading branch information
tkrokli authored and Shauren committed Apr 2, 2016
1 parent 870a76a commit 0466de4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions sql/updates/world/2016_04_02_18_world_2016_01_31_15_world.sql
@@ -0,0 +1,4 @@
-- new gossip_menu for NPC 3678 Disciple of Naralex:
DELETE FROM `gossip_menu_option` WHERE `menu_id`= 201 AND `OptionBroadcastTextID`= 2662;
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`) VALUES
(201, 0, 0, 'Let the event begin!', 2662, 1, 1, 0, 0, 0, 0, '', 0);
14 changes: 7 additions & 7 deletions src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
Expand Up @@ -58,6 +58,10 @@ enum Enums
SAY_FAREWELL = 5,
SAY_ATTACKED = 11,

GOSSIP_OPTION_LET_EVENT_BEGIN = 201,
NPC_TEXT_NARALEX_SLEEPS_AGAIN = 698,
NPC_TEXT_FANGLORDS_ARE_DEAD = 699,

SPELL_MARK_OF_THE_WILD_RANK_2 = 5232,
SPELL_SERPENTINE_CLEANSING = 6270,
SPELL_NARALEXS_AWAKENING = 6271,
Expand All @@ -70,10 +74,6 @@ enum Enums
NPC_MUTANUS_THE_DEVOURER = 3654,
};

#define GOSSIP_ID_START_1 698 //Naralex sleeps again!
#define GOSSIP_ID_START_2 699 //The fanglords are dead!
#define GOSSIP_ITEM_NARALEX "Let the event begin!"

class npc_disciple_of_naralex : public CreatureScript
{
public:
Expand Down Expand Up @@ -116,8 +116,8 @@ class npc_disciple_of_naralex : public CreatureScript
if ((instance->GetData(TYPE_LORD_COBRAHN) == DONE) && (instance->GetData(TYPE_LORD_PYTHAS) == DONE) &&
(instance->GetData(TYPE_LADY_ANACONDRA) == DONE) && (instance->GetData(TYPE_LORD_SERPENTIS) == DONE))
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NARALEX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(GOSSIP_ID_START_2, creature->GetGUID());
player->ADD_GOSSIP_ITEM_DB(GOSSIP_OPTION_LET_EVENT_BEGIN, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(NPC_TEXT_FANGLORDS_ARE_DEAD, creature->GetGUID());

if (!instance->GetData(TYPE_NARALEX_YELLED))
{
Expand All @@ -127,7 +127,7 @@ class npc_disciple_of_naralex : public CreatureScript
}
else
{
player->SEND_GOSSIP_MENU(GOSSIP_ID_START_1, creature->GetGUID());
player->SEND_GOSSIP_MENU(NPC_TEXT_NARALEX_SLEEPS_AGAIN, creature->GetGUID());
}
}
return true;
Expand Down

0 comments on commit 0466de4

Please sign in to comment.