#include "ScriptPCH.h"
enum Tokens
{
Vote_Token = 44791,
};
class PveTitleNpc : public CreatureScript
{
public:
PveTitleNpc() : CreatureScript("PveTitleNpc"){}
bool OnGossipHello(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
player->ADD_GOSSIP_ITEM(4, "Raiding / Dungeon Titles", GOSSIP_SENDER_MAIN, 2);
player->ADD_GOSSIP_ITEM(4, "Reputation Titles", GOSSIP_SENDER_MAIN, 3);
player->ADD_GOSSIP_ITEM(4, "Other Titles", GOSSIP_SENDER_MAIN, 4);
return true;
switch (uiAction)
case 2: //Raiding and Dungeon Titles
player->ADD_GOSSIP_ITEM(4, "Champion Of The Naaru", GOSSIP_SENDER_MAIN, 5);
player->ADD_GOSSIP_ITEM(4, "Hand Of Adal", GOSSIP_SENDER_MAIN, 6);
player->ADD_GOSSIP_ITEM(4, "The Patient", GOSSIP_SENDER_MAIN, 7);
player->ADD_GOSSIP_ITEM(4, "The Undying", GOSSIP_SENDER_MAIN, 8);
player->ADD_GOSSIP_ITEM(4, "The Immortal", GOSSIP_SENDER_MAIN, 9);
player->ADD_GOSSIP_ITEM(4, "Of The Nightfall", GOSSIP_SENDER_MAIN, 10);
player->ADD_GOSSIP_ITEM(4, "Twilight Vanquisher", GOSSIP_SENDER_MAIN, 11);
player->ADD_GOSSIP_ITEM(4, "Obsidium Slayer", GOSSIP_SENDER_MAIN, 12);
player->ADD_GOSSIP_ITEM(4, "Magic Seeker", GOSSIP_SENDER_MAIN, 13);
player->ADD_GOSSIP_ITEM(4, "Starcaller", GOSSIP_SENDER_MAIN, 14);
player->ADD_GOSSIP_ITEM(4, "The Astral Walker", GOSSIP_SENDER_MAIN, 15);
player->ADD_GOSSIP_ITEM(4, "Herald Of Titans", GOSSIP_SENDER_MAIN, 16);
player->ADD_GOSSIP_ITEM(4, "The Celestial Defender", GOSSIP_SENDER_MAIN, 17);
player->ADD_GOSSIP_ITEM(4, "Conqueror Of Ulduar", GOSSIP_SENDER_MAIN, 18);
player->ADD_GOSSIP_ITEM(4, "Champion Of Ulduar", GOSSIP_SENDER_MAIN, 19);
player->ADD_GOSSIP_ITEM(4, "Death's Demise", GOSSIP_SENDER_MAIN, 20);
player->ADD_GOSSIP_ITEM(4, "Conqueror Of Naxxramas", GOSSIP_SENDER_MAIN, 21);
player->ADD_GOSSIP_ITEM(4, "Champion Of The Frozen Wastes", GOSSIP_SENDER_MAIN, 22);
player->ADD_GOSSIP_ITEM(4, "The Argent Defender", GOSSIP_SENDER_MAIN, 23);
player->ADD_GOSSIP_ITEM(4, "The Kingslayer", GOSSIP_SENDER_MAIN, 24);
player->ADD_GOSSIP_ITEM(4, "Bane Of The Fallen King", GOSSIP_SENDER_MAIN, 25);
player->ADD_GOSSIP_ITEM(4, "The Light Of Dawn", GOSSIP_SENDER_MAIN, 26);
return true;
switch (uiAction)
case 3: // Reputation Titles
player->ADD_GOSSIP_ITEM(4, "Of The Shattered Sun", GOSSIP_SENDER_MAIN, 27);
player->ADD_GOSSIP_ITEM(4, "The Exhalted", GOSSIP_SENDER_MAIN, 28);
player->ADD_GOSSIP_ITEM(4, "Ambassador", GOSSIP_SENDER_MAIN, 29);
player->ADD_GOSSIP_ITEM(4, "The Diplomat", GOSSIP_SENDER_MAIN, 30);
player->ADD_GOSSIP_ITEM(4, "Bloodsail Admiral", GOSSIP_SENDER_MAIN, 31);
player->ADD_GOSSIP_ITEM(4, "Crusader", GOSSIP_SENDER_MAIN, 32);
player->ADD_GOSSIP_ITEM(4, "The Insane", GOSSIP_SENDER_MAIN, 33);
player->ADD_GOSSIP_ITEM(4, "Guardian Of Cenarius", GOSSIP_SENDER_MAIN, 34);
player->ADD_GOSSIP_ITEM(4, "The Argent Champion", GOSSIP_SENDER_MAIN, 35);
player->ADD_GOSSIP_ITEM(4, "Of The Ashen Verdict", GOSSIP_SENDER_MAIN, 36);
player->ADD_GOSSIP_ITEM(4, "Of Darnassus", GOSSIP_SENDER_MAIN, 37);
player->ADD_GOSSIP_ITEM(4, "Of Gnomeregan", GOSSIP_SENDER_MAIN, 38);
player->ADD_GOSSIP_ITEM(4, "Of Ironforge", GOSSIP_SENDER_MAIN, 39);
player->ADD_GOSSIP_ITEM(4, "Of Stormwind", GOSSIP_SENDER_MAIN, 40);
player->ADD_GOSSIP_ITEM(4, "Of The Exodar", GOSSIP_SENDER_MAIN, 41);
player->ADD_GOSSIP_ITEM(4, "Of Orgrimmar", GOSSIP_SENDER_MAIN, 42);
player->ADD_GOSSIP_ITEM(4, "Of Sen'jin", GOSSIP_SENDER_MAIN, 43);
player->ADD_GOSSIP_ITEM(4, "Of Silvermoon", GOSSIP_SENDER_MAIN, 44);
player->ADD_GOSSIP_ITEM(4, "Of Thunderbluff", GOSSIP_SENDER_MAIN, 45);
player->ADD_GOSSIP_ITEM(4, "Of The Undercity", GOSSIP_SENDER_MAIN, 46);
player->ADD_GOSSIP_ITEM(4, "For The Alliance", GOSSIP_SENDER_MAIN, 47);
player->ADD_GOSSIP_ITEM(4, "For The Horde", GOSSIP_SENDER_MAIN, 48);
return true;
switch (uiAction)
case 4: // Other Titles
player->ADD_GOSSIP_ITEM(4, "Scarab Lord", GOSSIP_SENDER_MAIN, 49);
player->ADD_GOSSIP_ITEM(4, "Brewmaster", GOSSIP_SENDER_MAIN, 50);
player->ADD_GOSSIP_ITEM(4, "The Love Fool", GOSSIP_SENDER_MAIN, 51);
player->ADD_GOSSIP_ITEM(4, "Matron", GOSSIP_SENDER_MAIN, 52);
player->ADD_GOSSIP_ITEM(4, "Patron", GOSSIP_SENDER_MAIN, 53);
player->ADD_GOSSIP_ITEM(4, "The Hallowed", GOSSIP_SENDER_MAIN, 54);
player->ADD_GOSSIP_ITEM(4, "Merrymaker", GOSSIP_SENDER_MAIN, 55);
player->ADD_GOSSIP_ITEM(4, "The Noble", GOSSIP_SENDER_MAIN, 56);
player->ADD_GOSSIP_ITEM(4, "The Pilgram", GOSSIP_SENDER_MAIN, 57);
player->ADD_GOSSIP_ITEM(4, "Flame Keeper", GOSSIP_SENDER_MAIN, 58);
player->ADD_GOSSIP_ITEM(4, "Flame Warden", GOSSIP_SENDER_MAIN, 59);
player->ADD_GOSSIP_ITEM(4, "Elder", GOSSIP_SENDER_MAIN, 60);
player->ADD_GOSSIP_ITEM(4, "Loremaster", GOSSIP_SENDER_MAIN, 61);
player->ADD_GOSSIP_ITEM(4, "The Seeker", GOSSIP_SENDER_MAIN, 62);
player->ADD_GOSSIP_ITEM(4, "Salty", GOSSIP_SENDER_MAIN, 63);
player->ADD_GOSSIP_ITEM(4, "Chef", GOSSIP_SENDER_MAIN, 64);
player->ADD_GOSSIP_ITEM(4, "Assassin", GOSSIP_SENDER_MAIN, 65);
player->ADD_GOSSIP_ITEM(4, "The Explorer", GOSSIP_SENDER_MAIN, 66);
player->ADD_GOSSIP_ITEM(4, "Jenkins", GOSSIP_SENDER_MAIN, 67);
player->PlayerTalkClass->SendGossipMenu(9000000, creature->GetGUID());
return true;
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* Player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
int32 xcase = uiAction or whatever way you can get the case value
// WorldSession* ws = Player->GetSession();
switch (uiAction) maybe not need this line now
{
if (Player->HasItemCount(Vote_Token, 1, false))
{
Player->DestroyItemCount(Vote_Token, 1, true, false);
Player->SetTitle(sCharTitlesStore.LookupEntry(xcase));
}
}
break;