fix(Core/DB): Brewspewer hardcoded conditions (#6301)

This commit is contained in:
Cláudio Costa
2021-06-18 16:04:41 +01:00
committed by GitHub
parent e7e0ce1ea4
commit 07861d0548
6 changed files with 46 additions and 42 deletions

View File

@@ -19,43 +19,6 @@ EndScriptData */
#include "SpellScript.h"
#include "WorldSession.h"
/*######
## npc_gregan_brewspewer
######*/
#define GOSSIP_HELLO "Buy somethin', will ya?"
class npc_gregan_brewspewer : public CreatureScript
{
public:
npc_gregan_brewspewer() : CreatureScript("npc_gregan_brewspewer") { }
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
ClearGossipMenuFor(player);
if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
SendGossipMenuFor(player, 2434, creature->GetGUID());
}
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->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE)
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
SendGossipMenuFor(player, 2433, creature->GetGUID());
return true;
}
};
/*######
## npc_oox22fe
######*/
@@ -210,7 +173,6 @@ public:
void AddSC_feralas()
{
new npc_gregan_brewspewer();
new npc_oox22fe();
new spell_gordunni_trap();
}