SHOW:
|
|
- or go back to the newest paste.
| 1 | #include "ScriptPCH.h" | |
| 2 | - | |
| 2 | + | |
| 3 | const uint32 TITLEID1 = 1; | |
| 4 | const uint32 TITLEID2 = 15; | |
| 5 | - | |
| 5 | + | |
| 6 | class VIP_NPC : public CreatureScript | |
| 7 | {
| |
| 8 | public: | |
| 9 | VIP_NPC() : CreatureScript("VIP_NPC") {}
| |
| 10 | - | |
| 10 | + | |
| 11 | bool OnGossipHello(Player* player, Creature* creature) | |
| 12 | {
| |
| 13 | - | if(player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID1) || |
| 13 | + | if(player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID1)) || player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID2))) |
| 14 | - | player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID2))) |
| 14 | + | |
| 15 | player->ADD_GOSSIP_ITEM(6, "Bye", GOSSIP_SENDER_MAIN, 1); | |
| 16 | player->PlayerTalkClass->SendGossipMenu(9452, creature->GetGUID()); | |
| 17 | return true; | |
| 18 | } | |
| 19 | ||
| 20 | - | |
| 20 | + | |
| 21 | {
| |
| 22 | player->PlayerTalkClass->ClearMenus(); | |
| 23 | switch (action) | |
| 24 | {
| |
| 25 | case GOSSIP_OPTION_VENDOR: | |
| 26 | player->GetSession()->SendListInventory(creature->GetGUID()); | |
| 27 | break; | |
| 28 | case 1: | |
| 29 | if(player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID1)) || player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID2))) | |
| 30 | - | if(player->HasTitle(sCharTitlesStore.LookupEntry(TITLEID))) |
| 30 | + | |
| 31 | else | |
| 32 | creature->MonsterWhisper("You do not have enough honorable kills!", player->GetGUID());
| |
| 33 | player->CLOSE_GOSSIP_MENU(); | |
| 34 | break; | |
| 35 | } | |
| 36 | return true; | |
| 37 | } | |
| 38 | }; | |
| 39 | ||
| 40 | - | |
| 40 | + | |
| 41 | {
| |
| 42 | new VIP_NPC(); | |
| 43 | } |