Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #include "ScriptedEscortAI.h"
- #include "ObjectMgr.h"
- #include "ScriptMgr.h"
- enum NpcText
- {
- E_MAIN = 930004,
- E_ENCHANTLIST = 930005,
- E_CATLIST = 930006
- };
- enum ClassItem
- {
- CLASS_ITEM_WEAPON = 2,
- CLASS_ITEM_ARMOR = 4
- };
- enum SubClassItem
- {
- SUBCLASS_ITEM_TWOHAND_MACE = 5,
- SUBCLASS_ITEM_TWOHAND_ACE = 1,
- SUBCLASS_ITEM_TWOHAND_SWORD = 8,
- SUBCLASS_ITEM_TWOHAND_STAFF = 10,
- SUBCLASS_ITEM_TWOHAND_POLEARN = 6,
- SUBCLASS_ITEM_RANGED_BOW = 2,
- SUBCLASS_ITEM_RANGED_CROSSBOW = 18,
- SUBCLASS_ITEM_RANGED_GUN = 3,
- SUBCLASS_ITEM_ARMOR_SHIELD = 6
- };
- enum MenuTabs
- {
- TAB_MAIN = 0,
- TAB_HEAD = 1,
- TAB_SHOULDERS = 2,
- TAB_CHEST = 3,
- TAB_WAIST = 4,
- TAB_LEGS = 5,
- TAB_FEET = 6,
- TAB_WRISTS = 7,
- TAB_HANDS = 8,
- TAB_FINGER = 9,
- TAB_FINGER_FIRST = 10,
- TAB_FINGER_SECOND = 11,
- TAB_BACK = 12,
- TAB_WEAPON = 13,
- TAB_WEAPON_TWO_HAND = 14,
- TAB_WEAPON_TWO_HAND_MAIN = 15,
- TAB_WEAPON_TWO_HAND_OFF = 16,
- TAB_WEAPON_ONE_HAND = 17,
- TAB_WEAPON_ONE_HAND_MAIN = 18,
- TAB_WEAPON_ONE_HAND_OFF = 19,
- TAB_WEAPON_SHIELD = 20,
- TAB_WEAPON_RANGED = 21
- };
- enum StartAction
- {
- ACTION_START_HEAD = 100,
- ACTION_START_SHOULDERS = 200,
- ACTION_START_CHEST = 300,
- ACTION_START_WAIST = 400,
- ACTION_START_LEGS = 500,
- ACTION_START_FEET = 600,
- ACTION_START_WRISTS = 700,
- ACTION_START_HAND = 800,
- ACTION_START_FINGER_FIRST = 900,
- ACTION_START_FINGER_SECOND = 1000,
- ACTION_START_WEAPON_TWO_MAIN = 1100,
- ACTION_START_WEAPON_TWO_OFF = 1200,
- ACTION_START_WEAPON_ONE_MAIN = 1300,
- ACTION_START_WEAPON_ONE_OFF = 1400,
- ACTION_START_WEAPON_SHIELD = 1500,
- ACTION_START_WEAPON_RANGED = 1600,
- ACTION_START_BACK = 1700
- };
- enum EndAction
- {
- ACTION_END_HEAD = 199,
- ACTION_END_SHOULDERS = 299,
- ACTION_END_CHEST = 399,
- ACTION_END_WAIST = 499,
- ACTION_END_LEGS = 599,
- ACTION_END_FEET = 699,
- ACTION_END_WRISTS = 799,
- ACTION_END_HAND = 899,
- ACTION_END_FINGER_FIRST = 999,
- ACTION_END_FINGER_SECOND = 1099,
- ACTION_END_WEAPON_TWO_MAIN = 1199,
- ACTION_END_WEAPON_TWO_OFF = 1299,
- ACTION_END_WEAPON_ONE_MAIN = 1399,
- ACTION_END_WEAPON_ONE_OFF = 1499,
- ACTION_END_WEAPON_SHIELD = 1599,
- ACTION_END_WEAPON_RANGED = 1699,
- ACTION_END_BACK = 1799
- };
- enum Head
- {
- HEAD_ARCANUM_OF_TRIUMPH = 3795,
- HEAD_ARCANUM_OF_TORMENT = 3817,
- HEAD_ARCANUM_OF_DOMINANCE = 3797,
- HEAD_ARCANUM_OF_BURNING_MYSTERIES = 3820,
- HEAD_ARCANUM_OF_THE_SAVAGE_GLADIATOR = 3842,
- HEAD_ARCANUM_OF_OF_BLISSFUL_MENDING = 3819
- };
- enum Shoulders
- {
- SHOULDERS_GREATER_INSCRIPTION_OF_THE_AXE = 3808,
- SHOULDERS_GREATER_INSCRIPTION_OF_THE_CRAG = 3809,
- SHOULDERS_GREATER_INSCRIPTION_OF_THE_PINNACLE = 3811,
- SHOULDERS_GREATER_INSCRIPTION_OF_THE_STORM = 3810,
- SHOULDERS_MASTERS_INSCRIPTION_OF_THE_AXE = 3835,
- SHOULDERS_MASTERS_INSCRIPTION_OF_THE_CRAG = 3836,
- SHOULDERS_MASTERS_INSCRIPTION_OF_THE_PINNACLE = 3837,
- SHOULDERS_MASTERS_INSCRIPTION_OF_THE_STORM = 3838
- };
- enum Chest
- {
- CHEST_EXCEPTIONAL_MANA = 3233,
- CHEST_EXCEPTIONAL_RESILIENCE = 3245,
- CHEST_GREATER_DEFENSE = 1953,
- CHEST_GREATER_MANA_RESTORATION = 2381,
- CHEST_POWERFUL_STATS = 3832,
- CHEST_SUPER_HEALTH = 3297
- };
- enum Waist
- {
- WAIST_ETERNAL_BELT_BUCKLE = 3729,
- WAIST_FRAG_BELT = 3601
- };
- enum Legs
- {
- LEGS_BRILLIANT_SPELLTHREAD = 3719,
- LEGS_SAPPHIRE_SPELLTHREAD = 3721,
- LEGS_ICESCALE_LEG_ARMOR = 3823,
- LEGS_FROSTHIDE_LEG_ARMOR = 3822,
- LEGS_EARTHEN_LEG_ARMOR = 3853
- };
- enum Feet
- {
- FEET_GREATER_ASSAULT = 1597,
- FEET_GREATER_FORTITUDE = 1075,
- FEET_GREATER_SPIRIT = 1147,
- FEET_ICEWALKER = 3826,
- FEET_NITRO_BOOTS = 3606,
- FEET_SUPERIOR_AGILITY = 983,
- FEET_TUSKARS_VITALITY = 3232
- };
- enum Wrists
- {
- WRITS_EXCEPTIONAL_INTELLECT = 1119,
- WRITS_EXPERTISE = 3231,
- WRITS_GREATER_ASSAULT = 3845,
- WRITS_MAJOR_SPIRIT = 1147,
- WRITS_MAJOR_STAMINA = 3850,
- WRITS_SUPERIOR_SPELLPOWER = 2332,
- WRITS_SOCKET_BRACER = 3717
- };
- enum Hands
- {
- HANDS_ARMSMAN = 3253,
- HANDS_CRUSHER = 1603,
- HANDS_EXCEPTIONAL_SPELLPOWER = 3246,
- HANDS_GREATER_BLASTING = 3249,
- HANDS_MAJOR_AGILITY = 3222,
- HANDS_PRECISION = 3234,
- HANDS_HANDMOUNTED_PYRO_ROCKET = 3723,
- HANDS_HYPERSPEED_ACCELERATORS = 3603,
- HANDS_SOCKET_GLOVES = 3723
- };
- enum Finger
- {
- FINGER_GREATER_SPPED = 3831,
- FINGER_MAJOR_AGILITY = 1099,
- FINGER_MIGHTY_ARMOR = 3294,
- FINGER_SHADOW_ARMOR = 3256,
- FINGER_SPELL_PIERCING = 3243,
- FINGER_TITANWEAVE = 1951,
- FINGER_WISDOM = 3296,
- FINGER_DARKGLOW_EMBROIDERY = 3728,
- FINGER_LIGHTWEAVE_EMBROIDERY = 3722,
- FINGER_SWORDGUARD_EMBROIDERY = 3730,
- FINGER_FLEXWEAVE_UNDERLAY = 3605,
- FINGER_SPRINGY_ARACHNOWEAVE = 3859
- };
- enum Profession
- {
- SKILL_BLACKS = 164,
- SKILL_JEWELC = 755,
- SKILL_ENCHA = 333,
- SKILL_ALCH = 171,
- SKILL_ENG = 202,
- SKILL_INSC = 773,
- SKILL_TAIL = 197,
- SKILL_MIN = 186,
- SKILL_HERB = 182,
- SKILL_LEATHERW = 165,
- SKILL_SKIN = 393,
- SKILL_FISH = 356,
- SKILL_COOK = 185,
- SKILL_FIRST = 129
- };
- enum Text
- {
- TEXT_INVALID_BLACKSMITHING = 1,
- TEXT_INVALID_JEWELCRAFTING = 2,
- TEXT_INVALID_ENCHANTING = 3,
- TEXT_INVALID_ALCHEMY = 4,
- TEXT_INVALID_ENGINEERING = 5,
- TEXT_INVALID_INSCRIPTION = 6,
- TEXT_INVALID_TAILORING = 7,
- TEXT_INVALID_MINING = 8,
- TEXT_INVALID_HERBALISM = 9,
- TEXT_INVALID_LEATHERWORKING = 10,
- TEXT_INVALID_SKINING = 11,
- TEXT_INVALID_COOKING = 12,
- TEXT_INVALID_FISHING = 13,
- TEXT_INVALID_FIRST_AID = 14,
- TEXT_ENCHANTING_SUCCES = 15,
- TEXT_ENCHANTING_DONT_FIND_ITEM = 16,
- TEXT_ENCHANTING_BAD_ITEM = 17
- };
- Player* pPlayer = NULL;
- uint32 GMWeapon = 48519;
- class npc_enchant : CreatureScript
- {
- public:
- npc_enchant() : CreatureScript("npc_enchant") { }
- void SendEmote(Player* player, Creature* creature, const char* text)
- {
- creature->MonsterWhisper(text, player->GetGUID(), true);
- }
- const char* GetText(Text text)
- {
- const char* result = "...";
- switch(text)
- {
- case TEXT_INVALID_BLACKSMITHING:
- result = "You have to learn Blacksmithing!";
- break;
- case TEXT_INVALID_JEWELCRAFTING:
- result = "You have to learn Jewelcrafting!";
- break;
- case TEXT_INVALID_ENCHANTING:
- result = "You have to learn Enchanting!";
- break;
- case TEXT_INVALID_ALCHEMY:
- result = "You have to learn Alchemy!";
- break;
- case TEXT_INVALID_ENGINEERING:
- result = "You have to learn Engineering!";
- break;
- case TEXT_INVALID_INSCRIPTION:
- result = "You have to learn Inscription!";
- break;
- case TEXT_INVALID_TAILORING:
- result = "You have to learn Tailoring!";
- break;
- case TEXT_INVALID_MINING:
- result = "You have to learn Mining!";
- break;
- case TEXT_INVALID_HERBALISM:
- result = "You have to learn Herbalism!";
- break;
- case TEXT_INVALID_LEATHERWORKING:
- result = "You have to learn Leatherworking!";
- break;
- case TEXT_INVALID_SKINING:
- result = "You have to learn Skining!";
- break;
- case TEXT_INVALID_COOKING:
- result = "You have to learn Cooking!";
- break;
- case TEXT_INVALID_FISHING:
- result = "You have to learn Fishing!";
- break;
- case TEXT_ENCHANTING_SUCCES:
- result = "Enchantment added succesfully!";
- break;
- case TEXT_ENCHANTING_DONT_FIND_ITEM:
- result = "You don't have the Item Equipped!";
- break;
- case TEXT_ENCHANTING_BAD_ITEM:
- result = "Your Item is not combatible with this Enchant!";
- break;
- }
- return result;
- }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- GossipHelloMenu(player, creature);
- player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- if(GossipSelectMenu(player, creature, sender, action) == false)
- if(GossipSelectHead(player, creature, sender, action) == false)
- if(GossipSelectShoulders(player, creature, sender, action) == false)
- if(GossipSelectChest(player, creature, sender, action) == false)
- if(GossipSelectWaist(player, creature, sender, action) == false)//
- if(GossipSelectLegs(player, creature, sender, action) == false)
- if(GossipSelectFeet(player, creature, sender, action) == false)
- if(GossipSelectWrists(player, creature, sender, action) == false)
- if(GossipSelectHands(player, creature, sender, action) == false)
- if(GossipSelectFingerFirst(player, creature, sender, action) == false)
- if(GossipSelectFingerSecond(player, creature, sender, action) == false)
- if(GossipSelectBack(player, creature, sender, action) == false)
- if(GossipSelectTwoHandMain(player, creature, sender, action) == false)
- if(GossipSelectTwoHandOff(player, creature, sender, action) == false)
- if(GossipSelectOneHandMain(player, creature, sender, action) == false)
- if(GossipSelectOneHandOff(player, creature, sender, action) == false)
- if(GossipSelectShield(player, creature, sender, action) == false)
- if(GossipSelectRanged(player, creature, sender, action) == false) { }
- return true;
- }
- void GossipHelloMenu(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "Head", GOSSIP_SENDER_MAIN, TAB_HEAD);
- player->ADD_GOSSIP_ITEM(4, "Shoulders", GOSSIP_SENDER_MAIN, TAB_SHOULDERS);
- player->ADD_GOSSIP_ITEM(4, "Chest", GOSSIP_SENDER_MAIN, TAB_CHEST);
- player->ADD_GOSSIP_ITEM(4, "Waist", GOSSIP_SENDER_MAIN, TAB_WAIST);
- player->ADD_GOSSIP_ITEM(4, "Legs", GOSSIP_SENDER_MAIN, TAB_LEGS);
- player->ADD_GOSSIP_ITEM(4, "Feet", GOSSIP_SENDER_MAIN, TAB_FEET);
- player->ADD_GOSSIP_ITEM(4, "Wrists", GOSSIP_SENDER_MAIN, TAB_WRISTS);
- player->ADD_GOSSIP_ITEM(4, "Hands", GOSSIP_SENDER_MAIN, TAB_HANDS);
- player->ADD_GOSSIP_ITEM(4, "Finger", GOSSIP_SENDER_MAIN, TAB_FINGER);
- player->ADD_GOSSIP_ITEM(4, "Back", GOSSIP_SENDER_MAIN, TAB_BACK);
- player->ADD_GOSSIP_ITEM(4, "Weapon", GOSSIP_SENDER_MAIN, TAB_WEAPON);
- player->PlayerTalkClass->SendGossipMenu(E_MAIN, creature->GetGUID());
- }
- bool GossipSelectMenu(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case TAB_BACK:
- GossipHelloBack(player, creature);
- return true;
- case TAB_MAIN:
- GossipHelloMenu(player, creature);
- return true;
- case TAB_FINGER:
- GossipHelloFinger(player, creature);
- return true;
- case TAB_FINGER_FIRST:
- GossipHelloFingerFirst(player, creature);
- return true;
- case TAB_FINGER_SECOND:
- GossipHelloFingerSecond(player, creature);
- return true;
- case TAB_WEAPON:
- GossipHelloWeapon(player, creature);
- return true;
- case TAB_WEAPON_SHIELD:
- GossipHelloShield(player, creature);
- return true;
- case TAB_WEAPON_RANGED:
- GossipHelloRanged(player, creature);
- return true;
- case TAB_WEAPON_ONE_HAND:
- GossipHelloOneHand(player, creature);
- return true;
- case TAB_WEAPON_ONE_HAND_MAIN:
- GossipHelloOneHandMain(player, creature);
- return true;
- case TAB_WEAPON_ONE_HAND_OFF:
- GossipHelloOneHandOff(player, creature);
- return true;
- case TAB_WEAPON_TWO_HAND:
- GossipHelloTwoHand(player, creature);
- return true;
- case TAB_WEAPON_TWO_HAND_MAIN:
- GossipHelloTwoHandMain(player, creature);
- return true;
- case TAB_WEAPON_TWO_HAND_OFF:
- GossipHelloTwoHandOff(player, creature);
- return true;
- case TAB_HEAD:
- GossipHelloHead(player, creature);
- return true;
- case TAB_SHOULDERS:
- GossipHelloShoulders(player, creature);
- return true;
- case TAB_CHEST:
- GossipHelloChest(player, creature);
- return true;
- case TAB_WAIST:
- GossipHelloWaist(player, creature);
- return true;
- case TAB_LEGS:
- GossipHelloLegs(player, creature);
- return true;
- case TAB_FEET:
- GossipHelloFeet(player, creature);
- return true;
- case TAB_WRISTS:
- GossipHelloWrists(player, creature);
- return true;
- case TAB_HANDS:
- GossipHelloHands(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloHead(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of Triumph", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 1);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of Torment", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 2);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of Dominance", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 3);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of Burning Mysteries", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 4);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of the Savage Gladiator", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 5);
- player->ADD_GOSSIP_ITEM(3, "Arcanum of Blissful Mending", GOSSIP_SENDER_MAIN, ACTION_START_HEAD + 6);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectHead(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_HEAD + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_TRIUMPH, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HEAD + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_TORMENT, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HEAD + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_DOMINANCE, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HEAD + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_BURNING_MYSTERIES, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HEAD + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_THE_SAVAGE_GLADIATOR, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HEAD + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HEAD, HEAD_ARCANUM_OF_OF_BLISSFUL_MENDING, PERM_ENCHANTMENT_SLOT);
- break;
- }
- if(action >= ACTION_START_HEAD && action <= ACTION_END_HEAD)
- {
- GossipHelloHead(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloShoulders(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Inscription of Triumph", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 11);
- player->ADD_GOSSIP_ITEM(3, "Inscription of Dominance", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 10);
- player->ADD_GOSSIP_ITEM(3, "Greater Inscription of the Gladiator", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 9);
- player->ADD_GOSSIP_ITEM(3, "Greater Inscription of the Axe", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 1);
- player->ADD_GOSSIP_ITEM(3, "Greater Inscription of the Crag", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Inscription of the Pinnacle", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 3);
- player->ADD_GOSSIP_ITEM(3, "Greater Inscription of the Storm", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 4);
- player->ADD_GOSSIP_ITEM(3, "Master's Inscription of the Axe", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 5);
- player->ADD_GOSSIP_ITEM(3, "Master's Inscription of the Crag", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 6);
- player->ADD_GOSSIP_ITEM(3, "Master's Inscription of the Pinnacle", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 7);
- player->ADD_GOSSIP_ITEM(3, "Master's Inscription of the Storm", GOSSIP_SENDER_MAIN, ACTION_START_SHOULDERS + 8);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectShoulders(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_SHOULDERS + 10:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, 3794, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 11:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, 3793, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 9:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, 3852, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_GREATER_INSCRIPTION_OF_THE_AXE, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_GREATER_INSCRIPTION_OF_THE_CRAG, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_GREATER_INSCRIPTION_OF_THE_PINNACLE, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_GREATER_INSCRIPTION_OF_THE_STORM, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_SHOULDERS + 5:
- if (player->HasSkill(SKILL_INSC))
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_MASTERS_INSCRIPTION_OF_THE_AXE, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_INSCRIPTION));
- break;
- case ACTION_START_SHOULDERS + 6:
- if (player->HasSkill(SKILL_INSC))
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_MASTERS_INSCRIPTION_OF_THE_CRAG, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_INSCRIPTION));
- break;
- case ACTION_START_SHOULDERS + 7:
- if (player->HasSkill(SKILL_INSC))
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_MASTERS_INSCRIPTION_OF_THE_PINNACLE, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_INSCRIPTION));
- break;
- case ACTION_START_SHOULDERS + 8:
- if (player->HasSkill(SKILL_INSC))
- EnchantItem(creature, player, EQUIPMENT_SLOT_SHOULDERS, SHOULDERS_MASTERS_INSCRIPTION_OF_THE_STORM, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_INSCRIPTION));
- break;
- }
- if(action >= ACTION_START_SHOULDERS && action <= ACTION_END_SHOULDERS)
- {
- GossipHelloShoulders(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloChest(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Mana", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 1);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Resilience", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Defense", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 3);
- player->ADD_GOSSIP_ITEM(3, "Greater Mana Restoration", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 4);
- player->ADD_GOSSIP_ITEM(3, "Powerful Stats", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 5);
- player->ADD_GOSSIP_ITEM(3, "Super Health", GOSSIP_SENDER_MAIN, ACTION_START_CHEST + 6);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectChest(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_CHEST + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_EXCEPTIONAL_MANA, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_CHEST + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_EXCEPTIONAL_RESILIENCE, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_CHEST + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_GREATER_DEFENSE, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_CHEST + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_GREATER_MANA_RESTORATION, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_CHEST + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_POWERFUL_STATS, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_CHEST + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_CHEST, CHEST_SUPER_HEALTH, PERM_ENCHANTMENT_SLOT);
- break;
- }
- if(action >= ACTION_START_CHEST && action <= ACTION_END_CHEST)
- {
- GossipHelloChest(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloWaist(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Eternal Belt Buckle", GOSSIP_SENDER_MAIN, ACTION_START_WAIST + 1);
- player->ADD_GOSSIP_ITEM(3, "Frag Belt", GOSSIP_SENDER_MAIN, ACTION_START_WAIST + 2);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectWaist(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_WAIST + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WAIST, WAIST_ETERNAL_BELT_BUCKLE, PRISMATIC_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WAIST + 2:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_WAIST, WAIST_FRAG_BELT, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENGINEERING));
- break;
- }
- if(action >= ACTION_START_WAIST && action <= ACTION_END_WAIST)
- {
- GossipHelloWaist(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloLegs(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Brilliant Spellthread", GOSSIP_SENDER_MAIN, ACTION_START_LEGS + 1);
- player->ADD_GOSSIP_ITEM(3, "Sapphire Spellthread", GOSSIP_SENDER_MAIN, ACTION_START_LEGS + 2);
- player->ADD_GOSSIP_ITEM(3, "Icescale Leg Armor", GOSSIP_SENDER_MAIN, ACTION_START_LEGS + 3);
- player->ADD_GOSSIP_ITEM(3, "Frosthide Leg Armor", GOSSIP_SENDER_MAIN, ACTION_START_LEGS + 4);
- player->ADD_GOSSIP_ITEM(3, "Earthen Leg Armor", GOSSIP_SENDER_MAIN, ACTION_START_LEGS + 5);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectLegs(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_LEGS + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_LEGS, LEGS_BRILLIANT_SPELLTHREAD, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_LEGS + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_LEGS, LEGS_SAPPHIRE_SPELLTHREAD, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_LEGS + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_LEGS, LEGS_ICESCALE_LEG_ARMOR, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_LEGS + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_LEGS, LEGS_FROSTHIDE_LEG_ARMOR, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_LEGS + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_LEGS, LEGS_EARTHEN_LEG_ARMOR, PERM_ENCHANTMENT_SLOT);
- break;
- }
- if(action >= ACTION_START_LEGS && action <= ACTION_END_LEGS)
- {
- GossipHelloLegs(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloFeet(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Greater Assault", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 1);
- player->ADD_GOSSIP_ITEM(3, "Greater Fortitude", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Spirit", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 3);
- player->ADD_GOSSIP_ITEM(3, "Icewalker", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 4);
- player->ADD_GOSSIP_ITEM(3, "Nitro Boots", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 5);
- player->ADD_GOSSIP_ITEM(3, "Superior Agility", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 6);
- player->ADD_GOSSIP_ITEM(3, "Tuskar's Vitality", GOSSIP_SENDER_MAIN, ACTION_START_FEET + 7);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectFeet(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_FEET + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 1597, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FEET + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 1075, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FEET + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 1147, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FEET + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 3826, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FEET + 5:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 3606, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENGINEERING));
- break;
- case ACTION_START_FEET + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 983, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FEET + 7:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FEET, 3232, PERM_ENCHANTMENT_SLOT);
- break;
- }
- if(action >= ACTION_START_FEET && action <= ACTION_END_FEET)
- {
- GossipHelloFeet(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloWrists(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Intellect", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 1);
- player->ADD_GOSSIP_ITEM(3, "Expertise", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Assault", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 3);
- player->ADD_GOSSIP_ITEM(3, "Major Spirit", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 4);
- player->ADD_GOSSIP_ITEM(3, "Major Stamina", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 5);
- player->ADD_GOSSIP_ITEM(3, "Superior Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 6);
- player->ADD_GOSSIP_ITEM(3, "Socket Bracer", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 7);
- player->ADD_GOSSIP_ITEM(3, "Fur Lining Attack Power", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 8);
- player->ADD_GOSSIP_ITEM(3, "Fur Lining Stamina", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 9);
- player->ADD_GOSSIP_ITEM(3, "Fur Lining Spell Power", GOSSIP_SENDER_MAIN, ACTION_START_WRISTS + 10);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectWrists(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_WRISTS + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 1119, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3231, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3845, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 1147, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3850, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 2332, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WRISTS + 7:
- if (player->HasSkill(SKILL_BLACKS))
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3717, PRISMATIC_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_BLACKSMITHING));
- break;
- case ACTION_START_WRISTS + 8:
- if (player->HasSkill(SKILL_LEATHERW))
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3756, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_LEATHERWORKING));
- break;
- case ACTION_START_WRISTS + 9:
- if (player->HasSkill(SKILL_LEATHERW))
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3757, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_LEATHERWORKING));
- break;
- case ACTION_START_WRISTS + 10:
- if (player->HasSkill(SKILL_LEATHERW))
- EnchantItem(creature, player, EQUIPMENT_SLOT_WRISTS, 3758, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_LEATHERWORKING));
- break;
- }
- if(action >= ACTION_START_WRISTS && action <= ACTION_END_WRISTS)
- {
- GossipHelloWrists(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloHands(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Armsman", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 1);
- player->ADD_GOSSIP_ITEM(3, "Crusher", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 2);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 3);
- player->ADD_GOSSIP_ITEM(3, "Greater Blasting", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 4);
- player->ADD_GOSSIP_ITEM(3, "Major Agility", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 5);
- player->ADD_GOSSIP_ITEM(3, "Precision", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 6);
- player->ADD_GOSSIP_ITEM(3, "Hand-Mounted Pyro Rocket", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 7);
- player->ADD_GOSSIP_ITEM(3, "Hyperspeed Accelerators", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 8);
- player->ADD_GOSSIP_ITEM(3, "Socket Gloves", GOSSIP_SENDER_MAIN, ACTION_START_HAND + 9);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectHands(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_HAND + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3253, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 1603, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3246, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3249, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3222, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3234, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_HAND + 7:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3603, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENGINEERING));
- break;
- case ACTION_START_HAND + 8:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3604, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENGINEERING));
- break;
- case ACTION_START_HAND + 9:
- if (player->HasSkill(SKILL_BLACKS))
- EnchantItem(creature, player, EQUIPMENT_SLOT_HANDS, 3723, PRISMATIC_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_BLACKSMITHING));
- break;
- }
- if(action >= ACTION_START_HAND && action <= ACTION_END_HAND)
- {
- GossipHelloHands(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloBack(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(3, "Greater Speed", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 1);
- player->ADD_GOSSIP_ITEM(3, "Major Agility", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 2);
- player->ADD_GOSSIP_ITEM(3, "Mighty Armor", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 3);
- player->ADD_GOSSIP_ITEM(3, "Shadow Armor", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 4);
- player->ADD_GOSSIP_ITEM(3, "Spell Piercing", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 5);
- player->ADD_GOSSIP_ITEM(3, "Titanweave", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 6);
- player->ADD_GOSSIP_ITEM(3, "Wisdom", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 7);
- player->ADD_GOSSIP_ITEM(3, "Darkglow Embroidery", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 8);
- player->ADD_GOSSIP_ITEM(3, "Lightweave Embroidery", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 9);
- player->ADD_GOSSIP_ITEM(3, "Swordguard Embroidery", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 10);
- player->ADD_GOSSIP_ITEM(3, "Flexweave Underlay", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 11);
- player->ADD_GOSSIP_ITEM(3, "Springy Arachnoweave", GOSSIP_SENDER_MAIN, ACTION_START_BACK + 12);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectBack(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- switch(action)
- {
- case ACTION_START_BACK + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3831, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 1099, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3294, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3256, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3243, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 1951, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 7:
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3296, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_BACK + 8:
- if (player->HasSkill(SKILL_TAIL))
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3728, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_TAILORING));
- break;
- case ACTION_START_BACK + 9:
- if (player->HasSkill(SKILL_TAIL))
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3722, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_TAILORING));
- break;
- case ACTION_START_BACK + 10:
- if (player->HasSkill(SKILL_TAIL))
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3730, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_TAILORING));
- break;
- case ACTION_START_BACK + 11:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3605, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_TAILORING));
- break;
- case ACTION_START_BACK + 12:
- if (player->HasSkill(SKILL_ENG))
- EnchantItem(creature, player, EQUIPMENT_SLOT_BACK, 3859, PERM_ENCHANTMENT_SLOT);
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENGINEERING));
- break;
- }
- if(action >= ACTION_START_BACK && action <= ACTION_END_BACK)
- {
- GossipHelloBack(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloTwoHandMain(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Two Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_TWO_HAND);
- player->ADD_GOSSIP_ITEM(3, "Massacre", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_MAIN + 1);
- player->ADD_GOSSIP_ITEM(3, "Greater Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_MAIN + 2);
- if(player->getClass() == CLASS_DEATH_KNIGHT)
- {
- player->ADD_GOSSIP_ITEM(3, "Rune of Spellshattering", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_MAIN + 3);
- player->ADD_GOSSIP_ITEM(3, "Rune of Swordshattering", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_MAIN + 4);
- player->ADD_GOSSIP_ITEM(3, "Rune of the Stonesking Gargoyle", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_MAIN + 5);
- }
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectTwoHandMain(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
- if(action == ACTION_START_WEAPON_TWO_MAIN + 1
- ||action == ACTION_START_WEAPON_TWO_MAIN + 2
- ||action == ACTION_START_WEAPON_TWO_MAIN + 3
- ||action == ACTION_START_WEAPON_TWO_MAIN + 4
- ||action == ACTION_START_WEAPON_TWO_MAIN + 5)
- {
- GossipHelloTwoHandMain(player, creature);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return true;
- }
- if(CanEnchantTwoHand(item))
- {
- switch(action)
- {
- case ACTION_START_WEAPON_TWO_MAIN + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3827, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_MAIN + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3854, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_MAIN + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3367, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_MAIN + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3365, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_MAIN + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3847, PERM_ENCHANTMENT_SLOT);
- break;
- }
- }
- else
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_BAD_ITEM));
- return true;
- }
- return false;
- }
- void GossipHelloTwoHandOff(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Two Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_TWO_HAND);
- player->ADD_GOSSIP_ITEM(3, "Massacre", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_OFF + 1);
- player->ADD_GOSSIP_ITEM(3, "Greater Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_OFF + 2);
- if(player->getClass() == CLASS_DEATH_KNIGHT)
- {
- player->ADD_GOSSIP_ITEM(3, "Rune of Spellshattering", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_OFF + 3);
- player->ADD_GOSSIP_ITEM(3, "Rune of Swordshattering", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_OFF + 4);
- player->ADD_GOSSIP_ITEM(3, "Rune of the Stonesking Gargoyle", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_TWO_OFF + 5);
- }
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectTwoHandOff(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
- if(action == ACTION_START_WEAPON_TWO_OFF + 1
- ||action == ACTION_START_WEAPON_TWO_OFF + 2
- ||action == ACTION_START_WEAPON_TWO_OFF + 3
- ||action == ACTION_START_WEAPON_TWO_OFF + 4
- ||action == ACTION_START_WEAPON_TWO_OFF + 5)
- {
- GossipHelloTwoHandOff(player, creature);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return true;
- }
- if(CanEnchantTwoHand(item))
- {
- switch(action)
- {
- case ACTION_START_WEAPON_TWO_OFF + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3827, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_OFF + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3854, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_OFF + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3367, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_OFF + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3365, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_TWO_OFF + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3847, PERM_ENCHANTMENT_SLOT);
- break;
- }
- }
- else
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_BAD_ITEM));
- return true;
- }
- return false;
- }
- void GossipHelloOneHandMain(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< One Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_ONE_HAND);
- player->ADD_GOSSIP_ITEM(3, "Greater Intellect", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 1);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Agility", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 2);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Spirit", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 3);
- player->ADD_GOSSIP_ITEM(3, "Executioner", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 4);
- player->ADD_GOSSIP_ITEM(3, "Mongoose", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 5);
- player->ADD_GOSSIP_ITEM(3, "Berserking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 6);
- player->ADD_GOSSIP_ITEM(3, "Blood Draining", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 7);
- player->ADD_GOSSIP_ITEM(3, "Blade Ward", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 8);
- player->ADD_GOSSIP_ITEM(3, "Black Magic", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 9);
- player->ADD_GOSSIP_ITEM(3, "Mighty Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 10);
- player->ADD_GOSSIP_ITEM(3, "Titanium Weapon Chain", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 18);
- player->ADD_GOSSIP_ITEM(3, "Superior Potency", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 19);
- if(player->getClass() == CLASS_DEATH_KNIGHT)
- {
- player->ADD_GOSSIP_ITEM(3, "Rune of the Fallen Crusader", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 11);
- player->ADD_GOSSIP_ITEM(3, "Rune of Cinderglacier", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 12);
- player->ADD_GOSSIP_ITEM(3, "Rune of Razorice", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 13);
- player->ADD_GOSSIP_ITEM(3, "Rune of Lichbane", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 14);
- player->ADD_GOSSIP_ITEM(3, "Rune of Spellbreaking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 15);
- player->ADD_GOSSIP_ITEM(3, "Rune of Swordbreaking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 16);
- player->ADD_GOSSIP_ITEM(3, "Rune of the Nerubian Carapace", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_MAIN + 17);
- }
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectOneHandMain(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
- switch(action)
- {
- case ACTION_START_WEAPON_ONE_MAIN + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 2666, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 1103, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3844, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3225, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 2673, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3789, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 7:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3870, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 8:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3869, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 9:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3790, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 10:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3834, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 11:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3368, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 12:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3369, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 13:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3370, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 14:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3366, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 15:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3595, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 16:
- if(item)
- if(item->GetEntry() == GMWeapon)
- EnchantItem(creature, pPlayer, EQUIPMENT_SLOT_MAINHAND, 3594, PERM_ENCHANTMENT_SLOT);
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3594, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 17:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3883, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 18:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3731, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_MAIN + 19:
- EnchantItem(creature, player, EQUIPMENT_SLOT_MAINHAND, 3833, PERM_ENCHANTMENT_SLOT);
- break;
- }
- if(action >= ACTION_START_WEAPON_ONE_MAIN && action <= ACTION_END_WEAPON_ONE_MAIN)
- {
- GossipHelloOneHandMain(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloOneHandOff(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< One Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_ONE_HAND);
- player->ADD_GOSSIP_ITEM(3, "Greater Intellect", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 1);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Agility", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 2);
- player->ADD_GOSSIP_ITEM(3, "Exceptional Spirit", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 3);
- player->ADD_GOSSIP_ITEM(3, "Executioner", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 4);
- player->ADD_GOSSIP_ITEM(3, "Mongoose", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 5);
- player->ADD_GOSSIP_ITEM(3, "Berserking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 6);
- player->ADD_GOSSIP_ITEM(3, "Blood Draining", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 7);
- player->ADD_GOSSIP_ITEM(3, "Blade Ward", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 8);
- player->ADD_GOSSIP_ITEM(3, "Black Magic", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 9);
- player->ADD_GOSSIP_ITEM(3, "Mighty Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 10);
- player->ADD_GOSSIP_ITEM(3, "Titanium Weapon Chain", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 18);
- player->ADD_GOSSIP_ITEM(3, "Superior Potency", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 19);
- if(player->getClass() == CLASS_DEATH_KNIGHT)
- {
- player->ADD_GOSSIP_ITEM(3, "Rune of the Fallen Crusader", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 11);
- player->ADD_GOSSIP_ITEM(3, "Rune of Cinderglacier", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 12);
- player->ADD_GOSSIP_ITEM(3, "Rune of Razorice", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 13);
- player->ADD_GOSSIP_ITEM(3, "Rune of Lichbane", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 14);
- player->ADD_GOSSIP_ITEM(3, "Rune of Spellbreaking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 15);
- player->ADD_GOSSIP_ITEM(3, "Rune of Swordbreaking", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 16);
- player->ADD_GOSSIP_ITEM(3, "Rune of the Nerubian Carapace", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_ONE_OFF + 17);
- }
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectOneHandOff(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
- if(action == ACTION_START_WEAPON_ONE_OFF + 1
- ||action == ACTION_START_WEAPON_ONE_OFF + 2
- ||action == ACTION_START_WEAPON_ONE_OFF + 3
- ||action == ACTION_START_WEAPON_ONE_OFF + 4
- ||action == ACTION_START_WEAPON_ONE_OFF + 5
- ||action == ACTION_START_WEAPON_ONE_OFF + 6
- ||action == ACTION_START_WEAPON_ONE_OFF + 7
- ||action == ACTION_START_WEAPON_ONE_OFF + 8
- ||action == ACTION_START_WEAPON_ONE_OFF + 9
- ||action == ACTION_START_WEAPON_ONE_OFF + 10
- ||action == ACTION_START_WEAPON_ONE_OFF + 11
- ||action == ACTION_START_WEAPON_ONE_OFF + 12
- ||action == ACTION_START_WEAPON_ONE_OFF + 13
- ||action == ACTION_START_WEAPON_ONE_OFF + 14
- ||action == ACTION_START_WEAPON_ONE_OFF + 15
- ||action == ACTION_START_WEAPON_ONE_OFF + 16
- ||action == ACTION_START_WEAPON_ONE_OFF + 17
- ||action == ACTION_START_WEAPON_ONE_OFF + 18
- ||action == ACTION_START_WEAPON_ONE_OFF + 19)
- {
- GossipHelloOneHandOff(player, creature);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return false;
- }
- if(CanEnchantOneOffHand(item))
- {
- switch(action)
- {
- case ACTION_START_WEAPON_ONE_OFF + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 2666, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 1103, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3844, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3225, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 2673, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 6:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3789, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 7:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3870, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 8:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3869, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 9:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3790, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 10:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3834, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 11:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3368, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 12:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3369, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 13:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3370, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 14:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3366, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 15:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3595, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 16:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3594, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 17:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3883, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 18:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3731, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_ONE_OFF + 19:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3833, PERM_ENCHANTMENT_SLOT);
- break;
- }
- }
- else
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_BAD_ITEM));
- return true;
- }
- return false;
- }
- void GossipHelloRanged(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Weapon", GOSSIP_SENDER_MAIN, TAB_WEAPON);
- player->ADD_GOSSIP_ITEM(3, "Hearthseeker Scope", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_RANGED + 1);
- player->ADD_GOSSIP_ITEM(3, "Sun Scope", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_RANGED + 2);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectRanged(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
- if(action == ACTION_START_WEAPON_RANGED + 1
- ||action == ACTION_START_WEAPON_RANGED + 2)
- {
- GossipHelloRanged(player, creature);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return false;
- }
- if(CanEnchantRanged(item))
- {
- switch(action)
- {
- case ACTION_START_WEAPON_RANGED + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_RANGED, 3608, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_RANGED + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_RANGED, 3607, PERM_ENCHANTMENT_SLOT);
- break;
- }
- }
- else
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_BAD_ITEM));
- return true;
- }
- return false;
- }
- void GossipHelloShield(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Weapon", GOSSIP_SENDER_MAIN, TAB_WEAPON);
- player->ADD_GOSSIP_ITEM(3, "Defense", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_SHIELD + 1);
- player->ADD_GOSSIP_ITEM(3, "Greater Intellect", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_SHIELD + 2);
- player->ADD_GOSSIP_ITEM(3, "Resilience", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_SHIELD + 3);
- player->ADD_GOSSIP_ITEM(3, "Titanium Plating", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_SHIELD + 4);
- player->ADD_GOSSIP_ITEM(3, "Titanium Shield Spike", GOSSIP_SENDER_MAIN, ACTION_START_WEAPON_SHIELD + 5);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectShield(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
- if(action == ACTION_START_WEAPON_SHIELD + 1
- ||action == ACTION_START_WEAPON_SHIELD + 2
- ||action == ACTION_START_WEAPON_SHIELD + 3
- ||action == ACTION_START_WEAPON_SHIELD + 4
- ||action == ACTION_START_WEAPON_SHIELD + 5)
- {
- GossipHelloShield(player, creature);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return false;
- }
- if(CanEnchantShield(item))
- {
- switch(action)
- {
- case ACTION_START_WEAPON_SHIELD + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 1952, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_SHIELD + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 1128, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_SHIELD + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3229, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_SHIELD + 4:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3849, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_WEAPON_SHIELD + 5:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3748, PERM_ENCHANTMENT_SLOT);
- break;
- }
- }
- else
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_BAD_ITEM));
- return true;
- }
- switch(action)
- {
- case 1801:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 1952, PERM_ENCHANTMENT_SLOT);
- GossipHelloShield(player, creature);
- return true;
- case 1802:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 1128, PERM_ENCHANTMENT_SLOT);
- GossipHelloShield(player, creature);
- return true;
- case 1803:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3229, PERM_ENCHANTMENT_SLOT);
- GossipHelloShield(player, creature);
- return true;
- case 1804:
- EnchantItem(creature, player, EQUIPMENT_SLOT_OFFHAND, 3849, PERM_ENCHANTMENT_SLOT);
- GossipHelloShield(player, creature);
- return true;
- }
- return false;
- }
- void GossipHelloFingerFirst(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Finger", GOSSIP_SENDER_MAIN, TAB_FINGER);
- player->ADD_GOSSIP_ITEM(3, "Assault", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_FIRST + 1);
- player->ADD_GOSSIP_ITEM(3, "Stamina", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_FIRST + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_FIRST + 3);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectFingerFirst(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- if(action == ACTION_START_FINGER_FIRST + 1
- ||action == ACTION_START_FINGER_FIRST + 2
- ||action == ACTION_START_FINGER_FIRST + 3)
- {
- GossipHelloFingerFirst(player, creature);
- if (player->HasSkill(SKILL_ENCHA))
- switch(action)
- {
- case ACTION_START_FINGER_FIRST + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER1, 3839, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FINGER_FIRST + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER1, 3791, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FINGER_FIRST + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER1, 3840, PERM_ENCHANTMENT_SLOT);
- break;
- }
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENCHANTING));
- return true;
- }
- return false;
- }
- void GossipHelloFingerSecond(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Finger", GOSSIP_SENDER_MAIN, TAB_FINGER);
- player->ADD_GOSSIP_ITEM(3, "Assault", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_SECOND + 1);
- player->ADD_GOSSIP_ITEM(3, "Stamina", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_SECOND + 2);
- player->ADD_GOSSIP_ITEM(3, "Greater Spellpower", GOSSIP_SENDER_MAIN, ACTION_START_FINGER_SECOND + 3);
- player->PlayerTalkClass->SendGossipMenu(E_ENCHANTLIST, creature->GetGUID());
- }
- bool GossipSelectFingerSecond(Player* player, Creature* creature, uint32 sender, uint32 action)
- {
- if(action == ACTION_START_FINGER_SECOND + 1
- ||action == ACTION_START_FINGER_SECOND + 2
- ||action == ACTION_START_FINGER_SECOND + 3)
- {
- GossipHelloFingerSecond(player, creature);
- if (player->HasSkill(SKILL_ENCHA))
- switch(action)
- {
- case ACTION_START_FINGER_SECOND + 1:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER2, 3839, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FINGER_SECOND + 2:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER2, 3791, PERM_ENCHANTMENT_SLOT);
- break;
- case ACTION_START_FINGER_SECOND + 3:
- EnchantItem(creature, player, EQUIPMENT_SLOT_FINGER2, 3840, PERM_ENCHANTMENT_SLOT);
- break;
- }
- else
- SendEmote(player, creature, GetText(TEXT_INVALID_ENCHANTING));
- return true;
- }
- return false;
- }
- void GossipHelloWeapon(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(4, "Two Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_TWO_HAND);
- player->ADD_GOSSIP_ITEM(4, "One Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_ONE_HAND);
- player->ADD_GOSSIP_ITEM(4, "Ranged", GOSSIP_SENDER_MAIN, TAB_WEAPON_RANGED);
- player->ADD_GOSSIP_ITEM(4, "Shield", GOSSIP_SENDER_MAIN, TAB_WEAPON_SHIELD);
- player->PlayerTalkClass->SendGossipMenu(E_CATLIST, creature->GetGUID());
- }
- void GossipHelloTwoHand(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Weapon", GOSSIP_SENDER_MAIN, TAB_WEAPON);
- player->ADD_GOSSIP_ITEM(4, "Main Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_TWO_HAND_MAIN);
- player->ADD_GOSSIP_ITEM(4, "Off Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_TWO_HAND_OFF);
- player->PlayerTalkClass->SendGossipMenu(E_CATLIST, creature->GetGUID());
- }
- void GossipHelloOneHand(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Weapon", GOSSIP_SENDER_MAIN, TAB_WEAPON);
- player->ADD_GOSSIP_ITEM(4, "Main Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_ONE_HAND_MAIN);
- player->ADD_GOSSIP_ITEM(4, "Off Hand", GOSSIP_SENDER_MAIN, TAB_WEAPON_ONE_HAND_OFF);
- player->PlayerTalkClass->SendGossipMenu(E_CATLIST, creature->GetGUID());
- }
- void GossipHelloFinger(Player* player, Creature* creature)
- {
- player->PlayerTalkClass->ClearMenus();
- player->ADD_GOSSIP_ITEM(4, "<< Menu", GOSSIP_SENDER_MAIN, TAB_MAIN);
- player->ADD_GOSSIP_ITEM(4, "1. Finger", GOSSIP_SENDER_MAIN, TAB_FINGER_FIRST);
- player->ADD_GOSSIP_ITEM(4, "2. Finger", GOSSIP_SENDER_MAIN, TAB_FINGER_SECOND);
- player->PlayerTalkClass->SendGossipMenu(E_CATLIST, creature->GetGUID());
- }
- bool CanEnchantTwoHand(Item* item)
- {
- if(!item)
- return false;
- ItemTemplate const* proto = item->GetTemplate();
- if(!proto)
- return false;
- uint32 itemSubClass = proto->SubClass;
- uint32 itemClass = proto->Class;
- if(itemSubClass == SUBCLASS_ITEM_TWOHAND_MACE
- ||itemSubClass == SUBCLASS_ITEM_TWOHAND_ACE
- ||itemSubClass == SUBCLASS_ITEM_TWOHAND_SWORD
- ||itemSubClass == SUBCLASS_ITEM_TWOHAND_STAFF
- ||itemSubClass == SUBCLASS_ITEM_TWOHAND_POLEARN
- &&itemClass == CLASS_ITEM_WEAPON)
- return true;
- return false;
- }
- bool CanEnchantOneOffHand(Item* item)
- {
- if(!item)
- return false;
- ItemTemplate const* proto = item->GetTemplate();
- if(!proto)
- return false;
- uint32 itemClass = proto->Class;
- if(itemClass == CLASS_ITEM_WEAPON)
- return true;
- return false;
- }
- bool CanEnchantRanged(Item* item)
- {
- if(!item)
- return false;
- ItemTemplate const* proto = item->GetTemplate();
- if(!proto)
- return false;
- uint32 itemSubClass = proto->SubClass;
- if(itemSubClass == SUBCLASS_ITEM_RANGED_BOW
- ||itemSubClass == SUBCLASS_ITEM_RANGED_CROSSBOW
- ||itemSubClass == SUBCLASS_ITEM_RANGED_GUN)
- return true;
- return false;
- }
- bool CanEnchantShield(Item* item)
- {
- if(!item)
- return false;
- ItemTemplate const* proto = item->GetTemplate();
- if(!proto)
- return false;
- uint32 itemSubClass = proto->SubClass;
- if(itemSubClass == SUBCLASS_ITEM_ARMOR_SHIELD)
- return true;
- return false;
- }
- bool EnchantItem(Creature* creature, Player* player, EquipmentSlots EquipS, int32 ID, EnchantmentSlot EnchS)
- {
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EquipS);
- if(!item)
- {
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_DONT_FIND_ITEM));
- return false;
- }
- player->ApplyEnchantment(item, EnchS, false);
- item->SetEnchantment(EnchS, ID, 0, 0);
- player->ApplyEnchantment(item, EnchS, true);
- SendEmote(player, creature, GetText(TEXT_ENCHANTING_SUCCES));
- return true;
- }
- };
- void AddSC_npc_enchant()
- {
- new npc_enchant();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement