All pastes #965689 Raw Edit

npc_nat_pagle

public diff v1 · immutable
·published 2008-04-01 03:23 UTC
rendered paste body
Index: scripts/zone/dustwallow_marsh/npcs_dustwallow_marsh.cpp===================================================================--- scripts/zone/dustwallow_marsh/npcs_dustwallow_marsh.cpp	(revision 306)+++ scripts/zone/dustwallow_marsh/npcs_dustwallow_marsh.cpp	(working copy)@@ -408,9 +408,38 @@ }  /*######-## +## npc_nat_pagle ######*/ +bool GossipHello_npc_nat_pagle(Player *player, Creature *_Creature)+{+    if (_Creature->isQuestGiver())+    {+        player->PrepareQuestMenu( _Creature->GetGUID() );+        player->SendPreparedQuest( _Creature->GetGUID() );+    } +    if( player->GetQuestStatus(8227) == QUEST_STATUS_COMPLETE)+    {+        player->ADD_GOSSIP_ITEM( 0, "I'd like to browse your goods.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);+        player->SEND_GOSSIP_MENU( 7638, _Creature->GetGUID() );+    }+    else+    {+        player->SEND_GOSSIP_MENU( 7638, _Creature->GetGUID() );+    }++    return true;+}++bool GossipSelect_npc_nat_pagle(Player *player, Creature *_Creature, uint32 sender, uint32 action)+{+    if(action == GOSSIP_ACTION_TRADE)+    {+        player->SEND_VENDORLIST( _Creature->GetGUID() );+    }+    return true;+}+ void AddSC_npcs_dustwallow_marsh() {     Script *newscript;@@ -442,4 +471,10 @@     newscript->GetAI = GetAI_npc_doctor;     newscript->pQuestAccept = &QuestAccept_npc_doctor;     m_scripts[nrscripts++] = newscript;++    newscript = new Script;+    newscript->Name="npc_nat_pagle";+    newscript->pGossipHello = &GossipHello_npc_nat_pagle;+    newscript->pGossipSelect = &GossipSelect_npc_nat_pagle;+    m_scripts[nrscripts++] = newscript; }