Exemplo n.º 1
0
 void SendMessageToPlayer(Player* player, Creature* creature, std::string message)
 {
     char str_info[200];
     sprintf(str_info,"%s",message.c_str());
     OnGossipHello(player, creature);
     player->MonsterWhisper(str_info,player->GetGUID(),true);
 }
Exemplo n.º 2
0
 bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
 {
     player->PlayerTalkClass->ClearMenus();
     switch(sender)
     {
         case GOSSIP_SENDER_MAIN:
             ShowPage(player, 1, action);
             player->SEND_GOSSIP_MENU(1, creature->GetGUID());
             break;
         default:
             if (sender < 100)
             {
                 Enchant(player, sender, action);
                 player->CLOSE_GOSSIP_MENU();
                 break;
             }
             if (sender == 100)
                 OnGossipHello(player, creature);
             else
             {
                 ShowPage(player, sender - 100, action);
                 player->SEND_GOSSIP_MENU(1, creature->GetGUID());
             }
             break;
     }
     return true;
 }
Exemplo n.º 3
0
bool BotHelper::OnGossipSelect(Player* player, uint32 sender, uint32 action)
{
    switch (sender)
    {
        case SENDER_MAIN_PAGE:
            OnGossipHello(player);
            break;
        case SENDER_CREATE_NBOT_MENU:
            SendCreateNPCBotMenu(player, action);
            break;
        case SENDER_CREATE_NBOT:
            SendCreateNPCBot(player, action);
            break;
        case SENDER_REMOVE_NBOT_MENU:
            SendRemoveNPCBotMenu(player, action);
            break;
        case SENDER_REMOVE_NBOT:
            SendRemoveNPCBot(player, action);
            break;
        case SENDER_INFO_WHISPER:
            SendBotHelpWhisper(player, action);
            break;
        default:
            break;
    }
    return true;
}
Exemplo n.º 4
0
    bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
    {
        player->PlayerTalkClass->ClearMenus();
        switch (sender)
        {
            case SENDER_ACCEPT:
                if (bloodMoney.AcceptChallenge(player->GetGUIDLow(), action))
                {
                    if (Player* challenger = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, action)))
                        creature->Whisper(player->GetName() + " has accepted your challenge!", LANG_UNIVERSAL, challenger, true);
                }
                else
                {
                    player->GetSession()->SendNotification("Internal error, try again");
                }
                break;
            case SENDER_DECLINE:
                if (bloodMoney.RemoveChallenger(player->GetGUIDLow(), action))
                {
                    if (Player* challenger = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, action)))
                        creature->Whisper(player->GetName() + " has declined your challenge!", LANG_UNIVERSAL, challenger, true);
                }
                break;
            case SENDER_CHALLENGE:
#if(USE_TOKEN == 1)
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5 tokens", GOSSIP_SENDER_MAIN, 5, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10 tokens", GOSSIP_SENDER_MAIN, 10, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15 tokens", GOSSIP_SENDER_MAIN, 15, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25 tokens", GOSSIP_SENDER_MAIN, 25, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50 tokens", GOSSIP_SENDER_MAIN, 50, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100 tokens", GOSSIP_SENDER_MAIN, 100, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150 tokens", GOSSIP_SENDER_MAIN, 150, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200 tokens", GOSSIP_SENDER_MAIN, 200, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250 tokens", GOSSIP_SENDER_MAIN, 250, "", 0, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500 tokens", GOSSIP_SENDER_MAIN, 500, "", 0, true);
#else
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5g", GOSSIP_SENDER_MAIN, 5, "", 5 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10g", GOSSIP_SENDER_MAIN, 10, "", 10 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15g", GOSSIP_SENDER_MAIN, 15, "", 15 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25g", GOSSIP_SENDER_MAIN, 25, "", 25 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50g", GOSSIP_SENDER_MAIN, 50, "", 50 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100g", GOSSIP_SENDER_MAIN, 100, "", 100 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150g", GOSSIP_SENDER_MAIN, 150, "", 150 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200g", GOSSIP_SENDER_MAIN, 200, "", 200 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250g", GOSSIP_SENDER_MAIN, 250, "", 250 * GOLD, true);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500g", GOSSIP_SENDER_MAIN, 500, "", 500 * GOLD, true);
#endif
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
                return true;
 
            default:
                player->CLOSE_GOSSIP_MENU();
                return true;
        }
 
        OnGossipHello(player, creature);
        return true;
    }
Exemplo n.º 5
0
        bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
        {
			if (uiAction == GOSSIP_ACTION_INFO_DEF+901)
			{
				player->PlayerTalkClass->SendCloseGossip();
				OnGossipHello(player, creature);
			}

			if (uiAction == GOSSIP_ACTION_INFO_DEF+10000)
			{
				player->PlayerTalkClass->SendCloseGossip();
			}

			if (uiAction == GOSSIP_ACTION_INFO_DEF+777)
			{
				ItemPosCountVec dest;
				if(player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, LAND_ITEM_ID, 1) == EQUIP_ERR_OK)
				{	
					if(player->AddItem(LAND_ITEM_ID, 1)){
					ChatHandler(player->GetSession()).PSendSysMessage("Don't lose it this time!");
					}
				} else {
					ChatHandler(player->GetSession()).PSendSysMessage("Bag is full or other issue!");
				}
			}

			if (uiAction == GOSSIP_ACTION_INFO_DEF+902)
			{
				QueryResult spawnresult;
				spawnresult = CharacterDatabase.PQuery("SELECT map_id, spawn_x, spawn_y, spawn_z, spawn_o FROM player_house_available WHERE id=%u", selection);	
				if(spawnresult)
				{
					Field *fields = spawnresult->Fetch();
					player->TeleportTo(fields[0].GetUInt32(),fields[1].GetFloat(),fields[2].GetFloat(),fields[3].GetFloat(),fields[4].GetFloat());
					return true;
					} else {
					ChatHandler(player->GetSession()).PSendSysMessage("Could not locate your spawn! Please contact a GM!");
				}

			}

			for(int i = 1; i <= count; i++)
			{
				if (uiAction == GOSSIP_ACTION_INFO_DEF+i)
				{
					selection = i;					
					player->PlayerTalkClass->ClearMenus();
					player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Preview (Teleport to location)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+902);
					player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go back to other loactions.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+901);
					player->PlayerTalkClass->SendGossipMenu(3, creature->GetGUID());
				}
			}
            return true;
        }
Exemplo n.º 6
0
    bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 SKILL)
    { 
        pPlayer->PlayerTalkClass->ClearMenus();

        if (uiSender == GOSSIP_SENDER_MAIN)
        {
            if(pPlayer->HasSkill(SKILL))
                pPlayer->GetSession()->SendNotification("You already have that skill");
            else
                CompleteLearnProfession(pPlayer, (SkillType)SKILL);
        }
        OnGossipHello(pPlayer, _creature);
        return true;
    }
Exemplo n.º 7
0
    bool OnGossipSelect(Player * player, Creature * creature, uint32 sender, uint32 uiAction) 
    {
        player->PlayerTalkClass->ClearMenus();
 
        if(uiAction == 1)
        {
            player->ADD_GOSSIP_ITEM(7, "Las reglas son simples, Si sacas superior a 50, su apuesta se duplica. De lo contrario, se pierde la cantidad apostada.", GOSSIP_SENDER_MAIN, 1);
            player->SEND_GOSSIP_MENU(123432, creature->GetGUID());
        }
        else if(uiAction == 0)
        {   
            OnGossipHello(player, creature);
        }
        return true;
    }
Exemplo n.º 8
0
	bool OnGossipSelect(Player* pPlayer, Creature* pCreature,uint32 uiSender, uint32 uiAction)
    {
        pPlayer->PlayerTalkClass->ClearMenus();

        switch (uiAction)
        {
		  case 1:
              {
                  pCreature->CastSpell(pPlayer,35517,false);
                  pPlayer->TeleportTo(967, -1870.114f, -3077.727f, -176.308f, 0.390f);
			 }break;
			  {
                  OnGossipHello(pPlayer, pCreature);
                return true;
              }break;
		}
		pPlayer->CLOSE_GOSSIP_MENU();
        return true;
	}
Exemplo n.º 9
0
	bool OnGossipSelect(Player* pPlayer, Creature* pCreature,uint32 uiSender, uint32 uiAction)
    {
        pPlayer->PlayerTalkClass->ClearMenus();

        switch (uiAction)
        {
		  case 1:
              {
                  pCreature->CastSpell(pPlayer,35517,false);
                  pPlayer->TeleportTo(967, -1735.930f, -1818.239f, -219.328f, 0.0f);
			 }break;
			  {
                  OnGossipHello(pPlayer, pCreature);
                return true;
              }break;
		}
		pPlayer->CLOSE_GOSSIP_MENU();
        return true;
	}
	bool OnGossipSelect(Player* pPlayer, Creature* pCreature,uint32 uiSender, uint32 uiAction)
    {
        pPlayer->PlayerTalkClass->ClearMenus();

        switch (uiAction)
        {
		  case 1:
              {
                  pCreature->CastSpell(pPlayer,35517,false);
                  pPlayer->TeleportTo(967, 13397.298f, -12131.405f, 153.8732f, 3.152f);
			 }break;
			  {
                  OnGossipHello(pPlayer, pCreature);
                return true;
              }break;
		}
		pPlayer->CLOSE_GOSSIP_MENU();
        return true;
	}
Exemplo n.º 11
0
        void RequestRebirthPoints(Player* player, Creature* creature)
        {

            QueryResult result = LoginDatabase.PQuery("SELECT rebirth_punkte FROM account WHERE id = %u", player->GetSession()->GetAccountId());

            if (result)
            {
                Field* field = result->Fetch();
                uint32 eventPunkte = field[0].GetUInt32();
                char str_info[200];
                sprintf(str_info,"Du hast %u Rebirth Punkte!", eventPunkte);
                player->PlayerTalkClass->ClearMenus();
                player->MonsterWhisper(str_info,player->GetGUID(),true);
                OnGossipHello(player, creature);
            }

            else if (!result)
                SendMessageToPlayer(player, creature,"Es ist ein Fehler aufgetreten. Bitte wende dich an einen Administrator und melde FehlerID 100!");

        }
Exemplo n.º 12
0
    void Enchant(Player* player, Creature* creature, uint8 slot, uint32 enchant, uint8 type = 0)
    {
        Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);

        if (!item || (type != 0 && !validItem(type, item)))
        {
            player->CLOSE_GOSSIP_MENU();
            ChatHandler(player).PSendSysMessage("|cfff4b25eМастер наложения чар шепчет:|r |cfffcedbbЗачем вы сняли предмет? Я же не буду рыться в вашей сумке чтобы зачаровать его.|r");
            return;
        }

        SpellItemEnchantmentEntry const* enchantid = sSpellItemEnchantmentStore.LookupEntry(enchant);
        if (!enchantid)
            return;

        player->ApplyEnchantment(item, PERM_ENCHANTMENT_SLOT, false);
        item->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchant, 0, 0);
        player->ApplyEnchantment(item, PERM_ENCHANTMENT_SLOT, true);

        player->CastSpell(player, 76706, true);

        OnGossipHello(player, creature);
    }
Exemplo n.º 13
0
        void RequestNextEvents(Player* player, Creature* creature)
        {

            QueryResult result = LoginDatabase.PQuery("SELECT FROM_UNIXTIME(date), type, reqLevel FROM rebirth_next_event WHERE date > UNIX_TIMESTAMP()");

            if (result)
            {
                do
                {
                     Field* field = result->Fetch();
                     std::string eventType = "";
                     std::string date = field[0].GetCString();
                     uint32 type = field[1].GetUInt32();
                     uint32 reqLevel = field[2].GetUInt32();

                     if (type == 0)
                         eventType = "PvP";
                     else if (type == 1)
                         eventType = "PvE";
                     else if (type == 2)
                         eventType = "Fun";
                     else
                         eventType = "Sonstiges";

                     char str_info[200];
                     sprintf(str_info,"Event Info: Datum: %s || Typ: %s || Empfohlenes Level: %u",date.c_str(),eventType.c_str(),reqLevel);
                     player->PlayerTalkClass->ClearMenus();
                     player->MonsterWhisper(str_info,player->GetGUID(),true);
                     OnGossipHello(player, creature);

                } while (result->NextRow());
            }
            else
                SendMessageToPlayer(player, creature,"Es ist zurzeit kein Event in Planung!");

        }
Exemplo n.º 14
0
    bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
    {
        player->PlayerTalkClass->ClearMenus();
        if (sender != GOSSIP_SENDER_MAIN)
            return true; // wrong sender, something fisy

        switch(action)
        {
        case 1: ChatHandler(player->GetSession()).PSendSysMessage(M_Warrior);       break;
        case 2: ChatHandler(player->GetSession()).PSendSysMessage(M_Paladin);       break;
        case 3: ChatHandler(player->GetSession()).PSendSysMessage(M_Hunter);        break;
        case 4: ChatHandler(player->GetSession()).PSendSysMessage(M_Rogue);         break;
        case 5: ChatHandler(player->GetSession()).PSendSysMessage(M_Priest);        break;
        case 6: ChatHandler(player->GetSession()).PSendSysMessage(M_Death_knight);  break;
        case 7: ChatHandler(player->GetSession()).PSendSysMessage(M_Shaman);        break;
        case 8: ChatHandler(player->GetSession()).PSendSysMessage(M_Mage);          break;
        case 9: ChatHandler(player->GetSession()).PSendSysMessage(M_Warlock);       break;
        case 11: ChatHandler(player->GetSession()).PSendSysMessage(M_Druid);        break;
        default: return true; // invalid class, something fishy
        }

        QueryResult result = CharacterDatabase.PQuery("SELECT name, totalKills FROM characters WHERE class = %u ORDER BY totalKills DESC LIMIT 5", action);
        if(result)
        {
            do
            {
                Field * fields = result->Fetch();
                std::string name = fields[0].GetString();
                uint32 totalKills = fields[1].GetUInt32();
                ChatHandler(player->GetSession()).PSendSysMessage("Name: %s, With Total Kills : %u", name.c_str(), totalKills);
            } 
            while(result->NextRow());
        }
        OnGossipHello(player, creature); // return to main menu
        return true;
    }
