mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 09:03:47 +00:00
fix(DB/Creatures): Nat Pagle should display vendor icon if player completed Nat's Measuring Tap quest. (#10657)
Moved c++ script to DB. Original author: @offl Fixes #10559
This commit is contained in:
@@ -18,12 +18,11 @@
|
||||
/* ScriptData
|
||||
SDName: Dustwallow_Marsh
|
||||
SD%Complete: 95
|
||||
SDComment: Quest support: 11180, 11126, 11174, Vendor Nat Pagle
|
||||
SDComment: Quest support: 11180, 11126, 11174
|
||||
SDCategory: Dustwallow Marsh
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_nat_pagle
|
||||
npc_cassa_crimsonwing - handled by npc_taxi
|
||||
EndContentData */
|
||||
|
||||
@@ -34,46 +33,6 @@ EndContentData */
|
||||
#include "SpellScript.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
/*######
|
||||
## npc_nat_pagle
|
||||
######*/
|
||||
|
||||
enum NatPagle
|
||||
{
|
||||
QUEST_NATS_MEASURING_TAPE = 8227
|
||||
};
|
||||
|
||||
class npc_nat_pagle : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_nat_pagle() : CreatureScript("npc_nat_pagle") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
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(QUEST_NATS_MEASURING_TAPE))
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
SendGossipMenuFor(player, 7640, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
SendGossipMenuFor(player, 7638, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_zelfrax
|
||||
######*/
|
||||
@@ -285,7 +244,6 @@ public:
|
||||
|
||||
void AddSC_dustwallow_marsh()
|
||||
{
|
||||
new npc_nat_pagle();
|
||||
new npc_zelfrax();
|
||||
new spell_ooze_zap();
|
||||
new spell_ooze_zap_channel_end();
|
||||
|
||||
Reference in New Issue
Block a user