mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Scripts: remove script npc_timothy_daniels (#17779)
The core script `npc_timothy_daniels` is no longer needed, all the gossip handling is already present in the database. - remove core script npc_timothy_daniels - remove ScriptName from c_t entry in DB
This commit is contained in:
2
sql/updates/world/3.3.5/2016_08_14_01_world.txt
Normal file
2
sql/updates/world/3.3.5/2016_08_14_01_world.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
-- NPC ID/entry 18019, Timothy Daniels
|
||||
UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry` = 18019;
|
||||
@@ -28,7 +28,6 @@ npcs_ashyen_and_keleth
|
||||
npc_cooshcoosh
|
||||
npc_elder_kuruti
|
||||
npc_kayra_longmane
|
||||
npc_timothy_daniels
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
@@ -371,53 +370,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_timothy_daniels
|
||||
######*/
|
||||
|
||||
#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?"
|
||||
#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies."
|
||||
|
||||
enum Timothy
|
||||
{
|
||||
GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239
|
||||
};
|
||||
|
||||
class npc_timothy_daniels : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_timothy_daniels() : CreatureScript("npc_timothy_daniels") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->IsVendor())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), 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->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
######*/
|
||||
@@ -428,5 +380,4 @@ void AddSC_zangarmarsh()
|
||||
new npc_cooshcoosh();
|
||||
new npc_elder_kuruti();
|
||||
new npc_kayra_longmane();
|
||||
new npc_timothy_daniels();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user