Exemplo n.º 15
0
	bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 sender, uint32 uiAction)
	{
		pPlayer->PlayerTalkClass->ClearMenus();
		Group * group = pPlayer->GetGroup();
		int randomPlace = urand(1, 8);

		// Dont let players use teleporter in combat
		if (pPlayer->IsInCombat())
		{
			pPlayer->Whisper("You should be out of combat!", LANG_UNIVERSAL, pPlayer);
			pPlayer->CLOSE_GOSSIP_MENU();
			return false;
		}

		switch (uiAction)
		{
		case 0: // VIP mall
			pPlayer->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Zone_Ironforge:35:35|t|cffffff00Teleport to VIP Mall", GOSSIP_SENDER_MAIN, 13, "Are you sure you want to go to VIP Mall?", 0, false);
			pPlayer->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Zone_Tanaris_01:35:35|t|cffffff00Teleport to VIP Que Island", GOSSIP_SENDER_MAIN, 14, "Are you sure you want to go to VIP Island?", 0, false);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/ICONS/ACHIEVEMENT_GUILDPERK_FASTTRACK:35:35|t|cffff0000Previous Page", GOSSIP_SENDER_MAIN, 15);
			pPlayer->SEND_GOSSIP_MENU(60020, pCreature->GetGUID());
			break;

		case 1: // Darnassus Mall
			pPlayer->TeleportTo(1, 9949.658203f, 2374.083252f, 1330.001345f, 4.731387f);
			break;

		case 1337: // Neutral Mall
			pPlayer->TeleportTo(530, 4174.775391f, 3009.921631f, 339.042175f, 3.100940f);
			break;

		case 2: // Stormwind Mall
			pPlayer->TeleportTo(0, -8850.778320f, 649.876648f, 96.325790f, 5.354052f);
			break;

		case 3: // Silvermoon Mall
			pPlayer->TeleportTo(530, 9490.633789f, -7277.810059f, 14.296535f, 5.896964f);
			break;

		case 4: // Orgrimmar Mall
			pPlayer->TeleportTo(1, 1501.500000f, -4415.439941f, 22.078300f, 0.104575f);
			break;

		case 5: // Professions Place
			pPlayer->TeleportTo(571, 5831.356445f, -3099.036133f, 300.452850f, 5.150246f);
			break;

		case 6: // Dueling Zone
			pPlayer->TeleportTo(1, 6562.940918f, -4048.786621f, 658.326782f, 1.849663f);
			break;

		case 7: // Custom Jump Event
			pPlayer->TeleportTo(1, -6933.268066f, -4905.634766f, 0.714660f, 4.703444f);
			break;
		case 72: // Custom Maze Event
			pPlayer->TeleportTo(209, -637.5766f, 622.435f, 4.79333f, 3.13651f);
			break;
		case 62: // Neutral Gear Vendor
			pPlayer->TeleportTo(530, -2720.322021f, 8336.484375f, -80.789917f, 4.708626f);
			break;

		case 8: // Random queue places as group
			if (!group) // If the player isn't in a group, then...
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You are not in group!");
				pPlayer->CLOSE_GOSSIP_MENU();
				return false;
			}

			switch (randomPlace)
			{
			case 1: // Moonglade
				pPlayer->TeleportTo(1, 7565.310059f, -2931.850098f, 466.323090f, 4.646120f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(1, 7565.310059f, -2931.850098f, 466.323090f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                     // summoner guid
					data << uint32(493);                                                    // Moonglade
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 2: // Nagrand
				pPlayer->TeleportTo(530, -632.664978f, 8638.459961f, 312.444000f, 2.385210f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(530, -632.664978f, 8638.459961f, 312.444000f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                      // summoner guid
					data << uint32(3518);                                                    // Nagrand
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                 // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 3: // Old Ironforge
				pPlayer->TeleportTo(0, -4821.729980f, -976.239014f, 464.709991f, 0.659974f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(0, -4821.729980f, -976.239014f, 464.709991f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                     // summoner guid
					data << uint32(1537);                                                   // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 4: // Ashenvale
				pPlayer->TeleportTo(1, 1786.410034f, -1240.949951f, 147.964996f, 1.537370f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(1, 1786.410034f, -1240.949951f, 147.964996f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                     // summoner guid
					data << uint32(331);                                                    // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 5: // The Barrens
				pPlayer->TeleportTo(1, -1677.339966f, -4331.270020f, 2.787450f, 2.379600f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(1, -1677.339966f, -4331.270020f, 2.787450f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                    // summoner guid
					data << uint32(17);                                                    // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);               // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 6: // Forge Camp
				pPlayer->TeleportTo(530, -1376.510010f, 9030.580078f, 53.928398f, 4.707840f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(530, -1376.510010f, 9030.580078f, 53.928398f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                      // summoner guid
					data << uint32(3518);                                                    // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                 // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 7: // Telaar
				pPlayer->TeleportTo(530, -2718.120117f, 7300.051270f, 88.628456f, 5.855799f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(530, -2718.120117f, 7300.051270f, 88.628456f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                       // summoner guid
					data << uint32(3518);                                                     // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                  // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;

			case 8: // Nagrand Arena
				pPlayer->TeleportTo(530, -2104.031982f, 6564.698730f, 5.153860f, 3.481085f);
				for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
				{

					Player * plr = itr->GetSource();

					if (!plr || !plr->GetSession())
						continue;

					if (plr->GetGUID() == pPlayer->GetGUID())
						continue;

					if (plr->IsBeingTeleported()) // If is being teleported..
						continue;

					if (plr->IsInFlight()) // Is the player in flight?
					{
						plr->GetMotionMaster()->MovementExpired();
						plr->CleanupAfterTaxiFlight();
					}
					else
						plr->SaveRecallPosition();

					plr->SetSummonPoint(530, -2104.031982f, 6564.698730f, 5.153860f);
					WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
					data << uint64(pPlayer->GetGUID());                                       // summoner guid
					data << uint32(3518);                                                     // summoner zone
					data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                  // auto decline after msecs
					plr->GetSession()->SendPacket(&data);
				}
				break;
			}
			return true;
			break;

		case 9: // Ironforge Mall
			pPlayer->TeleportTo(0, -4935.559570f, -937.766174f, 502.960754f, 5.400695f);
			break;

		case 10: // Desolace Mall
			pPlayer->TeleportTo(1, 170.343735f, 1206.189819f, 166.235794f, 2.639121f);
			break;

		case 11: // Thunder Bluff Mall
			pPlayer->TeleportTo(1, -1208.136597f, -96.185158f, 162.373642f, 1.586078f);
			break;

		case 12: // Undercity Mall
			pPlayer->TeleportTo(0, 1289.703125f, 314.571381f, -57.320896f, 1.272796f);
			break;

		case 13: // VIP Mall 
			pPlayer->TeleportTo(37, -18.558054f, 982.330017f, 348.330963f, 4.032752f); // Azshara Crater
			break;

		case 14: // VIP Island
			pPlayer->TeleportTo(1, -11810.799805f, -4754.740234f, 6.293820f, 2.159030f);
			break;

		case 15: // Main Page
			OnGossipHello(pPlayer, pCreature);
			break;

		case 16: // Arena-Queue Places
			switch (randomPlace)
			{
			case 1: pPlayer->TeleportTo(1, 7565.310059f, -2931.850098f, 466.323090f, 4.646120f); // Moonglade
				break;

			case 2: pPlayer->TeleportTo(530, -632.664978f, 8638.459961f, 312.444000f, 2.385210f); // Nagrand
				break;

			case 3: pPlayer->TeleportTo(0, -4821.729980f, -976.239014f, 464.709991f, 0.659974f); // Old Ironforge
				break;

			case 4: pPlayer->TeleportTo(1, 1786.410034f, -1240.949951f, 147.964996f, 1.537370f); // Ashenvale
				break;

			case 5: pPlayer->TeleportTo(1, -1677.339966f, -4331.270020f, 2.787450f, 2.379600f); // The Barrens
				break;

			case 6: pPlayer->TeleportTo(530, -1376.510010f, 9030.580078f, 53.928398f, 4.707840f); // Forge Camp
				break;

			case 7: pPlayer->TeleportTo(530, -2718.120117f, 7300.051270f, 88.628456f, 5.855799f); // Telaar
				break;

			case 8: pPlayer->TeleportTo(530, -2104.031982f, 6564.698730f, 5.153860f, 3.481085f); // Nagrand Arena
				break;
			}
			return true;
			break;

		case 17: // Stranglethorn Vale
			pPlayer->TeleportTo(0, -13265.961914f, 156.842224f, 35.670128f, 4.207355f);
			break;

		case 33: // ICC Dungeons - Coming Soon
			pPlayer->GetSession()->SendAreaTriggerMessage("ICC Dungeons will be available soon!");
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 18: // Transmogrification Place
			pPlayer->TeleportTo(571, 5773.749512f, 641.840881f, 562.136536f, 4.794876f);
			break;

		case 19: // Hunter's Tame Pet Zone
			pPlayer->TeleportTo(0, -11196.299805f, -2196.830078f, 20.282400f, 6.186680f);
			pPlayer->GetSession()->SendAreaTriggerMessage("Only hunters can see the menu Hunter's Tame Pet Zone in the teleporter.");
			break;

		case 20: // Buffs
			//pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Reputation_AshtongueDeathsworn:35:35|t|cff0000ffNative Morphs", GOSSIP_SENDER_MAIN, 21);
			//pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Reputation_KirinTor:35:35|t|cff0000ffGive me buffs", GOSSIP_SENDER_MAIN, 22);
			pPlayer->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_General_StayClassy:35:35|t|cff0000ffReset my talents", GOSSIP_SENDER_MAIN, 31, "Are you sure you want to reset your talent points?", 0, false);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/ICONS/Ability_Mage_NetherWindPresence:35:35|t|cffff0000Previous Page", GOSSIP_SENDER_MAIN, 15);
			pPlayer->SEND_GOSSIP_MENU(60022, pCreature->GetGUID());
			break;

		case 21: // Native morphs
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Tauren_Male:35:35|t|cff0000ffTauren Female", GOSSIP_SENDER_MAIN, 23);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Tauren_Female:35:35|t|cff0000ffTauren Male", GOSSIP_SENDER_MAIN, 24);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Gnome_Female:35:35|t|cff0000ffGnome Female", GOSSIP_SENDER_MAIN, 25);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Gnome_Male:35:35|t|cff0000ffGnome Male", GOSSIP_SENDER_MAIN, 26);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Bloodelf_Female:35:35|t|cff0000ffBlood Elf Female", GOSSIP_SENDER_MAIN, 27);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Bloodelf_Male:35:35|t|cff0000ffBlood Elf Male", GOSSIP_SENDER_MAIN, 28);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Human_Female:35:35|t|cff0000ffHuman Female", GOSSIP_SENDER_MAIN, 29);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Character_Human_Male:35:35|t|cff0000ffHuman Male", GOSSIP_SENDER_MAIN, 30);
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/ICONS/ACHIEVEMENT_GUILDPERK_FASTTRACK:35:35|t|cffff0000Previous Page", GOSSIP_SENDER_MAIN, 20);
			pPlayer->SEND_GOSSIP_MENU(60021, pCreature->GetGUID());
			break;



		case 22: // Buff
			pPlayer->CastSpell(pPlayer, 48102, true); // Stamina
			pPlayer->CastSpell(pPlayer, 48073, true); // Divine Spirit
			pPlayer->CastSpell(pPlayer, 48169, true); // Shadow Protection
			pPlayer->CastSpell(pPlayer, 48161, true); // PW:F
			pPlayer->CastSpell(pPlayer, 20217, true); // Blessing of Kings
			pPlayer->CastSpell(pPlayer, 42995, true); // Arcane Intellect
			pPlayer->CastSpell(pPlayer, 48469, true); // Mark of the Wild
			pPlayer->CLOSE_GOSSIP_MENU();
			break;
		case 23: // Tauren Female
			pCreature->CastSpell(pPlayer, 37811, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 24: // Tauren Male
			pCreature->CastSpell(pPlayer, 37810, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 25: // Gnome Female
			pCreature->CastSpell(pPlayer, 37809, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 26: // Gnome Male
			pCreature->CastSpell(pPlayer, 37808, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 27: // Blood Elf Female
			pCreature->CastSpell(pPlayer, 37806, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 28: // Blood Elf Male
			pCreature->CastSpell(pPlayer, 37807, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 29: // Human Female
			pCreature->CastSpell(pPlayer, 37805, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 30: // Human Male
			pCreature->CastSpell(pPlayer, 35466, true);
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 31: // Reset talents
			pPlayer->ResetTalents(true);
			pPlayer->SendTalentsInfoData(false);
			pPlayer->GetSession()->SendAreaTriggerMessage("Your talents has been reset.");
			pPlayer->CastSpell(pPlayer, 24222, true);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 35: // Ravenholdt Manor Mall
			pPlayer->TeleportTo(0, 1.827456f, -1620.976807f, 196.651855f, 1.151698f);
			break;

		case 36: // Dueling Zone (Ravenholdt Manor Mall)
			pPlayer->TeleportTo(0, 70.579247f, -1506.760986f, 174.295914f, 4.210823f);
			break;

		case 40: // Already in zone
			pPlayer->GetSession()->SendAreaTriggerMessage("You're already in this zone!");
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 41: // Already in Dueling zone / Mall
			pPlayer->GetSession()->SendAreaTriggerMessage("You're already in Dueling Zone! It's just outside.");
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 42: // you're not a hunter
			pPlayer->GetSession()->SendAreaTriggerMessage("You're not a hunter!");
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 43: // Goldenmist Village - Alliance
			pPlayer->TeleportTo(530, 7739.864258f, -6075.500488f, 19.238945f, 6.100757f);
			break;

		case 44: // Goldenmist Village - Horde
			pPlayer->TeleportTo(530, 8001.195801f, -6227.183105f, 22.003067f, 2.688986f);
			break;

		case 45: // Dueling Zone (AT)
			pPlayer->TeleportTo(1, 5210.732422f, -4815.695313f, 701.046265f, 0.678023f);
			break;

		case 46: // Nagrand Arena
			pPlayer->TeleportTo(530, -2104.031982f, 6564.698730f, 5.153860f, 3.481085f);
			break;

		case 47: // Elwynn Forest
			pPlayer->TeleportTo(0, -9103.945313f, 407.655640f, 92.646919f, 3.781690f);
			break;

		case 48: // Durotar
			pPlayer->TeleportTo(1, 1359.506348f, -4369.427246f, 26.164385f, 3.450796f);
			break;

		case 49: // Raid for Orgrimmar
		{
			if (!group) // If the player isn't in a group, then...
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You are not in group!");
				pPlayer->CLOSE_GOSSIP_MENU();
				return false;
			}

			pPlayer->TeleportTo(1, 1076.446167f, -4380.293945f, 21.868385f, 3.140767f);
			for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
			{

				Player * plr = itr->GetSource();

				if (!plr || !plr->GetSession())
					continue;

				if (plr->GetGUID() == pPlayer->GetGUID())
					continue;

				if (plr->IsBeingTeleported()) // If is being teleported..
					continue;

				if (plr->IsInFlight()) // Is the player in flight?
				{
					plr->GetMotionMaster()->MovementExpired();
					plr->CleanupAfterTaxiFlight();
				}
				else
					plr->SaveRecallPosition();

				plr->SetSummonPoint(1, 1076.446167f, -4380.293945f, 21.868385f);
				WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
				data << uint64(pPlayer->GetGUID());                                       // summoner guid
				data << uint32(14);                                                       // summoner zone
				data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                  // auto decline after msecs
				plr->GetSession()->SendPacket(&data);
				std::string msg = "";
				msg += "|cffff6060[CITY WAR] ";
				msg += "|cfffaeb00The Alliance are raiding Orgrimmar! Defend Orgrimmar!";

				sWorld->SendServerMessage(SERVER_MSG_STRING, msg.c_str(), plr);
			}
		}
		break;

		case 50: // Raid for Stormwind
		{
			if (!group) // If the player isn't in a group, then...
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You are not in group!");
				pPlayer->CLOSE_GOSSIP_MENU();
				return false;
			}

			pPlayer->TeleportTo(0, -9533.540039f, 98.611000f, 58.882198f, 1.858551f);
			for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
			{

				Player * plr = itr->GetSource();

				if (!plr || !plr->GetSession())
					continue;

				if (plr->GetGUID() == pPlayer->GetGUID())
					continue;

				if (plr->IsBeingTeleported()) // If is being teleported..
					continue;

				if (plr->IsInFlight()) // Is the player in flight?
				{
					plr->GetMotionMaster()->MovementExpired();
					plr->CleanupAfterTaxiFlight();
				}
				else
					plr->SaveRecallPosition();

				plr->SetSummonPoint(0, -9533.540039f, 98.611000f, 58.882198f);
				WorldPacket data(SMSG_SUMMON_REQUEST, 8 + 4 + 4);
				data << uint64(pPlayer->GetGUID());                                       // summoner guid
				data << uint32(12);                                                       // summoner zone
				data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS);                  // auto decline after msecs
				plr->GetSession()->SendPacket(&data);
				std::string msg = "";
				msg += "|cffff6060[CITY WAR] ";
				msg += "|cfffaeb00The Horde are raiding Stormwind! Defend Stormwind!";

				sWorld->SendServerMessage(SERVER_MSG_STRING, msg.c_str(), plr);
			}
		}
		break;
		}
		return true;
	}
Exemplo n.º 16
0
    bool OnGossipSelect(Player* player, Creature* me, uint32 /*uiSender*/, uint32 uiAction)
    {
        if(!player || !me)
            return true;

        player->PlayerTalkClass->ClearMenus();

        switch (uiAction)
        {
        case 1: // Create new Arenateam
        {
            if (sWorld->getIntConfig(CONFIG_SOLO_3V3_MIN_LEVEL) <= player->getLevel())
            {
                if (player->GetMoney() >= sWorld->getIntConfig(CONFIG_SOLO_3V3_COSTS) && CreateArenateam(player, me))
                    player->ModifyMoney(sWorld->getIntConfig(CONFIG_SOLO_3V3_COSTS) * -1);
            }
            else
            {
                ChatHandler(player->GetSession()).PSendSysMessage("You need level %u+ to create an arena team.", sWorld->getIntConfig(CONFIG_SOLO_3V3_MIN_LEVEL));
                player->CLOSE_GOSSIP_MENU();
                return true;
            }
        }
        break;

        case 2: // 3v3 Join Queue Arena (rated)
        {
            // check Deserter debuff
            if (player->HasAura(26013) &&
                    (sWorld->getBoolConfig(CONFIG_SOLO_3V3_CAST_DESERTER_ON_AFK) || sWorld->getBoolConfig(CONFIG_SOLO_3V3_CAST_DESERTER_ON_LEAVE)))
            {
                WorldPacket data;
                sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
                player->GetSession()->SendPacket(&data);
            }
            else if (ArenaCheckFullEquipAndTalents(player)
                     && JoinQueueArena(player, me, true, ARENA_TYPE_3v3_SOLO) == false)
                ChatHandler(player->GetSession()).SendSysMessage("Something went wrong while joining queue. Already in another queue?");

            player->CLOSE_GOSSIP_MENU();
            return true;
        }

        case 20: // 1v1 Join Queue Arena (rated)
        {
            if (ArenaCheckFullEquipAndTalents(player) && Arena1v1CheckTalents(player)
                    && JoinQueueArena(player, me, true, ARENA_TYPE_5v5) == false)
                ChatHandler(player->GetSession()).SendSysMessage("Something went wrong while joining queue. Already in another queue?");

            player->CLOSE_GOSSIP_MENU();
            return true;
        }

        case 3: // Leave Queue
        {
            uint8 arenaType = ARENA_TYPE_5v5;
            if (player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_3v3_SOLO))
                arenaType = ARENA_TYPE_3v3_SOLO;

            WorldPacket Data;
            Data << arenaType << (uint8)0x0 << (uint32)BATTLEGROUND_AA << (uint16)0x0 << (uint8)0x0;
            player->GetSession()->HandleBattleFieldPortOpcode(Data);
            player->CLOSE_GOSSIP_MENU();
            return true;
        }
        }

        OnGossipHello(player, me);
        return true;
    }
Exemplo n.º 17
0
	void SendDefaultMenu(Player * player, Creature * creature, uint32 action) {
	
		if (player->isInCombat()) {
			player->CLOSE_GOSSIP_MENU();
			creature->MonsterSay("You cannot teleport while in combat!", LANG_UNIVERSAL, NULL);
			return;
		}
		
		switch(action) {
			// Alliance Zones
			case 1000:
				player->ADD_GOSSIP_ITEM(5, "Alliance Mall"			, GOSSIP_SENDER_MAIN, 1001);
				player->ADD_GOSSIP_ITEM(5, "Stonehearth Outpost"	, GOSSIP_SENDER_MAIN, 1002);
				player->ADD_GOSSIP_ITEM(7, "<--- Main Menu"			, GOSSIP_SENDER_MAIN,10000);
				
				player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
				break;
			// Horde Zones
			case 2000:
				player->ADD_GOSSIP_ITEM(5, "Horde Mall"				, GOSSIP_SENDER_MAIN, 2001);
				player->ADD_GOSSIP_ITEM(5, "Icebrook Garrison"		, GOSSIP_SENDER_MAIN, 2002);
				player->ADD_GOSSIP_ITEM(7, "<--- Main Menu"			, GOSSIP_SENDER_MAIN,10000);
				
				player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
				break;
			// Custom Raids
			case 3000:
				player->ADD_GOSSIP_ITEM(5, "Vault of Archavon"		, GOSSIP_SENDER_MAIN, 3001);
				player->ADD_GOSSIP_ITEM(5, "Icecrown Citadel"		, GOSSIP_SENDER_MAIN, 3002);
				//player->ADD_GOSSIP_ITEM(5, "Black Temple"			, GOSSIP_SENDER_MAIN, 3003);
				player->ADD_GOSSIP_ITEM(7, "<--- Main Menu"			, GOSSIP_SENDER_MAIN,10000);
				
				player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
				break;
			//Back To Main Menu
			case 10000: 
				player->PlayerTalkClass->ClearMenus();
				OnGossipHello(player, creature);
				break;
				
			/**********************************************************************************
			**************************** TELEPORT LOCATIONS ***********************************
			***********************************************************************************/
			// Alliance Mall
			case 1001:
				player->CLOSE_GOSSIP_MENU();
				player->TeleportTo(30, 649.434f, -32.0796f, 47.3273f, 0.30832f);
				break;
			// Stonehearth Outpost
			case 1002:
				player->CLOSE_GOSSIP_MENU();
				player->TeleportTo(30, -40.597f, -290.509f, 15.078f, 6.134f);
				break;
			// Horde Mall
			case 2001:
				player->CLOSE_GOSSIP_MENU();
				player->TeleportTo(30, -1362.040f, -244.417f, 99.360f, 5.067f);
				break;
			// Iceblood Garrison
			case 2002:
				player->CLOSE_GOSSIP_MENU();
				player->TeleportTo(30, -539.796f, -166.206f, 57.011f, 5.554f);
				break;
			// Event Area
			case 4000:
				player->CLOSE_GOSSIP_MENU();
				player->TeleportTo(1, -11366.700f, -4729.959f, 5.028760f, 3.296f);
				break;
				
		}
	}
Exemplo n.º 18
0
	bool OnGossipSelect(Player *player, Creature *creature, uint32 sender, uint32 action )
		{
		  if (!player->getAttackers().empty())
	{
		creature->MonsterWhisper(MSG_ERR_INCOMBAT, player->GetGUID());
		player->CLOSE_GOSSIP_MENU();
        return false;
		  }

		  switch (action)
	{
		 case 2:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(144);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 3:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(62);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 4:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(135);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 5:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(141);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 6:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(138);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 7:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(170);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 8:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(28);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 9:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(48);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 10:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(134);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 11:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(72);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 12:
			   player->PlayerTalkClass->ClearMenus();
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_42, GOSSIP_SENDER_MAIN, 13);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_113, GOSSIP_SENDER_MAIN, 14);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_147, GOSSIP_SENDER_MAIN, 15);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_143, GOSSIP_SENDER_MAIN, 16);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_79, GOSSIP_SENDER_MAIN, 17);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_64, GOSSIP_SENDER_MAIN, 18);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_43, GOSSIP_SENDER_MAIN, 19);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_80, GOSSIP_SENDER_MAIN, 20);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_47, GOSSIP_SENDER_MAIN, 21);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_122, GOSSIP_SENDER_MAIN, 22);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_BACK_1, GOSSIP_SENDER_MAIN, 56);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_NEXT_3, GOSSIP_SENDER_MAIN, 23);
			   player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
			   break;
		 case 13:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(42);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 14:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(113);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 15:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(147);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 16:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(143);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 17:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(79);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 18:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(64);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 19:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(43);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 20:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(80);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 21:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(47);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 22:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(122);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 23:
			   player->PlayerTalkClass->ClearMenus();
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_81, GOSSIP_SENDER_MAIN, 24);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_78, GOSSIP_SENDER_MAIN, 25);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_156, GOSSIP_SENDER_MAIN, 26);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_83, GOSSIP_SENDER_MAIN, 27);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_71, GOSSIP_SENDER_MAIN, 28);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_142, GOSSIP_SENDER_MAIN, 29);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_146, GOSSIP_SENDER_MAIN, 30);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_150, GOSSIP_SENDER_MAIN, 31);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_46, GOSSIP_SENDER_MAIN, 32);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_278, GOSSIP_SENDER_MAIN, 33);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_BACK_2, GOSSIP_SENDER_MAIN, 57);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_NEXT_4, GOSSIP_SENDER_MAIN, 34);
			   player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
			   break;
		 case 24:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(81);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 25:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(78);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 26:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(156);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 27:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(83);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 28:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(71);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 29:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(142);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 30:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(146);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 31:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(150);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 32:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(46);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 33:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(278);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 34:
			   player->PlayerTalkClass->ClearMenus();
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_139, GOSSIP_SENDER_MAIN, 35);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_77, GOSSIP_SENDER_MAIN, 36);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_74, GOSSIP_SENDER_MAIN, 37);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_45, GOSSIP_SENDER_MAIN, 38);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_177, GOSSIP_SENDER_MAIN, 39);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_151, GOSSIP_SENDER_MAIN, 40);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_171, GOSSIP_SENDER_MAIN, 41);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_131, GOSSIP_SENDER_MAIN, 42);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_173, GOSSIP_SENDER_MAIN, 43);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_157, GOSSIP_SENDER_MAIN, 44);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_BACK_3, GOSSIP_SENDER_MAIN, 58);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_NEXT_5, GOSSIP_SENDER_MAIN, 45);
			   player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
			   break;
		 case 35:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(139);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 36:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(77);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 37:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(74);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 38:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(45);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 39:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(177);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 40:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(151);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 41:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(171);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 42:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(131);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 43:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(173);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 44:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(157);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 45:
			   player->PlayerTalkClass->ClearMenus();
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_75, GOSSIP_SENDER_MAIN, 46);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_140, GOSSIP_SENDER_MAIN, 47);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_172, GOSSIP_SENDER_MAIN, 48);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_124, GOSSIP_SENDER_MAIN, 49);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_133, GOSSIP_SENDER_MAIN, 50);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_76, GOSSIP_SENDER_MAIN, 51);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_125, GOSSIP_SENDER_MAIN, 52);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_145, GOSSIP_SENDER_MAIN, 53);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_155, GOSSIP_SENDER_MAIN, 54);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, MSG_GOSSIP_TEXT_84, GOSSIP_SENDER_MAIN, 55);
			   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, MSG_GOSSIP_TEXT_BACK_4, GOSSIP_SENDER_MAIN, 59);
			   player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,creature->GetGUID());
			   break;
		 case 46:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(75);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 47:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(140);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		case 48:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(172);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 49:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(124);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
	     case 50:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(133);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 51:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(125);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 52:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(76);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 53:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(145);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 54:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(155);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 55:
			   {CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(84);
			   AddTitle(player, creature, titleInfo);
			   }
			   break;
		 case 56:
			 OnGossipHello(player, creature);
			   break;
		 case 57:
			 OnGossipSelect(player, creature, sender, 12);
			 break;
		 case 58:
			 OnGossipSelect(player, creature, sender, 23);
			 break;
		 case 59:
			 OnGossipSelect(player, creature, sender, 34);
			 break;
}
	
		  return true;
	}
