Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- class Innkeep : public CreatureScript
- {
- public:
- Innkeep() : CreatureScript("Innkeep") { }
- bool OnGossipHello(Player * pPlayer, Creature * pCreature)
- {
- pPlayer->ADD_GOSSIP_ITEM(6, "Browse my goods", GOSSIP_SENDER_MAIN, 0);
- pPlayer->ADD_GOSSIP_ITEM(0, "Make this inn your home.", GOSSIP_SENDER_MAIN, 1);
- pPlayer->ADD_GOSSIP_ITEM(10, "Bye", GOSSIP_SENDER_MAIN, 2);
- pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
- }
- }
- bool OnGossipSelect(Player * player, Creature * creature, uint32 sender, uint32 uiAction)
- {
- if (sender == GOSSIP_SENDER_MAIN)
- {
- switch(uiAction)
- {
- case 0:
- player->GetSession()->SendListInventory(creature->GetGUID());
- break;
- case 1:
- player->SetBindPoint(creature->GetGUID());
- break;
- case 2:
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- }
- };
- void AddSC_Innkeep()
- {
- new Innkeep();
- }
Advertisement
Add Comment
Please, Sign In to add comment