mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #11749 from untaught/Trinity2
Core/Scripts: Move condition for 'npc_marin_noggenfogger' gossip menu op...
This commit is contained in:
9
sql/updates/world/2014_03_19_01_world_conditions.sql
Normal file
9
sql/updates/world/2014_03_19_01_world_conditions.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
UPDATE `creature_template` SET `scriptname`='' WHERE `entry`=7564;
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=922;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
|
||||
(922,0,1,'I''d like to browse your goods.',3,128,0,0,0,0,NULL);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=922 AND `SourceEntry`=0;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15,922,0,0,0,8,0,2662,0,0,0,0,0,'','Show gossip menu option if only player has ''Noggenfogger Elixir'' quest rewarded');
|
||||
@@ -19,14 +19,13 @@
|
||||
/* ScriptData
|
||||
SDName: Tanaris
|
||||
SD%Complete: 80
|
||||
SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor
|
||||
SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path).
|
||||
SDCategory: Tanaris
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_aquementas
|
||||
npc_custodian_of_time
|
||||
npc_marin_noggenfogger
|
||||
npc_steward_of_time
|
||||
npc_stone_watcher_of_norgannon
|
||||
npc_OOX17
|
||||
@@ -281,39 +280,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_marin_noggenfogger
|
||||
######*/
|
||||
|
||||
class npc_marin_noggenfogger : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_marin_noggenfogger() : CreatureScript("npc_marin_noggenfogger") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->IsVendor() && player->GetQuestRewardStatus(2662))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_steward_of_time
|
||||
######*/
|
||||
@@ -681,7 +647,6 @@ void AddSC_tanaris()
|
||||
{
|
||||
new npc_aquementas();
|
||||
new npc_custodian_of_time();
|
||||
new npc_marin_noggenfogger();
|
||||
new npc_steward_of_time();
|
||||
new npc_stone_watcher_of_norgannon();
|
||||
new npc_OOX17();
|
||||
|
||||
Reference in New Issue
Block a user