Exemplo n.º 19
0
 void ReturnToMainMenu(Player* player, Creature* creature)
 {
    player->PlayerTalkClass->ClearMenus();
    OnGossipHello(player, creature);
 }
Exemplo n.º 20
0
        bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
        {
			player->PlayerTalkClass->ClearMenus();
			Item * item;

            switch (action)
            {
				case 15:
			{
				player->PlayerTalkClass->SendCloseGossip();
				break;
			}
                case 1: // Enchant Weapon
					player->ADD_GOSSIP_ITEM(5, "Bloody Dancing Steel", GOSSIP_SENDER_MAIN, 5000);
					player->ADD_GOSSIP_ITEM(5, "Power Torrent - 500 int Proc", GOSSIP_SENDER_MAIN, 100);
					player->ADD_GOSSIP_ITEM(5, "Hurricane - 450 Haste Proc", GOSSIP_SENDER_MAIN, 103);
					player->ADD_GOSSIP_ITEM(5, "Pyrium Weapon Chain 50% reduc on disarm/40 hit Proc", GOSSIP_SENDER_MAIN, 104);
					player->ADD_GOSSIP_ITEM(5, "Landslide - 1000 AP Proc", GOSSIP_SENDER_MAIN, 105);
					player->ADD_GOSSIP_ITEM(5, "Avalanch - 463 - 537 Nature Damage", GOSSIP_SENDER_MAIN, 106);
					player->ADD_GOSSIP_ITEM(5, "Heartsong 200 Spirit Proc", GOSSIP_SENDER_MAIN, 107);
					player->ADD_GOSSIP_ITEM(5, "Mending - Heals player upon melee", GOSSIP_SENDER_MAIN, 108);
					player->ADD_GOSSIP_ITEM(5, "Windwalk - 600 Dodge/15% speed Proc", GOSSIP_SENDER_MAIN, 109);
					player->ADD_GOSSIP_ITEM(5, "Blade Ward - +200 Parry 600-800 Dmg Parry Proc", GOSSIP_SENDER_MAIN, 914);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
                    player->PlayerTalkClass->SendGossipMenu(100002, creature->GetGUID());
					break;
				case 2: // Enchant Off-Hand
					if (item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
					{
						if (ItemTemplate const* iInfo = item->GetTemplate())
						{
							if ((iInfo->SubClass == ITEM_SUBCLASS_WEAPON_AXE || iInfo->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER || ITEM_SUBCLASS_WEAPON_WAND ||
								iInfo->SubClass == ITEM_SUBCLASS_WEAPON_MACE || iInfo->SubClass == ITEM_SUBCLASS_WEAPON_SWORD) && iInfo->Class == ITEM_CLASS_WEAPON)
							{
								player->ADD_GOSSIP_ITEM(5, "Heartsong - 200 Spirit Proc", GOSSIP_SENDER_MAIN, 1341);
								player->ADD_GOSSIP_ITEM(5, "Mending Heals player upon melee", GOSSIP_SENDER_MAIN, 1084);
								player->ADD_GOSSIP_ITEM(5, "Windwalk - 600 Dodge/15% speed Proc", GOSSIP_SENDER_MAIN, 1094);
								player->ADD_GOSSIP_ITEM(5, "Pyrium Weapon Chain 50% reduc on disarm/40 hit Proc", GOSSIP_SENDER_MAIN, 1238);
								player->ADD_GOSSIP_ITEM(5, "Hurricane - 450 Haste Proc", GOSSIP_SENDER_MAIN, 1233);
								player->ADD_GOSSIP_ITEM(5, "Avalanch - 463 - 537 Nature Damage", GOSSIP_SENDER_MAIN, 1789);
								player->ADD_GOSSIP_ITEM(5, "Power Torrent - 500 int Proc", GOSSIP_SENDER_MAIN, 1743);
								player->ADD_GOSSIP_ITEM(5, "Landslide - 1000 AP Proc", GOSSIP_SENDER_MAIN, 1333);
								player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
								player->SEND_GOSSIP_MENU(100002, creature->GetGUID());
							}
							else
							{
								ChatHandler(player->GetSession()).PSendSysMessage("Your off-hand cannot be enchanted");
								OnGossipHello(player, creature);
							}
						}
					}
					else
					{
						ChatHandler(player->GetSession()).PSendSysMessage("You don't have an offhand!");
						OnGossipHello(player, creature);
					}
					break;


				case 3: // Enchant Caster Off-Hand
					player->ADD_GOSSIP_ITEM(5, "Intellect - +40", GOSSIP_SENDER_MAIN, 543);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100003, creature->GetGUID());
					break;

                case 4: // Enchant Shield
					player->ADD_GOSSIP_ITEM(5, "+160 Armor", GOSSIP_SENDER_MAIN, 110);
					player->ADD_GOSSIP_ITEM(5, "+12 PvP Resilience", GOSSIP_SENDER_MAIN, 111);
					player->ADD_GOSSIP_ITEM(5, "Mastery - +50", GOSSIP_SENDER_MAIN, 915);
					player->ADD_GOSSIP_ITEM(5, "Stamina - +18", GOSSIP_SENDER_MAIN, 916);
					player->ADD_GOSSIP_ITEM(5, "Intellect - +40", GOSSIP_SENDER_MAIN, 946);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100004, creature->GetGUID());
					break;

                case 6: // Enchant Cloak
					player->ADD_GOSSIP_ITEM(5, "Intellect +50", GOSSIP_SENDER_MAIN, 142);
					player->ADD_GOSSIP_ITEM(5, "+250 Armor", GOSSIP_SENDER_MAIN, 114);
					player->ADD_GOSSIP_ITEM(5, "+65 Critical Strike", GOSSIP_SENDER_MAIN, 115);
					player->ADD_GOSSIP_ITEM(5, "Haste - +23", GOSSIP_SENDER_MAIN, 136);
					player->ADD_GOSSIP_ITEM(5, "Spell Penetration - +70", GOSSIP_SENDER_MAIN, 139);
					player->ADD_GOSSIP_ITEM(5, "Defense Rating - +16", GOSSIP_SENDER_MAIN, 137);
					player->ADD_GOSSIP_ITEM(5, "Spirit - +10", GOSSIP_SENDER_MAIN, 138);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
                    player->PlayerTalkClass->SendGossipMenu(100007, creature->GetGUID());
					break;

				case 7: //Enchant chest
					player->ADD_GOSSIP_ITEM(5, "+75 Stamina", GOSSIP_SENDER_MAIN, 116);
					player->ADD_GOSSIP_ITEM(5, "Resil +40", GOSSIP_SENDER_MAIN, 117);
					player->ADD_GOSSIP_ITEM(5, "All stats - +20", GOSSIP_SENDER_MAIN, 118);
					player->ADD_GOSSIP_ITEM(5, "Spirit - +40", GOSSIP_SENDER_MAIN, 451);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100008, creature->GetGUID());
					break;

				case 8: //Enchant Bracers
					player->ADD_GOSSIP_ITEM(5, "Intellect +50", GOSSIP_SENDER_MAIN, 119);
					player->ADD_GOSSIP_ITEM(5, "Spirit - +50", GOSSIP_SENDER_MAIN, 120);
					player->ADD_GOSSIP_ITEM(5, "Strength - +50", GOSSIP_SENDER_MAIN, 121);
					player->ADD_GOSSIP_ITEM(5, "Agility - +50", GOSSIP_SENDER_MAIN, 122);
					player->ADD_GOSSIP_ITEM(5, "Haste - +65", GOSSIP_SENDER_MAIN, 900);
					player->ADD_GOSSIP_ITEM(5, "Expertise - +50", GOSSIP_SENDER_MAIN, 901);
					player->ADD_GOSSIP_ITEM(5, "Hit Rating - +50", GOSSIP_SENDER_MAIN, 902);
					player->ADD_GOSSIP_ITEM(5, "Crit - +65", GOSSIP_SENDER_MAIN, 903);
					player->ADD_GOSSIP_ITEM(5, "Dodge - +50", GOSSIP_SENDER_MAIN, 904);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100009, creature->GetGUID());
					break;

				case 9: //Enchant Gloves
					player->ADD_GOSSIP_ITEM(5, "Major Agility - +20", GOSSIP_SENDER_MAIN, 123);
					player->ADD_GOSSIP_ITEM(5, "Attack Power - +44", GOSSIP_SENDER_MAIN, 124);
					player->ADD_GOSSIP_ITEM(5, "Hit Rating - +20", GOSSIP_SENDER_MAIN, 125);
					player->ADD_GOSSIP_ITEM(5, "Haste +50", GOSSIP_SENDER_MAIN, 126);
					player->ADD_GOSSIP_ITEM(5, "Spellpower - +28", GOSSIP_SENDER_MAIN, 127);
					player->ADD_GOSSIP_ITEM(5, "Expertise Rating - +50", GOSSIP_SENDER_MAIN, 128);
					player->ADD_GOSSIP_ITEM(5, "Mastery +65", GOSSIP_SENDER_MAIN, 129);
					player->ADD_GOSSIP_ITEM(5, "Strength +50", GOSSIP_SENDER_MAIN, 141);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100010, creature->GetGUID());
					break;

				case 11: //Enchant feet
					player->ADD_GOSSIP_ITEM(5, "+25 Agility and Minor Movement Speed", GOSSIP_SENDER_MAIN, 130);
					player->ADD_GOSSIP_ITEM(5, "+50 Hit", GOSSIP_SENDER_MAIN, 131);
					player->ADD_GOSSIP_ITEM(5, "+35 Mastery and Minor Movement ", GOSSIP_SENDER_MAIN, 132);
					player->ADD_GOSSIP_ITEM(5, "+50 Mastery", GOSSIP_SENDER_MAIN, 133);
					player->ADD_GOSSIP_ITEM(5, "+30 Stamina and Minor Movement Speed", GOSSIP_SENDER_MAIN, 134);
					player->ADD_GOSSIP_ITEM(5, "Agility +35", GOSSIP_SENDER_MAIN, 917);
					player->ADD_GOSSIP_ITEM(5, "Haste +50", GOSSIP_SENDER_MAIN, 918);
					player->ADD_GOSSIP_ITEM(1, "<-Back", GOSSIP_SENDER_MAIN, 300);
					player->PlayerTalkClass->SendGossipMenu(100012, creature->GetGUID());
					break;

					case 100:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_POWER);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


					case 1743:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_POWER);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
                case 102:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_2HWEAPON)
					{
						Enchant(player, item, ENCHANT_WEP_AGILITY);
						player->PlayerTalkClass->SendCloseGossip();
						break;

					}
					ChatHandler(player->GetSession()).PSendSysMessage("You do not have a 2H weapon equipped!");
					break;
					
                case 103:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_HURRICANE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 1233:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_HURRICANE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
                case 104:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_PYRIUM);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

			   case 1238:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_PYRIUM);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
                case 105:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_MAJOR_LAND);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 1333:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_MAJOR_LAND);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
                case 106:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_AVALANCH);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 1789:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_AVALANCH);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
                case 107:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_HEARTSON);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

			    case 1341:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_HEARTSON);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

                case 108:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_MENDING);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 1084:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_MENDING);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 109:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_WINDWALK);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;


				case 1094:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_WINDWALK);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

					
                case 914:
                    Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BLADE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 119:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_SPELL_INTELLECT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 120:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_SPIRIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 121:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_STRENGTH);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 122:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_AGILITY);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 900:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_SPEED);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 901:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_EXPERTISE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 902:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_PRECISION);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 903:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_CRIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

				case 904:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_WRIST_DODGE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 110:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_ARMOR);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}


				case 946:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_INT);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}

					
				case 111:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_RESILIENCE);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}
					
				case 915:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_MASTERY);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}



					case 543:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_HOLDABLE)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_WEP_INTELLECT);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}
					
				case 916:
					item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
					if (!item)
						break;

					if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD)
					{
						Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_STAM);
						player->PlayerTalkClass->SendCloseGossip();
						break;
					}
				case 142:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_INTELLECT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 114:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_STAMINA);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 115:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_STRIKE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 136:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_HASTE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 139:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SPELL_PEN);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 137:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_DEF);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 138:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SPIRIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 116:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_HEALTH);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 117:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_RESILIENCE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 118:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_STATS);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 451:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_SPIRIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 130:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_AGISPEED);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 131:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_HIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 132:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_MASPEED);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 133:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_MASTERY);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 134:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_STAMSPEED);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 917:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_AGI);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 918:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_HASTE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 123:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_AGILITY);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 124:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_ATTACK);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 125:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_HIT);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 126:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_HASTE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 127:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_SPELLPOWER);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 128:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_EXPERTISE);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 129:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_MASTERY);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
					
				case 141:
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_STRENGTH);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;
				case 300: //<-Back menu
					{
						player->ADD_GOSSIP_ITEM(1, "Enchant Weapon", GOSSIP_SENDER_MAIN, 1);
						player->ADD_GOSSIP_ITEM(1, "Enchant Off-Hand Weapon", GOSSIP_SENDER_MAIN, 13);
						player->ADD_GOSSIP_ITEM(1, "Enchant 2H Weapon", GOSSIP_SENDER_MAIN, 2);
						player->ADD_GOSSIP_ITEM(1, "Enchant Shield", GOSSIP_SENDER_MAIN, 3);
						player->ADD_GOSSIP_ITEM(1, "Enchant Head", GOSSIP_SENDER_MAIN, 4);
						player->ADD_GOSSIP_ITEM(1, "Enchant Shoulders", GOSSIP_SENDER_MAIN, 5);
						player->ADD_GOSSIP_ITEM(1, "Enchant Cloak", GOSSIP_SENDER_MAIN, 6);
						player->ADD_GOSSIP_ITEM(1, "Enchant Chest", GOSSIP_SENDER_MAIN, 7);
						player->ADD_GOSSIP_ITEM(1, "Enchant Bracers", GOSSIP_SENDER_MAIN, 8);
						player->ADD_GOSSIP_ITEM(1, "Enchant Gloves", GOSSIP_SENDER_MAIN, 9);
						player->ADD_GOSSIP_ITEM(1, "Enchant Legs", GOSSIP_SENDER_MAIN, 10);
						player->ADD_GOSSIP_ITEM(1, "Enchant Feet", GOSSIP_SENDER_MAIN, 11);

						if (player->HasSkill(SKILL_ENCHANTING) && player->GetSkillValue(SKILL_ENCHANTING) == 450)
						{
							player->ADD_GOSSIP_ITEM(1, "Enchant Rings", GOSSIP_SENDER_MAIN, 12);
						}


						player->PlayerTalkClass->SendGossipMenu(100001, creature->GetGUID());
						return true;
					}
						break;

				case 400: //Remove enchant for mainhand
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 401: //Remove enchant for offhand
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 402: //Remove enchant for head
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 403: //Remove enchant for shoulders
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 404: //remove enchant for cloak
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 405: //remove enchant for chest
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 406: //remove enchant for bracers
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 407: //remove enchant for gloves
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 408: //remove enchant for legs
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 409: //remove enchant for feet
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 410:
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER1));
					RemoveEnchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER2));
					player->PlayerTalkClass->SendCloseGossip();
					break;

				case 5000: // Bloody Dancing Steel
					Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BLOODY_DANCING_STEEL);
                    player->PlayerTalkClass->SendCloseGossip();
                    break;

			}
			
			return true;
        }
