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; }
bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) { switch (uiAction) { case 196: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Alchemy", GOSSIP_SENDER_MAIN, 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Blacksmithing", GOSSIP_SENDER_MAIN, 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Leatherworking", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tailoring", GOSSIP_SENDER_MAIN, 4); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Engineering", GOSSIP_SENDER_MAIN, 5); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Enchanting", GOSSIP_SENDER_MAIN, 6); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Jewelcrafting", GOSSIP_SENDER_MAIN, 7); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Inscription", GOSSIP_SENDER_MAIN, 8); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Cooking", GOSSIP_SENDER_MAIN, 9); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "First Aid", GOSSIP_SENDER_MAIN, 10); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Herbalism", GOSSIP_SENDER_MAIN, 11); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Skinning", GOSSIP_SENDER_MAIN, 12); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Mining", GOSSIP_SENDER_MAIN, 13); pPlayer->PlayerTalkClass->SendGossipMenu(907, _creature->GetGUID()); break; case 1: if(pPlayer->HasSkill(SKILL_ALCHEMY)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ALCHEMY); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 2: if(pPlayer->HasSkill(SKILL_BLACKSMITHING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_BLACKSMITHING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 3: if(pPlayer->HasSkill(SKILL_LEATHERWORKING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_LEATHERWORKING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 4: if(pPlayer->HasSkill(SKILL_TAILORING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_TAILORING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 5: if(pPlayer->HasSkill(SKILL_ENGINEERING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ENGINEERING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 6: if(pPlayer->HasSkill(SKILL_ENCHANTING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ENCHANTING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 7: if(pPlayer->HasSkill(SKILL_JEWELCRAFTING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_JEWELCRAFTING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 8: if(pPlayer->HasSkill(SKILL_INSCRIPTION)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_INSCRIPTION); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 9: if(pPlayer->HasSkill(SKILL_COOKING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_COOKING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 10: if(pPlayer->HasSkill(SKILL_FIRST_AID)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_FIRST_AID); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 11: if(pPlayer->HasSkill(SKILL_HERBALISM)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_HERBALISM); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 12: if(pPlayer->HasSkill(SKILL_SKINNING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_SKINNING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 13: if(pPlayer->HasSkill(SKILL_MINING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_MINING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; } } return true; }
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; }
bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 SKILL) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) { switch (SKILL) { case 1: // Primary Proffs /*if (pPlayer->HasItemCount(40752, 5)) // Emblem of Wrathful { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Alchemy (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_ALCHEMY); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Blacksmithing (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_BLACKSMITHING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Enchanting (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_ENCHANTING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Engineering (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_ENGINEERING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Herbalism (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_HERBALISM); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Inscription (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_INSCRIPTION); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Jewelcrafting (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_JEWELCRAFTING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Leatherworking (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_LEATHERWORKING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Mining (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_MINING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Skinning (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_SKINNING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Tailoring (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_TAILORING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); } else { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Alchemy (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Blacksmithing (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Enchanting (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Engineering (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Herbalism (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Inscription (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Jewelcrafting (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Leatherworking (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Mining (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Skinning (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Tailoring (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); } else {*/ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Alchemy", GOSSIP_SENDER_MAIN, SKILL_ALCHEMY); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Blacksmithing", GOSSIP_SENDER_MAIN, SKILL_BLACKSMITHING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Enchanting", GOSSIP_SENDER_MAIN, SKILL_ENCHANTING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Engineering", GOSSIP_SENDER_MAIN, SKILL_ENGINEERING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Herbalism", GOSSIP_SENDER_MAIN, SKILL_HERBALISM); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Inscription", GOSSIP_SENDER_MAIN, SKILL_INSCRIPTION); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Jewelcrafting", GOSSIP_SENDER_MAIN, SKILL_JEWELCRAFTING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Leatherworking", GOSSIP_SENDER_MAIN, SKILL_LEATHERWORKING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Mining", GOSSIP_SENDER_MAIN, SKILL_MINING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Skinning", GOSSIP_SENDER_MAIN, SKILL_SKINNING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Tailoring", GOSSIP_SENDER_MAIN, SKILL_TAILORING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); /*}*/ break; case 2: // Secondary Proffs /*if (pPlayer->HasItemCount(40752, 5)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Cooking (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_COOKING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "First Aid (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_FIRST_AID); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Fishing (|cff00FF66Unlocked|r)", GOSSIP_SENDER_MAIN, SKILL_FISHING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); } else { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Cooking (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "First Aid (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Fishing (5 EoW - |cffD80000Locked|r)", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); } } else {*/ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Cooking", GOSSIP_SENDER_MAIN, SKILL_COOKING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "First Aid", GOSSIP_SENDER_MAIN, SKILL_FIRST_AID); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, "Fishing", GOSSIP_SENDER_MAIN, SKILL_FISHING); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Back to Main Page", GOSSIP_SENDER_MAIN, 5); pPlayer->PlayerTalkClass->SendGossipMenu(60030, _creature->GetGUID()); /*}*/ break; /*case 3: // No enought EoW pPlayer->GetSession()->SendAreaTriggerMessage("You need at least 5 Emblems of Wrathful to purchase a profession."); pPlayer->CLOSE_GOSSIP_MENU(); break;*/ case 5: // Main Page OnGossipHello(pPlayer, _creature); break; default: { if (pPlayer->HasSkill(SKILL)) pPlayer->GetSession()->SendNotification("You already have that skill"); else { CompleteLearnProfession(pPlayer, (SkillType)SKILL); /*if (sWorld->getBoolConfig(REALM_IS_TOURNAMENT_ENABLED)) pPlayer->DestroyItemCount(40752, 5, true); // Emblem of Wrathful*/ pPlayer->CLOSE_GOSSIP_MENU(); } } } } return true; }
bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) { switch (uiAction) { case 196: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\trade_alchemy:30|t Alchemy", GOSSIP_SENDER_MAIN, 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\trade_blacksmithing:30|t Blacksmithing", GOSSIP_SENDER_MAIN, 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\inv_misc_armorkit_17:30|t Leatherworking", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\trade_tailoring:30|t Tailoring", GOSSIP_SENDER_MAIN, 4); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\trade_engineering:30|t Engineering", GOSSIP_SENDER_MAIN, 5); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\trade_engraving:30|t Enchanting", GOSSIP_SENDER_MAIN, 6); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\inv_misc_gem_01:30|t Jewelcrafting", GOSSIP_SENDER_MAIN, 7); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\inv_inscription_tradeskill01:30|t Inscription", GOSSIP_SENDER_MAIN, 8); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\inv_misc_food_15:30|t Cooking", GOSSIP_SENDER_MAIN, 9); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface\\icons\\spell_holy_sealofsacrifice:30|t First Aid", GOSSIP_SENDER_MAIN, 10); pPlayer->PlayerTalkClass->SendGossipMenu(907, _creature->GetGUID()); break; case 1: CompleteLearnProfession(pPlayer, _creature, SKILL_ALCHEMY); pPlayer->CLOSE_GOSSIP_MENU(); break; case 2: CompleteLearnProfession(pPlayer, _creature, SKILL_BLACKSMITHING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 3: CompleteLearnProfession(pPlayer, _creature, SKILL_LEATHERWORKING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 4: CompleteLearnProfession(pPlayer, _creature, SKILL_TAILORING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 5: CompleteLearnProfession(pPlayer, _creature, SKILL_ENGINEERING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 6: CompleteLearnProfession(pPlayer, _creature, SKILL_ENCHANTING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 7: CompleteLearnProfession(pPlayer, _creature, SKILL_JEWELCRAFTING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 8: CompleteLearnProfession(pPlayer, _creature, SKILL_INSCRIPTION); pPlayer->CLOSE_GOSSIP_MENU(); break; case 9: CompleteLearnProfession(pPlayer, _creature, SKILL_COOKING); pPlayer->CLOSE_GOSSIP_MENU(); break; case 10: CompleteLearnProfession(pPlayer, _creature, SKILL_FIRST_AID); pPlayer->CLOSE_GOSSIP_MENU(); break; } } return true; }
bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) { switch (uiAction) { case 196: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\trade_alchemy:30|t Alchemy.", GOSSIP_SENDER_MAIN, 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\INV_Ingot_05:30|t Blacksmithing.", GOSSIP_SENDER_MAIN, 2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\INV_Misc_LeatherScrap_02:30|t Leatherworking.", GOSSIP_SENDER_MAIN, 3); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\INV_Fabric_Felcloth_Ebon:30|t Tailoring.", GOSSIP_SENDER_MAIN, 4); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\inv_misc_wrench_01:30|t Engineering.", GOSSIP_SENDER_MAIN, 5); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\trade_engraving:30|t Enchanting.", GOSSIP_SENDER_MAIN, 6); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\inv_misc_gem_01:30|t Jewelcrafting.", GOSSIP_SENDER_MAIN, 7); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\INV_Scroll_08:30|t Inscription.", GOSSIP_SENDER_MAIN, 8); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\INV_Misc_Herb_07:30|t Herbalism.", GOSSIP_SENDER_MAIN, 9); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\inv_misc_pelt_wolf_01:30|t Skinning.", GOSSIP_SENDER_MAIN, 10); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface\\icons\\trade_mining:30|t Mining.", GOSSIP_SENDER_MAIN, 11); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "|TInterface/ICONS/Thrown_1H_Harpoon_D_01Blue:30|t Nevermind!", GOSSIP_SENDER_MAIN, 12); pPlayer->PlayerTalkClass->SendGossipMenu(1, _creature->GetGUID()); break; case 1: if(pPlayer->HasSkill(SKILL_ALCHEMY)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ALCHEMY); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 2: if(pPlayer->HasSkill(SKILL_BLACKSMITHING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_BLACKSMITHING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 3: if(pPlayer->HasSkill(SKILL_LEATHERWORKING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_LEATHERWORKING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 4: if(pPlayer->HasSkill(SKILL_TAILORING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_TAILORING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 5: if(pPlayer->HasSkill(SKILL_ENGINEERING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ENGINEERING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 6: if(pPlayer->HasSkill(SKILL_ENCHANTING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_ENCHANTING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 7: if(pPlayer->HasSkill(SKILL_JEWELCRAFTING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_JEWELCRAFTING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 8: if(pPlayer->HasSkill(SKILL_INSCRIPTION)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_INSCRIPTION); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 9: if(pPlayer->HasSkill(SKILL_HERBALISM)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_HERBALISM); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 10: if(pPlayer->HasSkill(SKILL_SKINNING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_SKINNING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 11: if(pPlayer->HasSkill(SKILL_MINING)) { pPlayer->PlayerTalkClass->SendCloseGossip(); break; } CompleteLearnProfession(pPlayer, _creature, SKILL_MINING); pPlayer->PlayerTalkClass->SendCloseGossip(); break; case 12: pPlayer->PlayerTalkClass->SendCloseGossip(); break; } } return true; }
bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction) { player->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) { switch (uiAction) { case 0: OnGossipHello(player, creature); break; case 1: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/icons/Spell_ChargeNegative:30|t Назад.|r", GOSSIP_SENDER_MAIN, 0); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Alchemy:30|t Алхимия: Мастер трансмутации.|r", GOSSIP_SENDER_MAIN, 10); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Alchemy:30|t Алхимия: Мастер эликсиров.|r", GOSSIP_SENDER_MAIN, 11); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Alchemy:30|t Алхимия: Мастер Зелья.|r", GOSSIP_SENDER_MAIN, 12); player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID()); break; case 10: CompleteLearnProfession(player, creature, SKILL_ALCHEMY); player->removeSpell(28677, false); player->removeSpell(28675, false); player->CLOSE_GOSSIP_MENU(); break; case 11: CompleteLearnProfession(player, creature, SKILL_ALCHEMY); player->removeSpell(28672, false); player->removeSpell(28675, false); player->CLOSE_GOSSIP_MENU(); break; case 12: CompleteLearnProfession(player, creature, SKILL_ALCHEMY); player->removeSpell(28677, false); player->removeSpell(28672, false); player->CLOSE_GOSSIP_MENU(); break; case 2: CompleteLearnProfession(player, creature, SKILL_BLACKSMITHING); player->CLOSE_GOSSIP_MENU(); break; case 3: CompleteLearnProfession(player, creature, SKILL_LEATHERWORKING); player->CLOSE_GOSSIP_MENU(); break; case 4: CompleteLearnProfession(player, creature, SKILL_TAILORING); player->CLOSE_GOSSIP_MENU(); break; case 5: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/icons/Spell_ChargeNegative:30|t Назад!|r", GOSSIP_SENDER_MAIN, 0); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Engineering:30|t Гномская инженерия.|r", GOSSIP_SENDER_MAIN, 13); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Engineering:30|t Гоблинская инженерия.|r", GOSSIP_SENDER_MAIN, 14); player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID()); break; case 13: CompleteLearnProfession(player, creature, SKILL_ENGINEERING); player->removeSpell(20222, false); player->removeSpell(82207, false); player->removeSpell(105518, false); player->CLOSE_GOSSIP_MENU(); break; case 14: CompleteLearnProfession(player, creature, SKILL_ENGINEERING); player->removeSpell(20219, false); player->removeSpell(82207, false); player->removeSpell(105518, false); player->CLOSE_GOSSIP_MENU(); break; case 6: CompleteLearnProfession(player, creature, SKILL_ENCHANTING); player->CLOSE_GOSSIP_MENU(); break; case 7: CompleteLearnProfession(player, creature, SKILL_JEWELCRAFTING); player->CLOSE_GOSSIP_MENU(); break; case 8: CompleteLearnProfession(player, creature, SKILL_INSCRIPTION); player->CLOSE_GOSSIP_MENU(); break; case 9: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "|TInterface/icons/Spell_ChargeNegative:30|t Назад!|r", GOSSIP_SENDER_MAIN, 0); if (!player->HasSkill(SKILL_FIRST_AID)/* || player->GetClass() == CLASS_DEATH_KNIGHT*/) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Spell_Holy_SealOfSacrifice:30|t Первая помощь.|r", GOSSIP_SENDER_MAIN, 15); if (!player->HasSkill(SKILL_FISHING)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/Trade_Fishing:30|t Рыбная ловля.|r", GOSSIP_SENDER_MAIN, 16); if (!player->HasSkill(SKILL_COOKING)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/INV_Misc_Food_15:30|t Кулинария.|r", GOSSIP_SENDER_MAIN, 17); if (!player->HasSkill(SKILL_ARCHAEOLOGY)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "|TInterface/ICONS/INV_Misc_Food_15:30|t Археология.|r", GOSSIP_SENDER_MAIN, 18); player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID()); break; case 15: CompleteLearnProfession(player, creature, SKILL_FIRST_AID); player->CLOSE_GOSSIP_MENU(); break; case 16: CompleteLearnProfession(player, creature, SKILL_FISHING); player->CLOSE_GOSSIP_MENU(); break; case 17: CompleteLearnProfession(player, creature, SKILL_COOKING); player->CLOSE_GOSSIP_MENU(); break; case 18: CompleteLearnProfession(player, creature, SKILL_ARCHAEOLOGY); player->CLOSE_GOSSIP_MENU(); break; case 19: CompleteLearnProfession(player, creature, SKILL_HERBALISM); player->CLOSE_GOSSIP_MENU(); break; case 20: CompleteLearnProfession(player, creature, SKILL_MINING); player->CLOSE_GOSSIP_MENU(); break; case 21: CompleteLearnProfession(player, creature, SKILL_SKINNING); player->CLOSE_GOSSIP_MENU(); break; } } return true; }