mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
Merge pull request #11746 from untaught/Trinity0
Core/Scripts: Move condition for 'npc_skorn_whitecloud' gossip menu opti...
This commit is contained in:
4
sql/updates/world/2014_03_19_00_world_conditions.sql
Normal file
4
sql/updates/world/2014_03_19_00_world_conditions.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
UPDATE `creature_template` SET `scriptname`='' WHERE `entry`=3052;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=24 AND `SourceEntry`=0;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15,24,0,0,0,8,0,770,0,0,1,0,0,'','Show gossip menu option if player has no quest ''The Demon Scarred Cloak'' rewarded');
|
||||
@@ -24,7 +24,6 @@ SDCategory: Mulgore
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_skorn_whitecloud
|
||||
npc_kyle_frenzied
|
||||
npc_plains_vision
|
||||
EndContentData */
|
||||
@@ -35,41 +34,6 @@ EndContentData */
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
/*######
|
||||
# npc_skorn_whitecloud
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SW "Tell me a story, Skorn."
|
||||
|
||||
class npc_skorn_whitecloud : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_skorn_whitecloud() : CreatureScript("npc_skorn_whitecloud") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
player->SEND_GOSSIP_MENU(523, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (!player->GetQuestRewardStatus(770))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(522, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*#####
|
||||
# npc_kyle_frenzied
|
||||
######*/
|
||||
@@ -321,7 +285,6 @@ public:
|
||||
|
||||
void AddSC_mulgore()
|
||||
{
|
||||
new npc_skorn_whitecloud();
|
||||
new npc_kyle_frenzied();
|
||||
new npc_plains_vision();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user