Exemplo n.º 21
0
	bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 sender, uint32 uiAction)
	{
		QueryResult select = LoginDatabase.PQuery("SELECT dp, vp FROM fusioncms_new.account_data WHERE id = '%u'", pPlayer->GetSession()->GetAccountId());

		pPlayer->PlayerTalkClass->ClearMenus();

		if (!select)
		{
			pPlayer->GetSession()->SendAreaTriggerMessage("You don't have any vote or donation points. Please vote/donate first at: http://battlearenas.no-ip.org");
			pPlayer->CLOSE_GOSSIP_MENU();
			return false;
		}

		Field* fields = select->Fetch();
		uint32 dp = fields[0].GetUInt32();
		uint32 vp = fields[1].GetUInt32();

		// If player is not owner and donate points are higher than 25...
		if (pPlayer->GetSession()->GetSecurity() < 5 && dp > 25)
		{
			pPlayer->GetSession()->SendAreaTriggerMessage("You have large amount of Donation points: %u. This is probably a website related problem, please immediately contact the administrator via ticket about this issue.", dp);
			pPlayer->CLOSE_GOSSIP_MENU();
			return false;
		}

		switch(uiAction)
		{
		case 0:
			if (dp < 1)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase one Donation Token (1 DP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (dp >= 1)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase one Donation Token (1 DP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 2);

			if (dp < 5)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase VIP only for this character (5 DP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (dp >= 5)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase VIP only for this character (5 DP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 25);

			if (dp < 20)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase VIP Account upgrade (20 DP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (dp >= 20)
				pPlayer->ADD_GOSSIP_ITEM(4, "Purchase VIP Account upgrade (20 DP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 4);

			pPlayer->ADD_GOSSIP_ITEM(4, "Exchange Donation Points for Titles..", GOSSIP_SENDER_MAIN, 8);
			pPlayer->ADD_GOSSIP_ITEM(4, "Back to Main Page", GOSSIP_SENDER_MAIN, 26);
			pPlayer->SEND_GOSSIP_MENU(60011, pCreature->GetGUID());
			break;

		case 1:
			if (vp < 50)
				pPlayer->ADD_GOSSIP_ITEM(4, "BattleArenas Donation Pack I (50 VP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (vp >= 50)
				pPlayer->ADD_GOSSIP_ITEM(4, "BattleArenas Donation Pack I (50 VP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 29);

			if (vp < 100)
				pPlayer->ADD_GOSSIP_ITEM(4, "BattleArenas Donation Pack II (100 VP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (vp >= 100)
				pPlayer->ADD_GOSSIP_ITEM(4, "BattleArenas Donation Pack II (100 VP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 30);

			if (vp < 150)
				pPlayer->ADD_GOSSIP_ITEM(4, "Wrathful Gladiator's Tabard (150 VP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (vp >= 150)
				pPlayer->ADD_GOSSIP_ITEM(4, "Wrathful Gladiator's Tabard (150 VP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 3);

			if (vp < 100)
				pPlayer->ADD_GOSSIP_ITEM(4, "Relentless Gladiator's Tabard (100 VP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (vp >= 100)
				pPlayer->ADD_GOSSIP_ITEM(4, "Relentless Gladiator's Tabard (100 VP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 5);

			if (vp < 50)
				pPlayer->ADD_GOSSIP_ITEM(4, "Furious Gladiator's Tabard (50 VP - |cffD80000Locked|r).", GOSSIP_SENDER_MAIN, 31);
			else if (vp >= 50)
				pPlayer->ADD_GOSSIP_ITEM(4, "Furious Gladiator's Tabard (50 VP - |cff009900Unlocked|r).", GOSSIP_SENDER_MAIN, 6);

			pPlayer->ADD_GOSSIP_ITEM(4, "Back to Main Page", GOSSIP_SENDER_MAIN, 26);
			pPlayer->SEND_GOSSIP_MENU(60012, pCreature->GetGUID());
			break;

		case 2: // Purchase donation token
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned 1 Donation Token. Use donation tokens to buy items from Donation Vendor behind me! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(DONOR_TOKEN, 1);
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 3:
			if (vp < 150)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Vote Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET vp = '%u' -150 WHERE id = '%u'", vp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Wrathful Gladiator's Tabard! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(51534, 1); // Wrathful Gladiator's Tabard
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 4: // 20 donation points for VIP account
			if (pPlayer->GetSession()->GetSecurity() >= 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You're already VIP or GM.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (dp < 20)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You dont have enought Donation Points");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -20 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				LoginDatabase.PExecute("INSERT INTO `account_access` (`id`, `gmlevel`, `RealmID`) VALUES (%u, 1, -1);", pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully upgraded your account to VIP. Quit the game and log in again for changes to take effect! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 5:
			if (vp < 100)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Vote Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET vp = '%u' -100 WHERE id = '%u'", vp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Relentless Gladiator's Tabard! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(49086, 1); // Relentless Gladiator's Tabard
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 6:
			if (vp < 50)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Vote Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET vp = '%u' -50 WHERE id = '%u'", vp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Furios Gladiator's Tabard! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(45983, 1); // Furious Gladiator's Tabard
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 7:// Show My Points
			pPlayer->GetSession()->SendAreaTriggerMessage("Donate Points: %u", dp);
			pPlayer->GetSession()->SendAreaTriggerMessage("Vote Points: %u", vp);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 8: // Exhange Donation Points for Titles
			pPlayer->ADD_GOSSIP_ITEM(4, "Conqueror (1 DP).", GOSSIP_SENDER_MAIN, 9);
			pPlayer->ADD_GOSSIP_ITEM(4, "Justicar (1 DP).", GOSSIP_SENDER_MAIN, 10);
			pPlayer->ADD_GOSSIP_ITEM(4, "Battlemaster (1 DP).", GOSSIP_SENDER_MAIN, 11);
			pPlayer->ADD_GOSSIP_ITEM(4, "Scarab Lord (1 DP).", GOSSIP_SENDER_MAIN, 12);
			pPlayer->ADD_GOSSIP_ITEM(4, "Brewmaster (1 DP).", GOSSIP_SENDER_MAIN, 13);
			pPlayer->ADD_GOSSIP_ITEM(4, "The Love Fool (1 DP).", GOSSIP_SENDER_MAIN, 14);
			pPlayer->ADD_GOSSIP_ITEM(4, "Matron (1 DP).", GOSSIP_SENDER_MAIN, 15);
			pPlayer->ADD_GOSSIP_ITEM(4, "Patron (1 DP).", GOSSIP_SENDER_MAIN, 16);
			pPlayer->ADD_GOSSIP_ITEM(4, "The Hallowed (1 DP).", GOSSIP_SENDER_MAIN, 17);
			pPlayer->ADD_GOSSIP_ITEM(4, "Merrymaker (1 DP).", GOSSIP_SENDER_MAIN, 18);
			pPlayer->ADD_GOSSIP_ITEM(4, "The Noble (1 DP).", GOSSIP_SENDER_MAIN, 19);
			pPlayer->ADD_GOSSIP_ITEM(4, "The Pilgrim (1 DP).", GOSSIP_SENDER_MAIN, 20);
			pPlayer->ADD_GOSSIP_ITEM(4, "Flame Keeper (1 DP).", GOSSIP_SENDER_MAIN, 21);
			pPlayer->ADD_GOSSIP_ITEM(4, "Flame Warden (1 DP).", GOSSIP_SENDER_MAIN, 22);
			pPlayer->ADD_GOSSIP_ITEM(4, "Elder (1 DP).", GOSSIP_SENDER_MAIN, 23);
			pPlayer->ADD_GOSSIP_ITEM(4, "Jenkins (1 DP).", GOSSIP_SENDER_MAIN, 24);
			pPlayer->ADD_GOSSIP_ITEM(4, "Back to Main Page", GOSSIP_SENDER_MAIN, 26);
			pPlayer->SEND_GOSSIP_MENU(60013, pCreature->GetGUID());
			break;

		case 9: // Conqueror
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(47)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Conqueror title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(47));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 10: // Justicar
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(48)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Justicar title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(48));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 11: // Battlemaster
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(72)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Battlemaster title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(72));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 12: // Scarab Lord
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(46)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Scarab Lord title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(46));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 13: // Brewmaster
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(133)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Brewmaster title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(133));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 14: // the Love Fool
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(135)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned The Love Fool title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(135));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 15: // Matron
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(137)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Matron title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(137));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 16: // Patron
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(138)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Patron title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(138));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 17: // The Hallowed
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(124)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned The Hallowed title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(124));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 18: // Merrymaker
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(134)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Merrymaker title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(134));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 19: // The Noble
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(155)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned The Noble title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(155));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 20: // The Pilgrim
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(168)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned The Pilgrim title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(168));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 21: // Flame Keeper
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(76)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Flame Keeper title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(76));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 22: // Flame Warden
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(75)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Flame Warden title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(75));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 23: // Elder
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(74)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Elder title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(74));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 24: // Jenkins
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Donation Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (pPlayer->HasTitle(sCharTitlesStore.LookupEntry(143)))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You already has this title.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned Jenkins title! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->SetTitle(sCharTitlesStore.LookupEntry(143));
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 25: // VIP only for this character
			if (pPlayer->GetSession()->GetSecurity() >= 1 || pPlayer->HasItemCount(ONE_CHARACTER_VIP, 1))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You're already VIP or GM.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else if (dp < 5)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You dont have enought Donation Points");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -5 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully upgraded this character to VIP! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(ONE_CHARACTER_VIP, 1);
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 27: // 10000 Honor
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You dont have enought Donation Points");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully gained 10000 Honor Points! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->ModifyHonorPoints(10000);
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 28: // 500 Arena Points
			if (dp < 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You dont have enought Donation Points");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully gained 500 Arena Points! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->ModifyArenaPoints(500);
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 29:
			if (vp < 50)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Vote Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET vp = '%u' -50 WHERE id = '%u'", vp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned BattleArenas Donation Pack I! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(43575, 1); // BattleArenas Donation Pack I
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 30:
			if (vp < 100)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You don't have the required Vote Points.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET vp = '%u' -100 WHERE id = '%u'", vp, pPlayer->GetSession()->GetAccountId());
				pCreature->MonsterWhisper("Successfully earned BattleArenas Donation Pack II! Thanks for the support!", pPlayer->GetGUID());
				pPlayer->AddItem(29569, 1); // BattleArenas Donation Pack II
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 26: // Back to Main Menu..
			OnGossipHello(pPlayer, pCreature);
			break;

		case 31: // Back to Main Menu / not enought points
			pPlayer->GetSession()->SendAreaTriggerMessage("Not enought points.");
			OnGossipHello(pPlayer, pCreature);
			break;
		}
		return true;
	}
