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:
tkrokli
2016-08-14 12:05:24 +02:00
committed by Aokromes
parent 0c6eeb3abc
commit e2f395863a
2 changed files with 2 additions and 49 deletions

View File

@@ -0,0 +1,2 @@
-- NPC ID/entry 18019, Timothy Daniels
UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry` = 18019;

View File

@@ -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();
}