Exemplo n.º 22
0
void SendDefaultMenu(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{

// Not allow in combat
if (pPlayer->IsInCombat())
{
    pPlayer->CLOSE_GOSSIP_MENU();
    pCreature->Say("You are in combat!", LANG_UNIVERSAL);
    return;
}

    bool EnableSmallBuff = sConfigMgr->GetBoolDefault("Npc_Buff.EnableSmallBuff", true);
    bool EnableGreatBuff = sConfigMgr->GetBoolDefault("Npc_Buff.EnableGreatBuff", true);
    bool EnableGMBuff = sConfigMgr->GetBoolDefault("Npc_Buff.EnableGMBuff", true);
    bool EnablePlayerTools = sConfigMgr->GetBoolDefault("Npc_Buff.EnablePlayerTools", true);
    bool EnableResSickness = sConfigMgr->GetBoolDefault("Npc_Buff.EnableRemoveResSickness", true);
    bool EnableGivemeGold = sConfigMgr->GetBoolDefault("Npc_Buff.EnableGivemeGold", false);

//Money Check
if (pPlayer->GetMoney() < (sConfigMgr->GetFloatDefault("BuffGoldCost",0)))
{
    pPlayer->CLOSE_GOSSIP_MENU();
    pCreature->Whisper("You don't have enough money.", LANG_UNIVERSAL, pPlayer);
    return;
}


  // send name as gossip item


       QueryResult result;
        uint32 spellId = 0;
        uint32 catNumber = 0;
        uint32 goldCost = 0;
        std::string spellName = "";

        result = WorldDatabase.PQuery("SELECT `spell_id`, `cat_number`, `cost`, `name` FROM `npc_buff_spells` WHERE `cat_number` = %u LIMIT 1", uiAction);

        if (result)
        {

            do {

            Field *fields = result->Fetch();
            spellId = fields[0].GetInt32();
            catNumber = fields[1].GetInt32();
            goldCost = fields[2].GetInt32();
            spellName = fields[3].GetString();

            if (pPlayer->GetMoney() < goldCost)
            {
                pCreature->Whisper("You dont have enough money!", LANG_UNIVERSAL, pPlayer);
                pPlayer->CLOSE_GOSSIP_MENU();
                return;
            }
            else if (uiAction < 5000 && uiAction != 1000 && uiAction != 2000 && uiAction != 3000 && uiAction != 4000 && uiAction != 5005)
            {
    pPlayer->CLOSE_GOSSIP_MENU();
    pPlayer->CastSpell(pPlayer,spellId,false);
    pPlayer->ModifyMoney(-goldCost);

            }

            } while (result->NextRow());
        } else {
            //pPlayer->ADD_GOSSIP_ITEM( 7, MAIN_MENU, GOSSIP_SENDER_MAIN, 5005);
        }

 switch(uiAction)
{

case 1000: //Small  Buff
         showSmallBuff(pPlayer, pCreature, 0);
        //pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

    pPlayer->SEND_GOSSIP_MENU(MSG_BUFF, pCreature->GetGUID());
break;

case 2000: //Great Buff


        showGreatBuff(pPlayer, pCreature, 0);
        //pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

    pPlayer->SEND_GOSSIP_MENU(MSG_BUFF, pCreature->GetGUID());
break;

case 3000: //GM  Buff

        showGmBuff(pPlayer, pCreature, 0);
        //pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

    pPlayer->SEND_GOSSIP_MENU(MSG_BUFF,pCreature->GetGUID());
break;

case 4000: //Player Tools
    // Check config if "Give me Gold" is enabled or not

        showPlayerTools(pPlayer, pCreature, 0);
        //pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

    pPlayer->SEND_GOSSIP_MENU(MSG_BUFF,pCreature->GetGUID());
break;

case 5005: //Back To Main Menu
    // Main Menu
    // Check config if "Small  Buff " is enabled or not
    if(EnableSmallBuff)
        pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff ->"              , GOSSIP_SMALLBUFF, 1000);
    // Check config if "Great Buff" is enabled or not
    if(EnableGreatBuff)
        pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff ->"              , GOSSIP_LARGEBUFF, 2000);
    // Check config if "GM Buff" is enabled or not
    if(EnableGMBuff)
    {
    if (pPlayer->GetSession()->GetSecurity() > SEC_PLAYER)
        {
        pPlayer->ADD_GOSSIP_ITEM( 7, "Platinum Members Buff ->"                 , GOSSIP_SENDER_MAIN, 3000);
        }
    }
    // Check config if "Player Tools" is enabled or not
    if(EnablePlayerTools)
        pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->"            , GOSSIP_PLAYERTOOLS, 4000);
    // Check if Ress Sickness option is enabled
    if(EnableResSickness)
        pPlayer->ADD_GOSSIP_ITEM( 10, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 5000);

    pPlayer->SEND_GOSSIP_MENU(MSG_TYPE, pCreature->GetGUID());
break;

case 5000://Remove Res Sickness
    if(!pPlayer->HasAura(SPELL_RESURRECTION_SICKNESS_15007))
    {
        pCreature->Whisper("You don't have resurrection sickness.", LANG_UNIVERSAL, pPlayer);
        OnGossipHello(pPlayer, pCreature);
        return;
    }

    pCreature->CastSpell(pPlayer,38588,false); // Healing effect
    pPlayer->RemoveAurasDueToSpell(SPELL_RESURRECTION_SICKNESS_15007);
    pPlayer->CLOSE_GOSSIP_MENU();
break;
 pPlayer->CLOSE_GOSSIP_MENU();
 }

} //end of function
Exemplo n.º 23
0
void SendDefaultMenu_pryds_allinone(Player  *player, Creature* pCreature, uint32 uiAction)
{

// Not allow in combat
if (player->isInCombat())
{
    player->CLOSE_GOSSIP_MENU();
    pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
	return;
}

//Config sConfig;
if (!sConfig->SetSource(_TRINITY_CORE_CONFIG))
		sLog->outError("TScript: Unable to open configuration file");
	bool EnableBuffs = sConfig->GetBoolDefault("pryds_allinone.EnableBuffs", true);
	bool EnableProfessionsSkillUp = sConfig->GetBoolDefault("pryds_allinone.EnableProfessionsSkillUp", true);
	bool EnableSmallBuff = sConfig->GetBoolDefault("pryds_allinone.EnableSmallBuff", true);
	bool EnableGreatBuff = sConfig->GetBoolDefault("pryds_allinone.EnableGreatBuff", true);
	bool EnableGMBuff = sConfig->GetBoolDefault("pryds_allinone.EnableGMBuff", true);
	bool EnableTrainers = sConfig->GetBoolDefault("pryds_allinone.EnableTrainers", true);
	bool EnableClassTrainers = sConfig->GetBoolDefault("pryds_allinone.EnableClassTrainers", true);
	bool EnableProfessionsTrainers = sConfig->GetBoolDefault("pryds_allinone.EnableProfessionsTrainers", true);
	bool EnablePlayerTools = sConfig->GetBoolDefault("pryds_allinone.EnablePlayerTools", true);
	bool EnableRemoveResSickness = sConfig->GetBoolDefault("pryds_allinone.EnableRemoveResSickness", true);
	bool EnableGivemeGold = sConfig->GetBoolDefault("pryds_allinone.EnableGivemeGold", true);
	bool EnableProfessions = sConfig->GetBoolDefault("pryds_allinone.EnableProfessions", true);
	bool EnableSecondarySkills = sConfig->GetBoolDefault("pryds_allinone.EnableSecondarySkills", true);
	bool EnableMorph = sConfig->GetBoolDefault("pryds_allinone.EnableMorph", true);

//Mony Check
if (player->GetMoney() < (sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)))
{
    player->CLOSE_GOSSIP_MENU();
    pCreature->MonsterWhisper("You don't have enough money.", player->GetGUID());
	return;
}

switch(uiAction)
{

case 100: // Buffs
	if (EnableSmallBuff)
		player->ADD_GOSSIP_ITEM(2, "Small Buff ->"   			               , GOSSIP_SENDER_MAIN, 1000);
	if (EnableGreatBuff)
		player->ADD_GOSSIP_ITEM(2, "Great Buff ->"                           , GOSSIP_SENDER_MAIN, 2000);
	if (EnableGMBuff)
		player->ADD_GOSSIP_ITEM(2, "GM Buff ->"    			               , GOSSIP_SENDER_MAIN, 3100);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 200: //Professions SkillUp
	// Check config if "EnableProfessions" is enabled or not
	if (EnableProfessions)
		player->ADD_GOSSIP_ITEM(3, "Professions ->"       				   , GOSSIP_SENDER_MAIN, 3000);
	// Check config if "EnableSecondarySkills" is enabled or not
	if (EnableSecondarySkills)
		player->ADD_GOSSIP_ITEM(3, "Secondary Skills ->"  				   , GOSSIP_SENDER_MAIN, 6000);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 300: //Trainers
	// Check config if "Class Trainers" is enabled or not
	if (EnableClassTrainers)
		player->ADD_GOSSIP_ITEM(3, "Class Trainers ->"       			       , GOSSIP_SENDER_MAIN, 400);
	// Check config if "Profession Trainers" is enabled or not
	if (EnableProfessionsTrainers)
		player->ADD_GOSSIP_ITEM(3, "Professions Trainers ->" 				   , GOSSIP_SENDER_MAIN, 500);
	// Professions Skillup
	if (EnableProfessionsSkillUp)
		player->ADD_GOSSIP_ITEM(3, "Professions SkillUp ->"  				   , GOSSIP_SENDER_MAIN, 200);
		player->ADD_GOSSIP_ITEM(3, "Mount Trainer"       					   , GOSSIP_SENDER_MAIN, 634);
		player->ADD_GOSSIP_ITEM(3, "Stable Master"  				           , GOSSIP_SENDER_MAIN, 612);
		player->ADD_GOSSIP_ITEM(3, "Weapon Master"  				           , GOSSIP_SENDER_MAIN, 613);
		player->ADD_GOSSIP_ITEM(3, "Max Weapon Skill"    				       , GOSSIP_SENDER_MAIN, 4026);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                	           , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 700: //Morph
		player->ADD_GOSSIP_ITEM(4, "Famous ->"   		    			       , GOSSIP_SENDER_MAIN, 710);
		player->ADD_GOSSIP_ITEM(4, "Funny ->" 							   , GOSSIP_SENDER_MAIN, 750);
		player->ADD_GOSSIP_ITEM(4, "Make me Bigger ->" 					   , GOSSIP_SENDER_MAIN, 771);
		player->ADD_GOSSIP_ITEM(4, "Make me Smaller ->" 					   , GOSSIP_SENDER_MAIN, 772);
		player->ADD_GOSSIP_ITEM(4, "DeMorph ->" 							   , GOSSIP_SENDER_MAIN, 799);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                	           , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 710: //Morph Famous
		player->ADD_GOSSIP_ITEM(4, "Algalon ->"  		    			       , GOSSIP_SENDER_MAIN, 711);
		player->ADD_GOSSIP_ITEM(4, "Doomwalker ->" 						   , GOSSIP_SENDER_MAIN, 712);
		player->ADD_GOSSIP_ITEM(4, "Doomlord kazzak ->" 					   , GOSSIP_SENDER_MAIN, 713);
		player->ADD_GOSSIP_ITEM(4, "Onyxia ->" 							   , GOSSIP_SENDER_MAIN, 714);
		player->ADD_GOSSIP_ITEM(4, "Thaddius ->" 							   , GOSSIP_SENDER_MAIN, 715);
		player->ADD_GOSSIP_ITEM(4, "Gluth ->" 							   , GOSSIP_SENDER_MAIN, 716);
		player->ADD_GOSSIP_ITEM(4, "Maexxna ->" 							   , GOSSIP_SENDER_MAIN, 717);
		player->ADD_GOSSIP_ITEM(4, "Sapphiron->" 							   , GOSSIP_SENDER_MAIN, 718);
		player->ADD_GOSSIP_ITEM(4, "Noth The Plaguebringer->"				   , GOSSIP_SENDER_MAIN, 719);
		player->ADD_GOSSIP_ITEM(4, "Kel'Thuzad ->" 						   , GOSSIP_SENDER_MAIN, 720);
		player->ADD_GOSSIP_ITEM(4, "Kael'thas Sunstrider ->" 				   , GOSSIP_SENDER_MAIN, 721);
		player->ADD_GOSSIP_ITEM(4, "C'thun ->" 							   , GOSSIP_SENDER_MAIN, 722);
		player->ADD_GOSSIP_ITEM(4, "Thrall ->" 							   , GOSSIP_SENDER_MAIN, 723);
		player->ADD_GOSSIP_ITEM(4, "DeMorph ->" 							   , GOSSIP_SENDER_MAIN, 799);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 700);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                	           , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 750: //Morph Funny
		player->ADD_GOSSIP_ITEM(4, "Gerky ->"   	 		   			       , GOSSIP_SENDER_MAIN, 751);
		player->ADD_GOSSIP_ITEM(4, "Fire elemental ->" 					   , GOSSIP_SENDER_MAIN, 752);
		player->ADD_GOSSIP_ITEM(4, "Pandaren Monk ->" 					   , GOSSIP_SENDER_MAIN, 753);
		player->ADD_GOSSIP_ITEM(4, "Lil' K.T ->" 					 		   , GOSSIP_SENDER_MAIN, 754);
		player->ADD_GOSSIP_ITEM(4, "The Weapon you're Wearing ->"	 	       , GOSSIP_SENDER_MAIN, 755);
		player->ADD_GOSSIP_ITEM(4, "Red Bubbles ->" 					       , GOSSIP_SENDER_MAIN, 756);
		player->ADD_GOSSIP_ITEM(4, "A Shark ->"    		   			       , GOSSIP_SENDER_MAIN, 757);
		player->ADD_GOSSIP_ITEM(4, "A Fel cannon ->"   	   			       , GOSSIP_SENDER_MAIN, 758);
		player->ADD_GOSSIP_ITEM(4, "Human Female  ->" 	   			       , GOSSIP_SENDER_MAIN, 759);
		player->ADD_GOSSIP_ITEM(4, "A Fat Human ->" 		   			       , GOSSIP_SENDER_MAIN, 760);
		player->ADD_GOSSIP_ITEM(4, "A Rabbit ->" 	 		   			       , GOSSIP_SENDER_MAIN, 761);
		player->ADD_GOSSIP_ITEM(4, "A Cool looking Bug ->"   			       , GOSSIP_SENDER_MAIN, 762);
		player->ADD_GOSSIP_ITEM(4, "Eye Of C'thun ->"   	   			       , GOSSIP_SENDER_MAIN, 763);
		player->ADD_GOSSIP_ITEM(4, "DeMorph ->" 							   , GOSSIP_SENDER_MAIN, 799);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 700);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                	           , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 1000: //Small  Buff
		player->ADD_GOSSIP_ITEM(2, "Buff me Mark of the Wild"                , GOSSIP_SENDER_MAIN, 1001);
		player->ADD_GOSSIP_ITEM(2, "Buff me Thorns"                          , GOSSIP_SENDER_MAIN, 1005);
		player->ADD_GOSSIP_ITEM(2, "Buff me Amplify Magic"                   , GOSSIP_SENDER_MAIN, 1010);
		player->ADD_GOSSIP_ITEM(2, "Buff me Arcane Intellect"                , GOSSIP_SENDER_MAIN, 1015);
		player->ADD_GOSSIP_ITEM(2, "Buff me Dalaran Intellect"               , GOSSIP_SENDER_MAIN, 1020);
		player->ADD_GOSSIP_ITEM(2, "Buff me Dampen Magic"                    , GOSSIP_SENDER_MAIN, 1025);
		player->ADD_GOSSIP_ITEM(2, "Buff me Blessing of Kings"               , GOSSIP_SENDER_MAIN, 1030);
		player->ADD_GOSSIP_ITEM(2, "Buff me Blessing of Might"               , GOSSIP_SENDER_MAIN, 1035);
		player->ADD_GOSSIP_ITEM(2, "Buff me Blessing of Wisdom"              , GOSSIP_SENDER_MAIN, 1040);
		player->ADD_GOSSIP_ITEM(2, "Buff me Divine Spirit"                   , GOSSIP_SENDER_MAIN, 1045);
		player->ADD_GOSSIP_ITEM(2, "Buff me Power Word: Fortitude"           , GOSSIP_SENDER_MAIN, 1050);
		player->ADD_GOSSIP_ITEM(2, "Buff me Shadow Protection"               , GOSSIP_SENDER_MAIN, 1055);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 100);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 2000: //Great Buff
		player->ADD_GOSSIP_ITEM(2, "Buff me Gift of the Wild"                , GOSSIP_SENDER_MAIN, 2001);
		player->ADD_GOSSIP_ITEM(2, "Buff me Arcane Brilliance"               , GOSSIP_SENDER_MAIN, 2005);
		player->ADD_GOSSIP_ITEM(2, "Buff me Dalaran Brilliance"              , GOSSIP_SENDER_MAIN, 2010);
		player->ADD_GOSSIP_ITEM(2, "Buff me Greater Blessing of Kings"       , GOSSIP_SENDER_MAIN, 2015);
		player->ADD_GOSSIP_ITEM(2, "Buff me Greater Blessing of Might"       , GOSSIP_SENDER_MAIN, 2020);
		player->ADD_GOSSIP_ITEM(2, "Buff me Greater Blessing of Sanctuary"   , GOSSIP_SENDER_MAIN, 2025);
		player->ADD_GOSSIP_ITEM(2, "Buff me Greater Blessing of Wisdom"      , GOSSIP_SENDER_MAIN, 2030);
		player->ADD_GOSSIP_ITEM(2, "Buff me Prayer of Fortitude"             , GOSSIP_SENDER_MAIN, 2035);
		player->ADD_GOSSIP_ITEM(2, "Buff me Prayer of Shadow Protection"     , GOSSIP_SENDER_MAIN, 2040);
		player->ADD_GOSSIP_ITEM(2, "Buff me Prayer of Spirit"                , GOSSIP_SENDER_MAIN, 2045);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 100);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 3100: //GM  Buff
		player->ADD_GOSSIP_ITEM(2, "Buff me Agamaggan's Agility"             , GOSSIP_SENDER_MAIN, 3001);
		player->ADD_GOSSIP_ITEM(2, "Buff me Agamaggan's Strength"            , GOSSIP_SENDER_MAIN, 3005);
		player->ADD_GOSSIP_ITEM(2, "Buff me Armor Magic"                     , GOSSIP_SENDER_MAIN, 3010);
		player->ADD_GOSSIP_ITEM(2, "Buff me Armor Penetration"               , GOSSIP_SENDER_MAIN, 3015);
		player->ADD_GOSSIP_ITEM(2, "Buff me Increased Stamina"               , GOSSIP_SENDER_MAIN, 3020);
		player->ADD_GOSSIP_ITEM(2, "Buff me Razorhide"                       , GOSSIP_SENDER_MAIN, 3025);
		player->ADD_GOSSIP_ITEM(2, "Buff me Rising Spirit"                   , GOSSIP_SENDER_MAIN, 3030);
		player->ADD_GOSSIP_ITEM(2, "Buff me Spirit of the Wind"              , GOSSIP_SENDER_MAIN, 3035);
		player->ADD_GOSSIP_ITEM(2, "Buff me Wisdom of Agamaggan"             , GOSSIP_SENDER_MAIN, 3040);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 100);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 4000: //Player Tools
	// Check config if "Give me Gold" is enabled or not
	if (EnableGivemeGold)
		player->ADD_GOSSIP_ITEM(8, "Give me 5000 Gold"                       , GOSSIP_SENDER_MAIN, 4001);
		player->ADD_GOSSIP_ITEM(8, "Give me Soul Shard"                     , GOSSIP_SENDER_MAIN, 4005);
		player->ADD_GOSSIP_ITEM(8, "Heal me Please"                          , GOSSIP_SENDER_MAIN, 4010);
		player->ADD_GOSSIP_ITEM(8, "Heal me and party members Please"        , GOSSIP_SENDER_MAIN, 4015);
		player->ADD_GOSSIP_ITEM(8, "Conjure Level 80 Refreshment"            , GOSSIP_SENDER_MAIN, 4020);
		player->ADD_GOSSIP_ITEM(8, "Conjure Mana Gem Level 77"               , GOSSIP_SENDER_MAIN, 4025);
		player->ADD_GOSSIP_ITEM(8, "Drunk"   						           , GOSSIP_SENDER_MAIN, 4027);
		player->ADD_GOSSIP_ITEM(8, "Sober"   						           , GOSSIP_SENDER_MAIN, 4028);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 400: //Class Trainers
		player->ADD_GOSSIP_ITEM(3, "Death Knight"               			   , GOSSIP_SENDER_MAIN, 601);
		player->ADD_GOSSIP_ITEM(3, "Druid"                        		   , GOSSIP_SENDER_MAIN, 602);
		player->ADD_GOSSIP_ITEM(3, "Hunter"                 				   , GOSSIP_SENDER_MAIN, 603);
		player->ADD_GOSSIP_ITEM(3, "Mage"                 				   , GOSSIP_SENDER_MAIN, 604);
		player->ADD_GOSSIP_ITEM(3, "Paladin"              				   , GOSSIP_SENDER_MAIN, 605);
		player->ADD_GOSSIP_ITEM(3, "Priest"    	         			       , GOSSIP_SENDER_MAIN, 606);
		player->ADD_GOSSIP_ITEM(3, "Rogue"               	 				   , GOSSIP_SENDER_MAIN, 607);
		player->ADD_GOSSIP_ITEM(3, "Shaman"            					   , GOSSIP_SENDER_MAIN, 608);
		player->ADD_GOSSIP_ITEM(3, "Warlock"         						   , GOSSIP_SENDER_MAIN, 609);
		player->ADD_GOSSIP_ITEM(3, "Warrior"          				       , GOSSIP_SENDER_MAIN, 610);
		player->ADD_GOSSIP_ITEM(3, "Hunter Pet"    					       , GOSSIP_SENDER_MAIN, 611);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 300);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 500: //Profession Trainers
		player->ADD_GOSSIP_ITEM(3, "Alchemy"      				           , GOSSIP_SENDER_MAIN, 620);
		player->ADD_GOSSIP_ITEM(3, "Blacksmithing"                           , GOSSIP_SENDER_MAIN, 621);
		player->ADD_GOSSIP_ITEM(3, "Enchanter"         			           , GOSSIP_SENDER_MAIN, 622);
		player->ADD_GOSSIP_ITEM(3, "Engineering"           				   , GOSSIP_SENDER_MAIN, 623);
		player->ADD_GOSSIP_ITEM(3, "Herbalism"             				   , GOSSIP_SENDER_MAIN, 624);
		player->ADD_GOSSIP_ITEM(3, "Inscription"             			       , GOSSIP_SENDER_MAIN, 625);
		player->ADD_GOSSIP_ITEM(3, "Jewelcrafting"            			   , GOSSIP_SENDER_MAIN, 626);
		player->ADD_GOSSIP_ITEM(3, "Leatherworking"            			   , GOSSIP_SENDER_MAIN, 627);
		player->ADD_GOSSIP_ITEM(3, "Mining"             					   , GOSSIP_SENDER_MAIN, 628);
		player->ADD_GOSSIP_ITEM(3, "Skinning"                 			   , GOSSIP_SENDER_MAIN, 629);
		player->ADD_GOSSIP_ITEM(3, "Tailoring"           					   , GOSSIP_SENDER_MAIN, 630);
		player->ADD_GOSSIP_ITEM(3, "Cooking"               				   , GOSSIP_SENDER_MAIN, 631);
		player->ADD_GOSSIP_ITEM(3, "First Aid"             				   , GOSSIP_SENDER_MAIN, 632);
		player->ADD_GOSSIP_ITEM(3, "Fishing"               				   , GOSSIP_SENDER_MAIN, 633);
		player->ADD_GOSSIP_ITEM(7, "<- Back"       		                   , GOSSIP_SENDER_MAIN, 300);
		player->ADD_GOSSIP_ITEM(7, "<- Main Menu"                            , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 3000: //Profession
            player->ADD_GOSSIP_ITEM(3, "Alchemy."              , GOSSIP_SENDER_MAIN, 1101);
            player->ADD_GOSSIP_ITEM(3, "Blacksmithing."        , GOSSIP_SENDER_MAIN, 1102);
            player->ADD_GOSSIP_ITEM(3, "Enchanting."           , GOSSIP_SENDER_MAIN, 1103);
            player->ADD_GOSSIP_ITEM(3, "Engineering."          , GOSSIP_SENDER_MAIN, 1104);
            player->ADD_GOSSIP_ITEM(3, "Herbalism."            , GOSSIP_SENDER_MAIN, 1105);
            player->ADD_GOSSIP_ITEM(3, "Inscription."          , GOSSIP_SENDER_MAIN, 1106);
            player->ADD_GOSSIP_ITEM(3, "Jewelcrafting."        , GOSSIP_SENDER_MAIN, 1107);
            player->ADD_GOSSIP_ITEM(3, "Leatherworking."       , GOSSIP_SENDER_MAIN, 1108);
            player->ADD_GOSSIP_ITEM(3, "Mining."               , GOSSIP_SENDER_MAIN, 1109);
            player->ADD_GOSSIP_ITEM(3, "Skinning."             , GOSSIP_SENDER_MAIN, 1110);
            player->ADD_GOSSIP_ITEM(3, "Tailoring."            , GOSSIP_SENDER_MAIN, 1111);
			player->ADD_GOSSIP_ITEM(7, "<- Back"               , GOSSIP_SENDER_MAIN, 200);
            player->ADD_GOSSIP_ITEM(7, "<- Main Menu"          , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 6000: //Secondary Skills
            player->ADD_GOSSIP_ITEM(3, "Cooking."              , GOSSIP_SENDER_MAIN, 2101);
            player->ADD_GOSSIP_ITEM(3, "First Aid."            , GOSSIP_SENDER_MAIN, 2102);
            player->ADD_GOSSIP_ITEM(3, "Fishing."              , GOSSIP_SENDER_MAIN, 2103);
          //player->ADD_GOSSIP_ITEM(3, "Riding."               , GOSSIP_SENDER_MAIN, 2104);
			player->ADD_GOSSIP_ITEM(7, "<- Back"               , GOSSIP_SENDER_MAIN, 200);
            player->ADD_GOSSIP_ITEM(7, "<- Main Menu"          , GOSSIP_SENDER_MAIN, 5005);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 5005: //Back To Main Menu
	// Main Menu for Alliance
	player->PlayerTalkClass->ClearMenus();            /* 11/05/2010 niteowl57:  For 3.3.5a, fix menu functionality  */
    if (player->GetTeam() == ALLIANCE)
	{
	// Buffs
	if (EnableBuffs)
		player->ADD_GOSSIP_ITEM(2, " Buffs ->"  		       	  , GOSSIP_SENDER_MAIN, 100);
	// EnableTrainers
	if (EnableTrainers)
		player->ADD_GOSSIP_ITEM(3, "Trainers ->"  			  , GOSSIP_SENDER_MAIN, 300);
	// Check config if "Player Tools" is enabled or not
	if (EnablePlayerTools)
		player->ADD_GOSSIP_ITEM(8, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
			// Check config if "Morph" is enabled or not
	if (EnableMorph)
		player->ADD_GOSSIP_ITEM(4, "Morph ->"       			  , GOSSIP_SENDER_MAIN, 700);

	}
	else // Main Menu for Horde
	{
	// Buffs
	if (EnableBuffs)
		player->ADD_GOSSIP_ITEM(2, " Buffs ->"  		       	  , GOSSIP_SENDER_MAIN, 100);
	// EnableTrainers
	if (EnableTrainers)
		player->ADD_GOSSIP_ITEM(3, "Trainers ->"  			  , GOSSIP_SENDER_MAIN, 300);
	// Check config if "Player Tools" is enabled or not
	if (EnablePlayerTools)
		player->ADD_GOSSIP_ITEM(8, "Player Tools ->"            , GOSSIP_SENDER_MAIN, 4000);
			// Check config if "Morph" is enabled or not
	if (EnableMorph)
		player->ADD_GOSSIP_ITEM(4, "Morph ->"       			  , GOSSIP_SENDER_MAIN, 700);

	}

	// Check config file if "Remove res sickness" option is enabled or not
	if (EnableRemoveResSickness)
		player->ADD_GOSSIP_ITEM(9, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 7000);

	player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

//////////////////////////////////////////////////Small Buff///////////////////////////////////////////////////////////////

case 1001: // Buff me Mark of the Wild
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48469,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1005: // Buff me Thorns
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,53307,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1010: // Buff me Amplify Magic
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,43017,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1015: // Buff me Arcane Intellect
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,42995,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1020: // Buff me Dalaran Intellect
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,61024,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1025: // Buff me Dampen Magic
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,43015,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1030: // Buff me Blessing of Kings
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,20217,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1035: // Buff me Blessing of Might
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48932,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1040: // Buff me Blessing of Wisdom
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48936,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1045: // Buff me Divine Spirit
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48073,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1050: // Buff me Power Word: Fortitude
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48161,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 1055: // Buff me Shadow Protection
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48169,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

//////////////////////////////////////////////////Great Buff///////////////////////////////////////////////////////////////

case 2001: // Buff me Gift of the Wild
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,48470,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2005: // Buff me Arcane Brilliance
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,43002,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2010: // Buff me Dalaran Brilliance
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,61316,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2015: // Buff me Greater Blessing of Kings
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,25898,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2020: // Buff me Greater Blessing of Might
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48934,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2025: // Buff me Greater Blessing of Sanctuary
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,25899,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2030: // Buff me Greater Blessing of Wisdom
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,48938,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2035: // Buff me Prayer of Fortitude
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,48162,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2040: // Buff me Prayer of Shadow Protection
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,48170,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 2045: // Buff me Prayer of Spirit
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,48074,true);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

//////////////////////////////////////////////////GM Buff///////////////////////////////////////////////////////////////

case 3001: // Buff me Agamaggan's Agility
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,17013,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3005: // Buff me Agamaggan's Strength
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,16612,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3010: // Buff me Armor Magic
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,58453,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3015: // Buff me Armor Penetration
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,34106,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3020: // Buff me Increased Stamina
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,25661,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3025: // Buff me Razorhide
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,16610,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3030: // Buff me Rising Spirit
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,10767,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3035: // Buff me Spirit of the Wind
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,16618,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 3040: // Buff me Wisdom of Agamaggan
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,7764,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

//////////////////////////////////////////////////Trainers ///////////////////////////////////////////////////////////////

//////////////////////////////////////////////////Class ///////////////////////////////////////////////////////////////
case 601: // Death Knight
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28472,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 602: // Druid
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(12042,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 603: // Hunter
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(303911,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 604: // Mage
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28958,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 605: // Paladin
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(352811,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 606: // Priest
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(166581,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 607: // Rogue
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(6707,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 608: // Shaman
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(172041,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 609: // Warlock
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(23534,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 610: // Warrior
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(45931,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

//////////////////////////////////////////////////Profession and Extras ///////////////////////////////////////////////////////////////

case 620: // Alchemy
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(33630,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
	player->SummonCreature(28703,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 621: // Blacksmithing
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28694,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 622: // Enchanting
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28693,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
	player->SummonCreature(33633,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 623: // Engineering
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28697,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 624: // Herbalism
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28704,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 625: // Inscription
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28702,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 626: // Jewelcrafting
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28701,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 627: // Leatherworking
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28700,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 628: // Mining
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28698,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 629: // Skinning
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28696,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 630: // Tailoring
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28699,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 631: // Cooking
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28705,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 632: // First Aid
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28706,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);;
break;

case 633: // Fishing
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28742,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 634: // Mount
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(31238,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 613: // Weapon Master
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(12704,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 611: // Hunters Pet
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(100901,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

case 612: // Stable Master
    player->CLOSE_GOSSIP_MENU();
	player->SummonCreature(28690,player->GetPositionX() ,player->GetPositionY(), player->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,120000);
break;

//////////////////////////////////////////////////Morph ///////////////////////////////////////////////////////////////

//////////////////////////////////////////////////Famous ///////////////////////////////////////////////////////////////

case 711: // Algalon
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(28641);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 712: // Doomwalker
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(16630);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 713: // Doomlord kazzak
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(17887);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.10f);
break;

case 714: // Onyxia
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(8570);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 715: // Thaddius
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(16137);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 716: // Gluth
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(16064);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 717: // Maexxna
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15928);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.15f);
break;

case 718: // Sapphiron
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(16033);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 719: // Noth The Plaguebringer
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(16590);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.7f);
break;

case 720: // Kel'Thuzad
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15945);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 721: // Kael'thas Sunstrider
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(20023);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 722: // C'thun
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15786);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 723: // Thrall
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(4527);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
break;

//////////////////////////////////////////////////Funny ///////////////////////////////////////////////////////////////

case 751: // Gerky
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(29348);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 752: // Water elemental
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(12129);
		player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.3f);
break;

case 753: // Pandaren Monk
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(30414);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 754: // Lil' K.T
	player->CLOSE_GOSSIP_MENU();
	player->DeMorph();
    player->SetDisplayId(30507);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 755: // The Weapon you're Wearing
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15880);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.4f);
break;

case 756: // Red Bubbles
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(20262);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 757: // A Shark
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15555);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 758: // A Fel cannon
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(18505);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 759: // Human Female
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(100);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 760: // A Fat Human
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(103);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 761: // A Rabbit
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(328);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
break;

case 762: // A Cool looking Bug
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15695);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 763: // Eye Of C'thun
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15556);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 771: // Make me Bigger
    player->CLOSE_GOSSIP_MENU();
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 772: // Make me Smaller
    player->CLOSE_GOSSIP_MENU();
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 799: // DeMorph
    player->CLOSE_GOSSIP_MENU();
	player->DeMorph();
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
break;

//////////////////////////////////////////////////Player Tools///////////////////////////////////////////////////////////////

case 4001://Give me Gold
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,46642,false); // 5000 gold
break;

case 4005://Give me Soul Shard
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,24827,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 4010: // Heal me please
    player->CLOSE_GOSSIP_MENU();
    pCreature->CastSpell(player,38588,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 4015: // Heal me and party members Please
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,53251,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 4020: // Conjure Refreshment
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,42956,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
break;

case 4025: // Conjure Mana Gem
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,42985,false);
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));

case 4026: // Update Skill to Max for Level
    player->CLOSE_GOSSIP_MENU();
    player->UpdateSkillsToMaxSkillsForLevel();
    player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneBuffGoldCost",0)));
    pCreature->MonsterSay("Your Skills have now been Maxed for your Level.", LANG_UNIVERSAL, NULL);
    
break;

case 4027: // Drunk
    player->CLOSE_GOSSIP_MENU();
    player->CastSpell(player,46876,false);
    pCreature->MonsterSay("Hahahaha! You are Drunk Now!", LANG_UNIVERSAL, NULL);
    
break;

case 4028: // Sober
    player->CLOSE_GOSSIP_MENU();
    player->SetDrunkValue(0, 9);
    pCreature->MonsterSay("Hahahaha! I knew you could not handle you drink!", LANG_UNIVERSAL, NULL);
    
break;

case 7000://Remove Res Sickness
	if (!player->HasAura(15007,0))
	{
		pCreature->MonsterWhisper("You don't have resurrection sickness.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	pCreature->CastSpell(player,38588,false); // Healing effect
	player->RemoveAurasDueToSpell(15007,0);
	player->CLOSE_GOSSIP_MENU();
break;

//////////////////////////////////////////////////Professions///////////////////////////////////////////////////////////////

case 1101: // Alchemy
	if (!player->UpdateSkill(171,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(171,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1102: // Blacksmithing
	if (!player->UpdateSkill(164,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(164,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1103: // Enchanting
	if (!player->UpdateSkill(333,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(333,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1104: // Engineering
	if (!player->UpdateSkill(202,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(202,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1105: // Herbalism
	if (!player->UpdateSkill(182,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(182,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1106: // Inscription
	if (!player->UpdateSkill(773,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(773,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1107: // Jewelcrafting
	if (!player->UpdateSkill(755,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(755,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1108: // Leatherworking
	if (!player->UpdateSkill(165,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(165,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1109: // Mining
	if (!player->UpdateSkill(186,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(186,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1110: // Skinning
	if (!player->UpdateSkill(393,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(393,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 1111: // Tailoring
	if (!player->UpdateSkill(197,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(197,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

//////////////////////////////////////////////////Secondary Skills///////////////////////////////////////////////////////////////

case 2101: // Cooking
	if (!player->UpdateSkill(185,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(185,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 2102: // First Aid
	if (!player->UpdateSkill(129,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(129,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

case 2103: // Fishing
	if (!player->UpdateSkill(356,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
		OnGossipHello(player, pCreature);
		return;
	}

	player->UpdateSkill(356,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
	player->CLOSE_GOSSIP_MENU();
break;

//case 2104: // Riding
//	if (!player->UpdateSkill(,0))
//    {
//		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", player->GetGUID());
//		OnGossipHello_ProfessionNPC(player, pCreature);
//		return;
//	}
//
//	player->UpdateSkill(,(sConfig->GetFloatDefault("pryds_allinoneSkillPoints",0)));
//	player->ModifyMoney(-(sConfig->GetFloatDefault("pryds_allinoneSkillGoldCost",0)));
//	player->CLOSE_GOSSIP_MENU();
//break;
 player->CLOSE_GOSSIP_MENU();

} // end of switch
} //end of function
Exemplo n.º 24
0
void SendDefaultMenu(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{

// Not allow in combat
if (pPlayer->isInCombat())
{
    pPlayer->CLOSE_GOSSIP_MENU();
    pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
	return;
}

	bool EnableProfessions = ConfigMgr::GetBoolDefault("ProfessionNPC.EnableProfessions", true);
	bool EnableSecondarySkills = ConfigMgr::GetBoolDefault("ProfessionNPC.EnableSecondarySkills", true);

//Mony Check
if (pPlayer->GetMoney() < (ConfigMgr::GetFloatDefault("SkillGoldCost",0)))
{
    pPlayer->CLOSE_GOSSIP_MENU();
    pCreature->MonsterWhisper("You don't have enough money.", pPlayer->GetGUID());
	return;
}

switch(uiAction)
{

case 1000: //Profession
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Alchemy."              , GOSSIP_SENDER_MAIN, 1001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Blacksmithing."        , GOSSIP_SENDER_MAIN, 1002);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Enchanting."           , GOSSIP_SENDER_MAIN, 1003);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Engineering."          , GOSSIP_SENDER_MAIN, 1004);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Herbalism."            , GOSSIP_SENDER_MAIN, 1005);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Inscription."          , GOSSIP_SENDER_MAIN, 1006);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Jewelcrafting."        , GOSSIP_SENDER_MAIN, 1007);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Leatherworking."       , GOSSIP_SENDER_MAIN, 1008);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Mining."               , GOSSIP_SENDER_MAIN, 1009);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Skinning."             , GOSSIP_SENDER_MAIN, 1010);
            pPlayer->ADD_GOSSIP_ITEM( 5, "10 points in Tailoring."            , GOSSIP_SENDER_MAIN, 1011);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"          , GOSSIP_SENDER_MAIN, 3000);

	pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 2000: //Secondary Skills
            pPlayer->ADD_GOSSIP_ITEM( 5, "Cooking."              , GOSSIP_SENDER_MAIN, 2001);
            pPlayer->ADD_GOSSIP_ITEM( 5, "First Aid."            , GOSSIP_SENDER_MAIN, 2002);
            pPlayer->ADD_GOSSIP_ITEM( 5, "Fishing."              , GOSSIP_SENDER_MAIN, 2003);
          //pPlayer->ADD_GOSSIP_ITEM( 5, "Riding."               , GOSSIP_SENDER_MAIN, 2004);
            pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu"          , GOSSIP_SENDER_MAIN, 3000);

	pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

case 3000: //Back To Main Menu
	// Main Menu for Alliance
    if (pPlayer->GetTeam() == ALLIANCE)
	{
	// Check config if "Professions" is enabled or not
	if(EnableProfessions)
		pPlayer->ADD_GOSSIP_ITEM( 7, "Professions ->"        , GOSSIP_SENDER_MAIN, 1000);
	// Check config if "Secondary Skills" is enabled or not
	if(EnableSecondarySkills)
		pPlayer->ADD_GOSSIP_ITEM( 7, "Secondary Skills ->"   , GOSSIP_SENDER_MAIN, 2000);
	}
	else // Main Menu for Horde
	{
	// Check config if "Professions" is enabled or not
	if(EnableProfessions)
		pPlayer->ADD_GOSSIP_ITEM( 7, "Professions ->"        , GOSSIP_SENDER_MAIN, 1000);
	// Check config if "Secondary Skills" is enabled or not
	if(EnableSecondarySkills)
		pPlayer->ADD_GOSSIP_ITEM( 7, "Secondary Skills ->"   , GOSSIP_SENDER_MAIN, 2000);
	}

	pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;

//////////////////////////////////////////////////Professions///////////////////////////////////////////////////////////////

case 1001: // Alchemy
	if(!pPlayer->UpdateSkill(171,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(171,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1002: // Blacksmithing
	if(!pPlayer->UpdateSkill(164,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(164,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1003: // Enchanting
	if(!pPlayer->UpdateSkill(333,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(333,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1004: // Engineering
	if(!pPlayer->UpdateSkill(202,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(202,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1005: // Herbalism
	if(!pPlayer->UpdateSkill(182,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(182,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1006: // Inscription
	if(!pPlayer->UpdateSkill(773,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(773,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1007: // Jewelcrafting
	if(!pPlayer->UpdateSkill(755,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(755,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1008: // Leatherworking
	if(!pPlayer->UpdateSkill(165,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(165,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1009: // Mining
	if(!pPlayer->UpdateSkill(186,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(186,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1010: // Skinning
	if(!pPlayer->UpdateSkill(393,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(393,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 1011: // Tailoring
	if(!pPlayer->UpdateSkill(197,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(197,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

//////////////////////////////////////////////////Secondary Skills///////////////////////////////////////////////////////////////

case 2001: // Cooking
	if(!pPlayer->UpdateSkill(185,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(185,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 2002: // First Aid
	if(!pPlayer->UpdateSkill(129,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(129,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

case 2003: // Fishing
	if(!pPlayer->UpdateSkill(356,0))
      {
		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
		OnGossipHello(pPlayer, pCreature);
		return;
	}

	pPlayer->UpdateSkill(356,(ConfigMgr::GetFloatDefault("SkillPoints",0)));
	pPlayer->ModifyMoney(-(ConfigMgr::GetFloatDefault("SkillGoldCost",0)));
	pPlayer->CLOSE_GOSSIP_MENU();
break;

//case 2004: // Riding
//	if(!pPlayer->UpdateSkill(,0))
//    {
//		pCreature->MonsterWhisper("You don't have this skill or you allready have the maximum skill value $C.", pPlayer->GetGUID());
//		OnGossipHello(pPlayer, pCreature);
//		return;
//	}
//
//	pPlayer->UpdateSkill(,(sConfig->GetFloatDefault("SkillPoints",0)));
//	pPlayer->ModifyMoney(-(sConfig->GetFloatDefault("SkillGoldCost",0)));
//	pPlayer->CLOSE_GOSSIP_MENU();
//break;

 pPlayer->CLOSE_GOSSIP_MENU();

} // end of switch
} //end of function
Exemplo n.º 25
0
    bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 action)
    {
        player->PlayerTalkClass->ClearMenus();

        switch(action)
        {
            case 1202: // Heal
                if (player->HasAura(45523))
                {
                    player->CLOSE_GOSSIP_MENU();
                    creature->MonsterWhisper("Es tut mir leid $N, diese Aktion steht zur Zeit nicht zur Verfügung.", player->GetGUID(), false);
                }
                else
                {
                    player->CLOSE_GOSSIP_MENU();
                    player->CastSpell(player, 39321, true);
                    player->CastSpell(player, 45523, true);
                }
                break;
            case 4035: // Reset talents
                player->CLOSE_GOSSIP_MENU();
                player->SendTalentWipeConfirm(creature->GetGUID());
                break;
			case 4020: // Manastudel
				player->CLOSE_GOSSIP_MENU();
				player->CastSpell(player,42956,false);
			break;			
			case 4024://Seelenstein
				player->CLOSE_GOSSIP_MENU();
				player->CastSpell(player,24827,false);
			break;			
			case 4025: // Manastein
				player->CLOSE_GOSSIP_MENU();
				player->CastSpell(player,42985,false);
			break;		
			case 4026: // Update Skill to Max for Level
				player->CLOSE_GOSSIP_MENU();
				player->UpdateSkillsToMaxSkillsForLevel();
				creature->MonsterSay("Deine Waffenskills wurden maximiert.", LANG_UNIVERSAL, NULL);
			break;			
			case 4027: // Betrinken
				player->CLOSE_GOSSIP_MENU();
				player->CastSpell(player,46876,false);
				creature->MonsterSay("Prost!", LANG_UNIVERSAL, NULL);
			break;
			case 4028: // Ausnüchtern
				player->CLOSE_GOSSIP_MENU();
				player->SetDrunkValue(0, 9);
				creature->MonsterSay("Hahahaha! Du scheinst deinen Drink nicht vertragen zu habem!", LANG_UNIVERSAL, NULL);
			break;
			case 7000://Remove Res Sickness
				if (!player->HasAura(15007,0))
				{
					creature->MonsterWhisper("Du hast keine Todesnachwirkungen.", player->GetGUID());
					OnGossipHello(player, creature);
				}
				creature->CastSpell(player,38588,false); // Healing effect
				player->RemoveAurasDueToSpell(15007,0);
				player->CLOSE_GOSSIP_MENU();
			break;			
            case 1203: // Morphs
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
                break;
            case 1204: // Morphs Famous
                //player->ADD_GOSSIP_ITEM(5, "Algalon", GOSSIP_SENDER_MAIN, 711);
                //player->ADD_GOSSIP_ITEM(5, "Doomwalker", GOSSIP_SENDER_MAIN, 712);
				//player->ADD_GOSSIP_ITEM(5, "Doomlord kazzak", GOSSIP_SENDER_MAIN, 713);
                //player->ADD_GOSSIP_ITEM(5, "Onyxia", GOSSIP_SENDER_MAIN, 714);
                //player->ADD_GOSSIP_ITEM(5, "Thaddius", GOSSIP_SENDER_MAIN, 715);
                //player->ADD_GOSSIP_ITEM(5, "Gluth", GOSSIP_SENDER_MAIN, 716);
                //player->ADD_GOSSIP_ITEM(5, "Maexxna", GOSSIP_SENDER_MAIN, 717);
                //player->ADD_GOSSIP_ITEM(5, "Sapphiron", GOSSIP_SENDER_MAIN, 718);
                //player->ADD_GOSSIP_ITEM(5, "Noth The Plaguebringer", GOSSIP_SENDER_MAIN, 719);
                //player->ADD_GOSSIP_ITEM(5, "Kel'Thuzad", GOSSIP_SENDER_MAIN, 720);
                //player->ADD_GOSSIP_ITEM(5, "Kael'thas Sunstrider", GOSSIP_SENDER_MAIN, 721);
                //player->ADD_GOSSIP_ITEM(5, "C'thun", GOSSIP_SENDER_MAIN, 722);
                player->ADD_GOSSIP_ITEM(5, "Thrall", GOSSIP_SENDER_MAIN, 723);
                player->ADD_GOSSIP_ITEM(5, "Sylvanas Windrunner", GOSSIP_SENDER_MAIN, 724);			
                player->ADD_GOSSIP_ITEM(5, "Alexstrasza (Blutelf)", GOSSIP_SENDER_MAIN, 725);		
                player->ADD_GOSSIP_ITEM(5, "Varian Wrynn", GOSSIP_SENDER_MAIN, 726);		
                //player->ADD_GOSSIP_ITEM(5, "Varimathras", GOSSIP_SENDER_MAIN, 727);		
                //player->ADD_GOSSIP_ITEM(5, "Alexstrasza (Drache)", GOSSIP_SENDER_MAIN, 728);		
                //player->ADD_GOSSIP_ITEM(5, "Mal'ganis", GOSSIP_SENDER_MAIN, 729);		
                //player->ADD_GOSSIP_ITEM(5, "Illidan", GOSSIP_SENDER_MAIN, 500);
                player->ADD_GOSSIP_ITEM(5, "Akama", GOSSIP_SENDER_MAIN, 502);
                player->ADD_GOSSIP_ITEM(5, "Todesritter", GOSSIP_SENDER_MAIN, 503);
                player->ADD_GOSSIP_ITEM(5, "Taure", GOSSIP_SENDER_MAIN, 504);
                player->ADD_GOSSIP_ITEM(5, "Untoter", GOSSIP_SENDER_MAIN, 505);
                //player->ADD_GOSSIP_ITEM(5, "Mensch", GOSSIP_SENDER_MAIN, 506);
                player->ADD_GOSSIP_ITEM(5, "Lich König", GOSSIP_SENDER_MAIN, 507);
                player->ADD_GOSSIP_ITEM(5, "Tirion", GOSSIP_SENDER_MAIN, 508);
                player->ADD_GOSSIP_ITEM(5, "Uther Lichtbringer", GOSSIP_SENDER_MAIN, 509);
                player->ADD_GOSSIP_ITEM(5, "Arthas", GOSSIP_SENDER_MAIN, 510);
                player->ADD_GOSSIP_ITEM(5, "DEMORPH", GOSSIP_SENDER_MAIN, 511);				
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
                break;	
            case 1205: // Morphs Funny
                player->ADD_GOSSIP_ITEM(5, "Gerky", GOSSIP_SENDER_MAIN, 751);
                player->ADD_GOSSIP_ITEM(5, "Feuer Elementar", GOSSIP_SENDER_MAIN, 752);
                player->ADD_GOSSIP_ITEM(5, "Pandaren Mönch", GOSSIP_SENDER_MAIN, 753);
                player->ADD_GOSSIP_ITEM(5, "Kleiner Kel'Thuzad", GOSSIP_SENDER_MAIN, 754);
                //player->ADD_GOSSIP_ITEM(5, "Deine aktuelle Waffe", GOSSIP_SENDER_MAIN, 755);
                //player->ADD_GOSSIP_ITEM(5, "Rote Blase", GOSSIP_SENDER_MAIN, 756);
                player->ADD_GOSSIP_ITEM(5, "Hai", GOSSIP_SENDER_MAIN, 757);
                //player->ADD_GOSSIP_ITEM(5, "Kanone", GOSSIP_SENDER_MAIN, 758);
                player->ADD_GOSSIP_ITEM(5, "Frau (Mensch)", GOSSIP_SENDER_MAIN, 759);
                player->ADD_GOSSIP_ITEM(5, "Fetter Mann", GOSSIP_SENDER_MAIN, 760);
                player->ADD_GOSSIP_ITEM(5, "Hase", GOSSIP_SENDER_MAIN, 761);
                player->ADD_GOSSIP_ITEM(5, "Käfer", GOSSIP_SENDER_MAIN, 762);	
                player->ADD_GOSSIP_ITEM(5, "Auge von C'thun", GOSSIP_SENDER_MAIN, 763);				
                player->ADD_GOSSIP_ITEM(5, "Tanzender Murloc", GOSSIP_SENDER_MAIN, 764);						
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
                break;	
				
				
            case 500:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(21135);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);				
                break;
            case 502:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(20681);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 503:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(16508);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 504:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(17332);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 505:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(2789);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 506:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(16280);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.8f);						
                break;
            case 507:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(24191);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 508:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(22209);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 509:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(23889);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 510:
                player->CLOSE_GOSSIP_MENU();
                player->SetDisplayId(24949);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);						
                break;
            case 511:
                player->CLOSE_GOSSIP_MENU();
                player->DeMorph();
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);							
                break;
            case 1206: // Buffs
                player->ADD_GOSSIP_ITEM(5, "Machtwort: Seelenstärke, Rang 8", GOSSIP_SENDER_MAIN, 4000);
                player->ADD_GOSSIP_ITEM(5, "Großer Segen der Könige", GOSSIP_SENDER_MAIN, 4001);
                player->ADD_GOSSIP_ITEM(5, "Großer Segen der Macht", GOSSIP_SENDER_MAIN,4002);
                player->ADD_GOSSIP_ITEM(5, "Großer Segen der Weisheit", GOSSIP_SENDER_MAIN, 4003);
                player->ADD_GOSSIP_ITEM(5, "Mal der Wildnis, Rang 9", GOSSIP_SENDER_MAIN, 4004);
                player->ADD_GOSSIP_ITEM(5, "Arkane Intelligenz, Rang 7", GOSSIP_SENDER_MAIN, 4005);
                player->ADD_GOSSIP_ITEM(5, "Dornen, Rang 8", GOSSIP_SENDER_MAIN, 4007);
                player->ADD_GOSSIP_ITEM(5, "Göttlicher Wille, Rang 8", GOSSIP_SENDER_MAIN, 4008);
                player->ADD_GOSSIP_ITEM(5, "Schattenschutz, Rang 5", GOSSIP_SENDER_MAIN, 4009);

                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());

                break;
            case 1207: // DeMorph
                player->CLOSE_GOSSIP_MENU();
                player->DeMorph();
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);				
                break;				
            case 4000:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48161, true);
                break;
            case 4001:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 25898, true);
                break;
            case 4002:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48934, true);
                break;
            case 4003:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48938, true);
                break;
            case 4004:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48469, true);
                break;
            case 4005:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 42995, true);
                break;
            case 4007:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 53307, true);
                break;
            case 4008:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48073, true);
                break;
            case 4009:
                player->CLOSE_GOSSIP_MENU();
                player->CastSpell(player, 48169, true);
                break;
				
				


			case 711: // Algalon
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(28641);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
			break;

			case 712: // Doomwalker
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(16630);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
			break;

			case 713: // Doomlord kazzak
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(17887);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.10f);
			break;

			case 714: // Onyxia
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(8570);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
			break;

			case 715: // Thaddius
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(16137);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
			break;

			case 716: // Gluth
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(16064);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
			break;

			case 717: // Maexxna
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(15928);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.15f);
			break;

			case 718: // Sapphiron
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(16033);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
			break;

			case 719: // Noth The Plaguebringer
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(16590);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.7f);
			break;

			case 720: // Kel'Thuzad
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(15945);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
			break;

			case 721: // Kael'thas Sunstrider
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(20023);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
			break;

			case 722: // C'thun
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(15786);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
			break;

			case 723: // Thrall
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(4527);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
			break;

			case 724: // Sylvanas Windrunner
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(28213);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
			break;

			case 725: // Alexstrasza, BElf
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(28227);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.8f);
			break;

			case 726: // Varian Wrynn
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(28127);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
			break;

			case 727: // Varimathras
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(28220);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.7f);
			break;

			case 728: // Alexstrasza, dragon
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(27569);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
			break;

			case 729: // Mal'ganis
				player->CLOSE_GOSSIP_MENU();
				player->SetDisplayId(26582);
				player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
			break;




//////////////////////////////////////////////////Funny ///////////////////////////////////////////////////////////////

case 751: // Gerky
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(29348);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 752: // Water elemental
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(12129);
		player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.3f);
break;

case 753: // Pandaren Monk
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(30414);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 754: // Lil' K.T
	player->CLOSE_GOSSIP_MENU();
	player->DeMorph();
    player->SetDisplayId(30507);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 755: // The Weapon you're Wearing
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15880);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.4f);
break;

case 756: // Red Bubbles
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(20262);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 757: // A Shark
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15555);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.2f);
break;

case 758: // A Fel cannon
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(18505);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
break;

case 759: // Human Female
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(100);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 760: // A Fat Human
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(103);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f);
break;

case 761: // A Rabbit
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(328);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
break;

case 762: // A Cool looking Bug
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15695);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;

case 763: // Eye Of C'thun
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15556);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
break;
				
case 764: // Murloc
    player->CLOSE_GOSSIP_MENU();
	player->SetDisplayId(15984);
	player->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
break;				
				
				
        }

        return true;
    }
Exemplo n.º 26
0
	bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
	{
		switch (action)
		{
            case 2:
				CompleteLearnProfession(player, creature, SKILL_ALCHEMY);
				player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
				player->CLOSE_GOSSIP_MENU();
				break;
			case 3:
				CompleteLearnProfession(player, creature, SKILL_BLACKSMITHING);
				player->learnSpell(17040, false);
				player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
				player->CLOSE_GOSSIP_MENU();
				break;
			case 4:
				CompleteLearnProfession(player, creature,  SKILL_ENCHANTING);
				player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
				player->CLOSE_GOSSIP_MENU();
				break;
			case 5:
				CompleteLearnProfession(player, creature, SKILL_ENGINEERING);
				player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
				player->CLOSE_GOSSIP_MENU();
				break;
			case 6:
				CompleteLearnProfession(player, creature, SKILL_HERBALISM);
				player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
				player->CLOSE_GOSSIP_MENU();
				break;
        case 7:
			CompleteLearnProfession(player, creature, SKILL_INSCRIPTION);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 8:
			CompleteLearnProfession(player, creature, SKILL_JEWELCRAFTING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 9:
			CompleteLearnProfession(player, creature, SKILL_LEATHERWORKING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 10:
			CompleteLearnProfession(player, creature, SKILL_MINING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 11:
			CompleteLearnProfession(player, creature, SKILL_SKINNING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 12:
			CompleteLearnProfession(player, creature, SKILL_TAILORING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 13:
			player->PlayerTalkClass->ClearMenus();
			player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, sObjectMgr->GetQuantumSystemTextForDBCLocale(TEXT_ID_COOKING), GOSSIP_SENDER_MAIN, 14);
			player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, sObjectMgr->GetQuantumSystemTextForDBCLocale(TEXT_ID_FIRST_AID), GOSSIP_SENDER_MAIN, 15);
			player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, sObjectMgr->GetQuantumSystemTextForDBCLocale(TEXT_ID_FISHING), GOSSIP_SENDER_MAIN, 16);
			player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, sObjectMgr->GetQuantumSystemTextForDBCLocale(TEXT_ID_MAIN_MENU), GOSSIP_SENDER_MAIN, 17);
			player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
			break;
        case 14:
			CompleteLearnProfession(player, creature, SKILL_COOKING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 15:
			CompleteLearnProfession(player, creature, SKILL_FIRST_AID);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
        case 16:
			CompleteLearnProfession(player, creature, SKILL_FISHING);
			player->CastSpell(player, SPELL_BLESSING_VISUAL, true);
			player->CLOSE_GOSSIP_MENU();
			break;
		case 17:
			OnGossipHello(player, creature);
			break;
		}
		return true;
	}
Exemplo n.º 27
0
    bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code)
    {
        player->PlayerTalkClass->ClearMenus();
        if (sender || action)
            return true; // should never happen
        if (!sT->GetEnableSets())
        {
            OnGossipHello(player, creature);
            return true;
        }
        std::string name(code);
        if (name.find('"') != std::string::npos || name.find('\\') != std::string::npos)
            player->GetSession()->SendNotification(LANG_PRESET_ERR_INVALID_NAME);
        else
        {
            for (uint8 presetID = 0; presetID < sT->GetMaxSets(); ++presetID) // should never reach over max
            {
                if (sT->presetByName[player->GetGUID()].find(presetID) != sT->presetByName[player->GetGUID()].end())
                    continue; // Just remember never to use presetByName[pGUID][presetID] when finding etc!

                int32 cost = 0;
                std::map<uint8, uint32> items;
                for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
                {
                    if (!sT->GetSlotName(slot, player->GetSession()))
                        continue;
                    if (Item* newItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
                    {
                        uint32 entry = sT->GetFakeEntry(newItem->GetGUID());
                        if (!entry)
                            continue;
                        const ItemTemplate* temp = sObjectMgr->GetItemTemplate(entry);
                        if (!temp)
                            continue;
                        if (!sT->SuitableForTransmogrification(player, temp))
                            continue;
                        cost += sT->GetSpecialPrice(temp);
                        items[slot] = entry;
                    }
                }
                if (items.empty())
                    break; // no transmogrified items were found to be saved
                cost *= sT->GetSetCostModifier();
                cost += sT->GetSetCopperCost();
                if (!player->HasEnoughMoney(cost))
                {
                    player->GetSession()->SendNotification(LANG_ERR_TRANSMOG_NOT_ENOUGH_MONEY);
                    break;
                }

                std::ostringstream ss;
                for (std::map<uint8, uint32>::iterator it = items.begin(); it != items.end(); ++it)
                {
                    ss << uint32(it->first) << ' ' << it->second << ' ';
                    sT->presetById[player->GetGUID()][presetID][it->first] = it->second;
                }
                sT->presetByName[player->GetGUID()][presetID] = name; // Make sure code doesnt mess up SQL!
                CharacterDatabase.PExecute("REPLACE INTO `custom_transmogrification_sets` (`Owner`, `PresetID`, `SetName`, `SetData`) VALUES (%u, %u, \"%s\", \"%s\")",  player->GetGUIDLow(), uint32(presetID), name.c_str(), ss.str().c_str());
                if (cost)
                    player->ModifyMoney(cost);
                break;
            }
        }
        //OnGossipSelect(player, creature, EQUIPMENT_SLOT_END+4, 0);
        player->CLOSE_GOSSIP_MENU(); // Wait for SetMoney to get fixed, issue #10053
        return true;
    }
Exemplo n.º 28
0
	bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 sender, uint32 uiAction)
	{
		pPlayer->PlayerTalkClass->ClearMenus();

		if (sender != GOSSIP_SENDER_MAIN)
			return false;

		uint32 dp = SelectDPoints(pPlayer);
		uint32 vp = SelectVPoints(pPlayer);

		switch(uiAction)
		{
		case 1: // Vip account - locked
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Back to Main Menu", GOSSIP_SENDER_MAIN, 1000);
			pPlayer->SEND_GOSSIP_MENU(60032, pCreature->GetGUID());
			break;

		case 2: // Vip account - unlocked
			if (pPlayer->GetSession()->GetSecurity() >= 1)
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You're already VIP or GM.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -30 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				LoginDatabase.PExecute("INSERT INTO `account_access` (`id`, `gmlevel`, `RealmID`) VALUES (%u, 1, -1);", pPlayer->GetSession()->GetAccountId());
				pPlayer->GetSession()->SendAreaTriggerMessage("Successfully upgraded your account to VIP. Quit the game and login again for changes to take effect! Thanks for the support!");
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 3: // VIP only character - locked
			pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Back to Main Menu", GOSSIP_SENDER_MAIN, 1000);
			pPlayer->SEND_GOSSIP_MENU(60033, pCreature->GetGUID());
			break;

		case 4: // VIP only character - unlocked
			if (pPlayer->GetSession()->GetSecurity() >= 1 || pPlayer->HasItemCount(ONE_CHARACTER_VIP, 1))
			{
				pPlayer->GetSession()->SendAreaTriggerMessage("You're already VIP or GM.");
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			else
			{
				LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -7 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
				pPlayer->GetSession()->SendAreaTriggerMessage("Successfully upgraded this character to VIP! Thanks for the support!");
				pPlayer->AddItem(ONE_CHARACTER_VIP, 1);
				pPlayer->SaveToDB();
				pPlayer->CLOSE_GOSSIP_MENU();
			}
			break;

		case 5: // Wrathful Offpiece / 1H Weapon / Mount - unlocked
			LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -1 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
			pPlayer->AddItem(44990, 25); // 25 Emblems of Relentless (Champion's Seal)
			pPlayer->SaveToDB();
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 6: // Wrathful Main Piece / 2H Weapon - unlocked
			LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -2 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
			pPlayer->AddItem(44990, 50); // 50 Emblems of Relentless (Champion's Seal)
			pPlayer->SaveToDB();
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 7: // Purchase Legendary Weapon - for Fun realm
			LoginDatabase.PExecute("UPDATE fusioncms_new.account_data SET dp = '%u' -5 WHERE id = '%u'", dp, pPlayer->GetSession()->GetAccountId());
			pPlayer->GetSession()->SendAreaTriggerMessage("Successfully purchased 15 Emblems of Legendary! Speak with Legendary Weapons NPC!");
			pPlayer->AddItem(40753, 15); // Emblem of Valor (Emblem of Legendary)
			pPlayer->SaveToDB();
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 8: // Donation titles
			if (dp >= 1)
			{
				pPlayer->ADD_GOSSIP_ITEM(4, "Conqueror (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 9);
				pPlayer->ADD_GOSSIP_ITEM(4, "Justicar (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 10);
				pPlayer->ADD_GOSSIP_ITEM(4, "Battlemaster (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 11);
				pPlayer->ADD_GOSSIP_ITEM(4, "Scarab Lord (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 12);
				pPlayer->ADD_GOSSIP_ITEM(4, "Brewmaster (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 13);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Love Fool (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 14);
				pPlayer->ADD_GOSSIP_ITEM(4, "Matron (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 15);
				pPlayer->ADD_GOSSIP_ITEM(4, "Patron (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 16);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Hallowed (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 17);
				pPlayer->ADD_GOSSIP_ITEM(4, "Merrymaker (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 18);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Noble (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 19);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Pilgrim (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 20);
				pPlayer->ADD_GOSSIP_ITEM(4, "Flame Keeper (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 21);
				pPlayer->ADD_GOSSIP_ITEM(4, "Flame Warden (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 22);
				pPlayer->ADD_GOSSIP_ITEM(4, "Elder (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 23);
				pPlayer->ADD_GOSSIP_ITEM(4, "Jenkins (|cff009900Unlocked|r)", GOSSIP_SENDER_MAIN, 24);
				pPlayer->ADD_GOSSIP_ITEM(4, "Back to Main Page", GOSSIP_SENDER_MAIN, 1000);
				pPlayer->SEND_GOSSIP_MENU(60013, pCreature->GetGUID());
			}
			else if (dp < 1)
			{
				pPlayer->ADD_GOSSIP_ITEM(4, "Conqueror (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Justicar (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Battlemaster (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Scarab Lord (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Brewmaster (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Love Fool (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Matron (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Patron (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Hallowed (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Merrymaker (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Noble (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "The Pilgrim (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Flame Keeper (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Flame Warden (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Elder (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Jenkins (|cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 998);
				pPlayer->ADD_GOSSIP_ITEM(4, "Back to Main Page", GOSSIP_SENDER_MAIN, 1000);
				pPlayer->SEND_GOSSIP_MENU(60013, pCreature->GetGUID());
			}
			break;

		case 9: // Conqueror
			RewardTitle(pPlayer, 47);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 10: // Justicar
			RewardTitle(pPlayer, 48);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 11: // Battlemaster
			RewardTitle(pPlayer, 72);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 12: // Scarab Lord
			RewardTitle(pPlayer, 46);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 13: // Brewmaster
			RewardTitle(pPlayer, 133);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 14: // the Love Fool
			RewardTitle(pPlayer, 135);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 15: // Matron
			RewardTitle(pPlayer, 137);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 16: // Patron
			RewardTitle(pPlayer, 138);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 17: // The Hallowed
			RewardTitle(pPlayer, 124);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 18: // Merrymaker
			RewardTitle(pPlayer, 134);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 19: // The Noble
			RewardTitle(pPlayer, 155);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 20: // The Pilgrim
			RewardTitle(pPlayer, 168);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 21: // Flame Keeper
			RewardTitle(pPlayer, 76);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 22: // Flame Warden
			RewardTitle(pPlayer, 75);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 23: // Elder
			RewardTitle(pPlayer, 74);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 24: // Jenkins
			RewardTitle(pPlayer, 143);
			pPlayer->CLOSE_GOSSIP_MENU();
			break;

		case 998: // Not enought points
			pPlayer->GetSession()->SendAreaTriggerMessage("Not enought donation points.");
			OnGossipHello(pPlayer, pCreature);
			break;

		case 999: // Show donate points
			pPlayer->GetSession()->SendAreaTriggerMessage("Donation points: %u", dp);
			pPlayer->GetSession()->SendAreaTriggerMessage("Voting points: %u", vp);
			OnGossipHello(pPlayer, pCreature);
			break;

		case 1000: // Back to main menu
			OnGossipHello(pPlayer, pCreature);
			break;
		}
		return true;
	}
Exemplo n.º 29
0
    bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
    {
        player->PlayerTalkClass->ClearMenus();
        WorldSession* session = player->GetSession();
        switch(sender)
        {
        case EQUIPMENT_SLOT_END: // Show items you can use
            ShowTransmogItems(player, creature, action);
            break;
        case EQUIPMENT_SLOT_END+1: // Main menu
            OnGossipHello(player, creature);
            break;
        case EQUIPMENT_SLOT_END+2: // Remove Transmogrifications
            {
                bool removed = false;
                SQLTransaction trans = CharacterDatabase.BeginTransaction();
                for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
                {
                    if (Item* newItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
                    {
                        if (!sT->GetFakeEntry(newItem->GetGUID()))
                            continue;
                        sT->DeleteFakeEntry(player, slot, newItem, &trans);
                        removed = true;
                    }
                }
                if (removed)
                {
                    session->SendAreaTriggerMessage(GTS(LANG_ERR_UNTRANSMOG_OK));
                    CharacterDatabase.CommitTransaction(trans);
                }
                else
                    session->SendNotification(LANG_ERR_UNTRANSMOG_NO_TRANSMOGS);
                OnGossipHello(player, creature);
            } break;
        case EQUIPMENT_SLOT_END+3: // Remove Transmogrification from single item
            {
                if (Item* newItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, action))
                {
                    if (sT->GetFakeEntry(newItem->GetGUID()))
                    {
                        sT->DeleteFakeEntry(player, action, newItem);
                        session->SendAreaTriggerMessage(GTS(LANG_ERR_UNTRANSMOG_OK));
                    }
                    else
                        session->SendNotification(LANG_ERR_UNTRANSMOG_NO_TRANSMOGS);
                }
                OnGossipSelect(player, creature, EQUIPMENT_SLOT_END, action);
            } break;
#ifdef PRESETS
        case EQUIPMENT_SLOT_END+4: // Presets menu
            {
                if (!sT->GetEnableSets())
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                if (sT->GetEnableSetInfo())
                    player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Book_11:30:30:-18:0|tHow sets work", EQUIPMENT_SLOT_END+10, 0);
                for (Transmogrification::presetIdMap::const_iterator it = sT->presetByName[player->GetGUID()].begin(); it != sT->presetByName[player->GetGUID()].end(); ++it)
                    player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Statue_02:30:30:-18:0|t"+it->second, EQUIPMENT_SLOT_END+6, it->first);

                if (sT->presetByName[player->GetGUID()].size() < sT->GetMaxSets())
                    player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|tSave set", EQUIPMENT_SLOT_END+8, 0);
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", EQUIPMENT_SLOT_END+1, 0);
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
            } break;
        case EQUIPMENT_SLOT_END+5: // Use preset
            {
                if (!sT->GetEnableSets())
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                // action = presetID
                for (Transmogrification::slotMap::const_iterator it = sT->presetById[player->GetGUID()][action].begin(); it != sT->presetById[player->GetGUID()][action].end(); ++it)
                {
                    if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, it->first))
                        sT->PresetTransmog(player, item, it->second, it->first);
                }
                OnGossipSelect(player, creature, EQUIPMENT_SLOT_END+6, action);
            } break;
        case EQUIPMENT_SLOT_END+6: // view preset
            {
                if (!sT->GetEnableSets())
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                // action = presetID
                for (Transmogrification::slotMap::const_iterator it = sT->presetById[player->GetGUID()][action].begin(); it != sT->presetById[player->GetGUID()][action].end(); ++it)
                    player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(it->second, 30, 30, -18, 0)+sT->GetItemLink(it->second, session), sender, action);

                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Statue_02:30:30:-18:0|tUse set", EQUIPMENT_SLOT_END+5, action, "Using this set for transmogrify will bind transmogrified items to you and make them non-refundable and non-tradeable.\nDo you wish to continue?\n\n"+sT->presetByName[player->GetGUID()][action], 0, false);
                player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-LeaveItem-Opaque:30:30:-18:0|tDelete set", EQUIPMENT_SLOT_END+7, action, "Are you sure you want to delete "+sT->presetByName[player->GetGUID()][action]+"?", 0, false);
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", EQUIPMENT_SLOT_END+4, 0);
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
            } break;
        case EQUIPMENT_SLOT_END+7: // Delete preset
            {
                if (!sT->GetEnableSets())
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                // action = presetID
                CharacterDatabase.PExecute("DELETE FROM `custom_transmogrification_sets` WHERE Owner = %u AND PresetID = %u",  player->GetGUIDLow(), action);
                sT->presetById[player->GetGUID()][action].clear();
                sT->presetById[player->GetGUID()].erase(action);
                sT->presetByName[player->GetGUID()].erase(action);

                OnGossipSelect(player, creature, EQUIPMENT_SLOT_END+4, 0);
            } break;
        case EQUIPMENT_SLOT_END+8: // Save preset
            {
                if (!sT->GetEnableSets() || sT->presetByName[player->GetGUID()].size() >= sT->GetMaxSets())
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                uint32 cost = 0;
                bool canSave = false;
                for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
                {
                    if (!sT->GetSlotName(slot, session))
                        continue;
                    if (Item* newItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
                    {
                        uint32 entry = sT->GetFakeEntry(newItem->GetGUID());
                        if (!entry)
                            continue;
                        const ItemTemplate* temp = sObjectMgr->GetItemTemplate(entry);
                        if (!temp)
                            continue;
                        if (!sT->SuitableForTransmogrification(player, temp)) // no need to check?
                            continue;
                        cost += sT->GetSpecialPrice(temp);
                        canSave = true;
                        player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(entry, 30, 30, -18, 0)+sT->GetItemLink(entry, session), EQUIPMENT_SLOT_END+8, 0);
                    }
                }
                if (canSave)
                    player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|tSave set", 0, 0, "Insert set name", cost*sT->GetSetCostModifier()+sT->GetSetCopperCost(), true);
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", sender, action);
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", EQUIPMENT_SLOT_END+4, 0);
                player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
            } break;
        case EQUIPMENT_SLOT_END+10: // Set info
            {
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", EQUIPMENT_SLOT_END+4, 0);
                player->SEND_GOSSIP_MENU(sT->GetSetNpcText(), creature->GetGUID());
            } break;
#endif
        case EQUIPMENT_SLOT_END+9: // Transmog info
            {
                player->ADD_GOSSIP_ITEM(GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", EQUIPMENT_SLOT_END+1, 0);
                player->SEND_GOSSIP_MENU(sT->GetTransmogNpcText(), creature->GetGUID());
            } break;
        default: // Transmogrify
            {
                if (!sender && !action)
                {
                    OnGossipHello(player, creature);
                    return true;
                }
                // sender = slot, action = display
                TransmogTrinityStrings res = sT->Transmogrify(player, MAKE_NEW_GUID(action, 0, HIGHGUID_ITEM), sender);
                if (res == LANG_ERR_TRANSMOG_OK)
                    session->SendAreaTriggerMessage(GTS(LANG_ERR_TRANSMOG_OK));
                else
                    session->SendNotification(res);
                // OnGossipSelect(player, creature, EQUIPMENT_SLOT_END, sender);
                // ShowTransmogItems(player, creature, sender);
                player->CLOSE_GOSSIP_MENU(); // Wait for SetMoney to get fixed, issue #10053
            } break;
        }
        return true;
    }
Exemplo n.º 30
0
	bool OnGossipSelect(Player* player, Creature * creature, uint32 sender, uint32 actions)
	{
		player->PlayerTalkClass->ClearMenus();

		if (sender != GOSSIP_SENDER_MAIN || actions <= GOSSIP_ACTION_INFO_DEF)
		{
			player->CLOSE_GOSSIP_MENU();
			return true;
		}

		switch (actions)
		{
		case GOSSIP_ACTION_INFO_DEF + 2:
			player->TeleportTo(1, 6457.238281f, -4244.459473f, 667.190369f, 1.446752f);
			player->CLOSE_GOSSIP_MENU();
			return true;

		case GOSSIP_ACTION_INFO_DEF + 1:
			player->TeleportTo(0, 0.0f, 0.0f, 0.0f, 0.0f);
			player->CLOSE_GOSSIP_MENU();
			return true;

		case GOSSIP_ACTION_INFO_DEF + 3:
			for (int i = 0; i < sizeof(buffIdstools) / sizeof(*buffIdstools); ++i)
				player->CastSpell(player, buffIdstools[i]);
			break;

		case GOSSIP_ACTION_INFO_DEF + 4: // Reset Talents
			player->resetTalents(true);
			player->SendTalentsInfoData(false);
			player->GetSession()->SendAreaTriggerMessage("Your talents has been reset.", player->GetGUID(), true);
			break;

		case GOSSIP_ACTION_INFO_DEF + 5: // Remove my siccness
			if (player->HasAura(15007))
				player->RemoveAura(15007);
			break;

		case GOSSIP_ACTION_INFO_DEF + 6: // reset my CD'S
			player->SetFullHealth();
			player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
			player->RemoveAllSpellCooldown();
			break;

		case GOSSIP_ACTION_INFO_DEF + 7: // repair my items
			player->DurabilityRepairAll(false, 0.0f, false);
			break;

		case GOSSIP_ACTION_INFO_DEF + 8: // Clear Combat
			player->CombatStop();
			break;

		case GOSSIP_ACTION_INFO_DEF + 9: // Reset all Instances For PvE 
			for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
			{
				Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i));
				for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
				{
					player->UnbindInstance(itr, Difficulty(i));
				}
			}
			break;

		default: // Close
			player->CLOSE_GOSSIP_MENU();
			return true;
		}

		OnGossipHello(player, creature);
		return true;
	}