Advertisement
Guest User

Vision1000

a guest
Dec 27th, 2009
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 47.74 KB | None | 0 0
  1. #include "StdAfx.h"
  2. #include "Setup.h"
  3.  
  4. /**********************************************************************
  5. ******************[Credits to Vision1000 of MMOwned********************
  6. [FEATURES]:
  7.     ~ Enchants Custom Gear.
  8.     ~ Any Enchant on any peice of gear (Optional).
  9.     ~ Profession specific enchants (Optional).
  10.     ~ All Wotlk enchants + Mongoose & Executioner.
  11.  
  12. -------Special Thanks to Pwntzyou.
  13. **********************************************************************/
  14.  
  15. bool ProfessionSpecific = false;  // This will disable players being able to use profession specific enchants on the proper items.
  16. bool AnyEnchantOnAnyItem = false; // This will allow players to enchant any peice of gear with any enchant. This will also allow profession specific enchants on any item even if the above variable is true.
  17.  
  18. int enchantId [2][132] = {
  19.     {3851, 3788, 3789, 3790, 3834, 3833, 3239, 3241, 3870, 3869, 1103, 3844, 3225, 2673 /*<-1h*/, 3827, 3247, 3251 /*<-2h*/, 3249, 3253, 1603, 3222, 3234, 3231 /*<-gloves*/, 3850, 2332, 3845, 1147, 3231, 2661, 1119 /*<-Bracer*/, 3854 /*<-stave*/, 3832, 3297, 2381, 3245, 1953 /*<-chest*/, 1597, 3232, 983, 1147, 3244, 3826, 1075 /*<-boots*/, 3256, 3296, 1951, 3831, 3294, 1099, 1262, 1354, 3230, 1400, 1446, 3243 /*<-cloak*/, 1952, 1128, 2655, 3229, 1071, 2653 /*<-Shields*/, 3853, 3822, 3823, 3719, 3721 /*<-legs*/, 3852, 3793, 3794, 3808, 3809, 3811, 3810 /*<-Shoulder*/, 3795, 3797, 3842, 3819, 3820, 3817, 3818, 3815, 3816, 3814, 3812, 3813 /*<-helm*/, /*ProfReqEnchants->*/3839, 3840, 3791 /*<-rings*/, 3763, 3759, 3760, 3762, 3761, 3756, 3757, 3758 /*<-furlining*/, 3728, 3722, 3730 /*<-EmbroidCloak*/, 3835, 3836, 3837, 3838 /*<-ScribShoulders*/, 3606, 3603, 3604, 3860 /*<-Engineering*/, 3331, 3332 /*<-UnreleasedLegArmor*/, 3851, 3788, 3789, 3790, 3834, 3833, 3239, 3241, 3870, 3869, 1103, 3844, 3225, 2673 /*<-1h*/, 3827, 3247, 3251 /*<-2h*/, 3854 /*<-stave*/, 3839, 3840, 3791 /*<-rings*/, 3246/*<-Sp to gloves*/, 3854 /*<-stave*/},
  20.     {15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 /*<-1h*/, 15, 15, 15 /*<-2-h*/, 9, 9, 9, 9, 9, 9/*<-gloves*/, 8, 8, 8, 8, 8, 8, 8 /*<-bracers*/, 15 /*<-stave*/, 4, 4, 4, 4, 4 /*<-chest*/, 7, 7, 7, 7, 7, 7, 7 /*<-boots*/, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 /*<-cloak*/, 16, 16, 16, 16, 16, 16 /*<-shield*/, 6, 6, 6, 6, 6 /*<-legs*/, 2, 2, 2, 2, 2, 2, 2 /*<-shoulder*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /*<-helm*/, /*ProfReqEnchants->*/ 10, 10, 10 /*<-rings*/, 8, 8, 8, 8, 8, 8, 8, 8 /*<-furlining*/, 14, 14, 14 /*<-embroidcloak*/, 2, 2, 2, 2 /*ScribeShoulders*/, 7, 9, 9, 9 /*<-Engiboots/gloves*/, 6, 6 /*unreleased LW leg armor*/, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 /*<-1h*/, 16, 16, 16 /*<-2-h*/, 16 /*<-stave*/, 11, 11, 11 /*<-rings*/, 9/*<-Sp to gloves*/, 16/*<-StaveEnchant*/}
  21. };
  22.  
  23. bool i_InventoryType(Player * plr, uint32 i_slot, uint32 i_type)
  24. {  
  25.     if(!plr->GetItemInterface()->GetInventoryItem(i_slot))
  26.         return false;
  27.     else if(plr->GetItemInterface()->GetInventoryItem(i_slot)->GetProto()->InventoryType != i_type)
  28.         return false;
  29.     else
  30.         return true;
  31. };
  32.  
  33. bool IsWeaponType(Player * plr, uint32 i_slot, uint32 i_subclass)
  34. {
  35.     if(!plr->GetItemInterface()->GetInventoryItem(i_slot))
  36.         return false;
  37.  
  38.     if(plr->GetItemInterface()->GetInventoryItem(i_slot)->GetProto()->SubClass != i_subclass)
  39.         return false;
  40.     else
  41.         return true;
  42. };
  43.  
  44. int GetInvenSlot(const char * Code)
  45. {
  46.     int slot_;
  47.     if( strcmp(Code, "Helm") == 0 || strcmp(Code, "helm") == 0 || strcmp(Code, "Helmet") == 0 || strcmp(Code, "helmet") == 0 || strcmp(Code, "head") == 0 || strcmp(Code, "Head") == 0)
  48.         slot_ = 0;
  49.     else if (strcmp(Code, "Necklace") == 0 || strcmp(Code, "necklace") == 0 || strcmp(Code, "Neck") == 0 || strcmp(Code, "neck") == 0 || strcmp(Code, "Neckpiece") == 0 || strcmp(Code, "neckpiece") == 0)
  50.         slot_ = 1;
  51.     else if (strcmp(Code, "Shoulder") == 0 || strcmp(Code, "shoulder") == 0 || strcmp(Code, "Shoulders") == 0 || strcmp(Code, "shoulders") == 0)
  52.         slot_ = 2;
  53.     else if (strcmp(Code, "Cape") == 0 || strcmp(Code, "cape") == 0 || strcmp(Code, "Cloak") == 0 || strcmp(Code, "cloak") == 0 || strcmp(Code, "Back") == 0 || strcmp(Code, "back") == 0)
  54.         slot_ = 14;
  55.     else if (strcmp(Code, "Chest") == 0 || strcmp(Code, "chest") == 0 || strcmp(Code, "Chestpeice") == 0 || strcmp(Code, "chestpeice") == 0)
  56.         slot_ = 4;
  57.     else if (strcmp(Code, "Shirt") == 0 || strcmp(Code, "shirt") == 0)
  58.         slot_ = 3;
  59.     else if (strcmp(Code, "Tabard") == 0 || strcmp(Code, "tabard") == 0)
  60.         slot_ = 18;
  61.     else if (strcmp(Code, "Bracer") == 0 || strcmp(Code, "bracer") == 0 || strcmp(Code, "Bracers") == 0 || strcmp(Code, "bracers") == 0 || strcmp(Code, "Wrist") == 0 || strcmp(Code, "wrist") == 0 || strcmp(Code, "Wrists") == 0 || strcmp(Code, "wrists") == 0)
  62.         slot_ = 8;
  63.     else if (strcmp(Code, "Glove") == 0 || strcmp(Code, "glove") == 0 || strcmp(Code, "Gloves") == 0 || strcmp(Code, "gloves") == 0 || strcmp(Code, "Hand") == 0 || strcmp(Code, "hand") == 0 || strcmp(Code, "Hands") == 0 || strcmp(Code, "hands") == 0)
  64.         slot_ = 9;
  65.     else if (strcmp(Code, "Belt") == 0 || strcmp(Code, "belt") == 0 || strcmp(Code, "Waist") == 0 || strcmp(Code, "waist") == 0)
  66.         slot_ = 5;
  67.     else if (strcmp(Code, "Leg") == 0 || strcmp(Code, "leg") == 0 || strcmp(Code, "Legs") == 0 || strcmp(Code, "legs") == 0 || strcmp(Code, "Pant") == 0 || strcmp(Code, "pant") == 0 || strcmp(Code, "Pants") == 0 || strcmp(Code, "pants") == 0)
  68.         slot_ = 6;
  69.     else if (strcmp(Code, "Boot") == 0 || strcmp(Code, "boot") == 0 || strcmp(Code, "Boots") == 0 || strcmp(Code, "boots") == 0 || strcmp(Code, "foot") == 0 || strcmp(Code, "Foot") == 0 || strcmp(Code, "Feet") == 0 || strcmp(Code, "feet") == 0)
  70.         slot_ = 7;
  71.     else if (strcmp(Code, "Ring One") == 0 || strcmp(Code, "Ring one") == 0 || strcmp(Code, "ring one") == 0 || strcmp(Code, "ring 1") == 0 || strcmp(Code, "Ring 1") == 0 || strcmp(Code, "First Ring") == 0 || strcmp(Code, "first ring") == 0)
  72.         slot_ = 10;
  73.     else if (strcmp(Code, "Ring Two") == 0 || strcmp(Code, "Ring two") == 0 || strcmp(Code, "ring two") == 0 || strcmp(Code, "ring 2") == 0 || strcmp(Code, "Ring 2") == 0 || strcmp(Code, "Second Ring") == 0 || strcmp(Code, "second ring") == 0)
  74.         slot_ = 11;
  75.     else if (strcmp(Code, "Trinket One") == 0 || strcmp(Code, "Trinket one") == 0 || strcmp(Code, "trinket one") == 0 || strcmp(Code, "Trinket 1") == 0 || strcmp(Code, "trinket 1") == 0 || strcmp(Code, "First Trinket") == 0 || strcmp(Code, "First trinket") == 0 || strcmp(Code, "first trinket") == 0)
  76.         slot_ = 12;
  77.     else if (strcmp(Code, "Trinket Two") == 0 || strcmp(Code, "Trinket two") == 0 || strcmp(Code, "trinket two") == 0 || strcmp(Code, "Trinket 2") == 0 || strcmp(Code, "trinket 2") == 0 || strcmp(Code, "Second Trinket") == 0 || strcmp(Code, "Second trinket") == 0 || strcmp(Code, "second trinket") == 0)
  78.         slot_ = 13;
  79.     else if (strcmp(Code, "Ranged") == 0 || strcmp(Code, "ranged") == 0 || strcmp(Code, "Wand") == 0 || strcmp(Code, "wand") == 0 || strcmp(Code, "Gun") == 0 || strcmp(Code, "gun") == 0 || strcmp(Code, "Bow") == 0 || strcmp(Code, "bow") == 0 || strcmp(Code, "Idol") == 0 || strcmp(Code, "idol") == 0 || strcmp(Code, "Libram") == 0 || strcmp(Code, "libram") == 0 || strcmp(Code, "Sigil") == 0 || strcmp(Code, "sigil") == 0 || strcmp(Code, "Totem") == 0 || strcmp(Code, "totem") == 0)
  80.         slot_ = 17;
  81.     else if (strcmp(Code, "Main hand") == 0 || strcmp(Code, "main hand") == 0 || strcmp(Code, "Mh") == 0 || strcmp(Code, "Mh") == 0 || strcmp(Code, "mh") == 0 || strcmp(Code, "Main Hand") == 0 || strcmp(Code, "mainhand") == 0 || strcmp(Code, "Mainhand") == 0 || strcmp(Code, "weapon") == 0 || strcmp(Code, "Weapon") == 0)
  82.         slot_ = 15;
  83.     else if (strcmp(Code, "Off hand") == 0 || strcmp(Code, "off hand") == 0 || strcmp(Code, "Offhand") == 0 || strcmp(Code, "offhand") == 0 || strcmp(Code, "Oh") == 0 || strcmp(Code, "Oh") == 0 || strcmp(Code, "oh") == 0 || strcmp(Code, "Off Hand") == 0 || strcmp(Code, "off") == 0)
  84.         slot_ = 16;
  85.     else
  86.         slot_ = 20;
  87.  
  88.     return slot_;
  89. }
  90.  
  91. class SCRIPT_DECL EnchantNPC_Gossip : public GossipScript
  92. {
  93. public:
  94.     void GossipHello(Object* pObject, Player * plr, bool AutoSend)
  95.     {
  96.             GossipMenu *Menu;
  97.             objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4056, plr);
  98.             Menu->AddItem( 0, "Helm", 140);
  99.             Menu->AddItem( 0, "Shoulder", 141);
  100.             Menu->AddItem( 0, "Cloak", 142);
  101.             Menu->AddItem( 0, "Chest", 143);
  102.             Menu->AddItem( 0, "Bracer", 144);
  103.             Menu->AddItem( 0, "Gloves", 145);
  104.             Menu->AddItem( 0, "Legs", 146);
  105.             Menu->AddItem( 0, "Boots", 147);
  106.             Menu->AddItem( 0, "Main Hand",148);
  107.             Menu->AddItem( 0, "Offhand", 149);
  108.             if(ProfessionSpecific)
  109.                 Menu->AddItem( 0, "|cFF0000FFYou now have access to my stronger enchants...|r", 152);
  110.             if(AnyEnchantOnAnyItem)
  111.                 Menu->AddItem( 0, "|cFFFF0000You can put any enchantment on any item...|r", 160);
  112.             if(AutoSend)
  113.                 Menu->SendTo(plr);
  114.     }
  115.  
  116.     void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code)
  117.     {
  118.         if(pObject->GetTypeId()!=TYPEID_UNIT)
  119.                 return;
  120.  
  121.         if (Code != NULL)
  122.         {
  123.             if(strcmp(Code, "all") == 0 || strcmp(Code, "All") == 0)
  124.             {
  125.                 for(uint32 i=0;i<19;i++)
  126.                 {
  127.                     if(plr->GetItemInterface()->GetInventoryItem(i) != NULL)
  128.                     {
  129.                         Item * item = plr->GetItemInterface()->GetInventoryItem(i);
  130.                         EnchantEntry* Enchant = dbcEnchant.LookupEntry(enchantId[0][IntId]);
  131.                         item->RemoveEnchantment(0);
  132.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  133.                         item->m_isDirty = true;
  134.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  135.                     }
  136.                 }
  137.             }
  138.             else
  139.             {
  140.                 int slot_ = GetInvenSlot(Code);
  141.                 if(slot_ != 20)
  142.                 {
  143.                     if(plr->GetItemInterface()->GetInventoryItem(slot_) != NULL)
  144.                     {
  145.                         Item * item = plr->GetItemInterface()->GetInventoryItem(slot_);
  146.                         EnchantEntry* Enchant = dbcEnchant.LookupEntry(enchantId[0][IntId]);
  147.                         item->RemoveEnchantment(0);
  148.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  149.                         item->m_isDirty = true;
  150.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  151.                     }
  152.                     else
  153.                     {
  154.                         plr->BroadcastMessage("You do not have an item equipped in that slot");
  155.                     }
  156.                 }
  157.                 else
  158.                 {
  159.                     plr->BroadcastMessage("%s, did not return a valid slot number. Please enter a proper phrase.", Code);
  160.                 }
  161.             }
  162.         }
  163.         else if (IntId < 135)
  164.         {
  165.             EnchantEntry* Enchant = dbcEnchant.LookupEntry(enchantId[0][IntId]);
  166.             Item * item = plr->GetItemInterface()->GetInventoryItem(enchantId[1][IntId]);
  167.             if (item)
  168.             {
  169.                 if (IntId >= 0 && IntId <= 13) // enchant 1h wep MH         // Player had an item in the selected slot, the item was a weapon
  170.                 {
  171.                     if(item->GetProto()->InventoryType == INVTYPE_WEAPON || item->GetProto()->InventoryType == INVTYPE_WEAPONMAINHAND || item->GetProto()->InventoryType == INVTYPE_WEAPONOFFHAND || item->GetProto()->InventoryType == INVTYPE_2HWEAPON)
  172.                     {
  173.                         item->RemoveEnchantment(0);
  174.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  175.                         item->m_isDirty = true;
  176.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  177.                     }
  178.                     else
  179.                     {
  180.                         plr->BroadcastMessage("The item equipped in your main hand is not a weapon");
  181.                     }
  182.  
  183.                 }
  184.                 else if (IntId >= 14 && IntId <= 16) // enchant 2h wep MH
  185.                 {
  186.                     if(item->GetProto()->InventoryType == INVTYPE_2HWEAPON)
  187.                     {
  188.                         item->RemoveEnchantment(0);
  189.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  190.                         item->m_isDirty = true;
  191.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  192.                     }
  193.                     else
  194.                     {
  195.                         plr->BroadcastMessage("The item equipped in your main hand is not a 2h weapon");
  196.                     }
  197.                 }
  198.                 else if (IntId >= 17 && IntId <= 22 || IntId == 130) // enchant gloves
  199.                 {
  200.                     if(item->GetProto()->InventoryType == INVTYPE_HANDS)
  201.                     {
  202.                         item->RemoveEnchantment(0);
  203.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  204.                         item->m_isDirty = true;
  205.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  206.                     }
  207.                     else
  208.                     {
  209.                         plr->BroadcastMessage("The item equipped in your hand slot is not a valid enchant target");
  210.                     }
  211.                 }
  212.                 else if (IntId >= 23 && IntId <= 29) // enchant bracer
  213.                 {
  214.                     if(item->GetProto()->InventoryType == INVTYPE_WRISTS)
  215.                     {
  216.                         item->RemoveEnchantment(0);
  217.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  218.                         item->m_isDirty = true;
  219.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  220.                     }
  221.                     else
  222.                     {
  223.                         plr->BroadcastMessage("The item equipped in your wrist slot is not a valid enchant target");
  224.                     }
  225.                 }
  226.                 else if (IntId == 30) // enchant stave
  227.                 {
  228.                     if(item->GetProto()->SubClass = ITEM_SUBCLASS_WEAPON_STAFF)
  229.                     {
  230.                         item->RemoveEnchantment(0);
  231.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  232.                         item->m_isDirty = true;
  233.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  234.                     }
  235.                     else
  236.                     {
  237.                         plr->BroadcastMessage("The item equipped in your main hand is not a staff");
  238.                     }
  239.                 }
  240.                 else if (IntId >= 31 && IntId <= 35) // chest
  241.                 {
  242.                     if(item->GetProto()->InventoryType == INVTYPE_CHEST || item->GetProto()->InventoryType == INVTYPE_ROBE)
  243.                     {
  244.                         item->RemoveEnchantment(0);
  245.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  246.                         item->m_isDirty = true;
  247.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  248.                     }
  249.                     else
  250.                     {
  251.                         plr->BroadcastMessage("The item equipped in your chest slot is not a valid enchant target");
  252.                     }
  253.                 }
  254.                 else if (IntId >= 36 && IntId <= 42) // boots
  255.                 {
  256.                     if(item->GetProto()->InventoryType == INVTYPE_FEET)
  257.                     {
  258.                         item->RemoveEnchantment(0);
  259.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  260.                         item->m_isDirty = true;
  261.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  262.                     }
  263.                     else
  264.                     {
  265.                         plr->BroadcastMessage("The item equipped in your feet slot is not a valid enchant target");
  266.                     }
  267.                 }
  268.                 else if (IntId >= 43 && IntId <= 54) // cloak
  269.                 {
  270.                     if(item->GetProto()->InventoryType == INVTYPE_CLOAK)
  271.                     {
  272.                         item->RemoveEnchantment(0);
  273.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  274.                         item->m_isDirty = true;
  275.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  276.                     }
  277.                     else
  278.                     {
  279.                         plr->BroadcastMessage("The item equipped in your back slot is not a valid enchant target");
  280.                     }
  281.                 }
  282.                 else if (IntId >= 55 && IntId <= 60) // shield
  283.                 {
  284.                     if(item->GetProto()->InventoryType == INVTYPE_SHIELD)
  285.                     {
  286.                         item->RemoveEnchantment(0);
  287.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  288.                         item->m_isDirty = true;
  289.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  290.                     }
  291.                     else
  292.                     {
  293.                         plr->BroadcastMessage("The item equipped in your offhand slot is not a shield");
  294.                     }
  295.                 }
  296.                 else if (IntId >= 61 && IntId <= 65) // legs
  297.                 {
  298.                     if(item->GetProto()->InventoryType == INVTYPE_LEGS)
  299.                     {
  300.                         item->RemoveEnchantment(0);
  301.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  302.                         item->m_isDirty = true;
  303.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  304.                     }
  305.                     else
  306.                     {
  307.                         plr->BroadcastMessage("The item equipped in your leg slot is not a valid enchant target");
  308.                     }
  309.                 }
  310.                 else if (IntId >= 66 && IntId <= 72) // shoulder
  311.                 {
  312.                     if(item->GetProto()->InventoryType == INVTYPE_SHOULDERS)
  313.                     {
  314.                         item->RemoveEnchantment(0);
  315.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  316.                         item->m_isDirty = true;
  317.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  318.                     }
  319.                     else
  320.                     {
  321.                         plr->BroadcastMessage("The item equipped in your shoulder slot is not a valid enchant target");
  322.                     }
  323.                 }
  324.                 else if (IntId >= 73 && IntId <= 84) // helm
  325.                 {
  326.                     if(item->GetProto()->InventoryType == INVTYPE_HEAD)
  327.                     {
  328.                         item->RemoveEnchantment(0);
  329.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  330.                         item->m_isDirty = true;
  331.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  332.                     }
  333.                     else
  334.                     {
  335.                         plr->BroadcastMessage("The item equipped in your head slot is not a valid enchant target");
  336.                     }
  337.                 }
  338.                 else if (IntId >= 85 && IntId <= 87) // ring
  339.                 {
  340.                     if(item->GetProto()->InventoryType == INVTYPE_FINGER)
  341.                     {
  342.                         item->RemoveEnchantment(0);
  343.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  344.                         item->m_isDirty = true;
  345.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  346.                     }
  347.                     else
  348.                     {
  349.                         plr->BroadcastMessage("The item equipped in your ring slot is not a valid enchant target");
  350.                     }
  351.                 }
  352.                 else if (IntId >= 88 && IntId <= 95) // fur lining
  353.                 {
  354.                     if(item->GetProto()->InventoryType == INVTYPE_WRISTS)
  355.                     {
  356.                         item->RemoveEnchantment(0);
  357.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  358.                         item->m_isDirty = true;
  359.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  360.                     }
  361.                     else
  362.                     {
  363.                         plr->BroadcastMessage("The item equipped in your ring slot is not a valid enchant target");
  364.                     }
  365.                 }
  366.                 else if (IntId >= 96 && IntId <= 98) // cloak emboidery
  367.                 {
  368.                     if(item->GetProto()->InventoryType == INVTYPE_CLOAK)
  369.                     {
  370.                         item->RemoveEnchantment(0);
  371.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  372.                         item->m_isDirty = true;
  373.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  374.                     }
  375.                     else
  376.                     {
  377.                         plr->BroadcastMessage("The item equipped in your back slot is not a valid enchant target");
  378.                     }
  379.                 }
  380.                 else if (IntId >= 99 && IntId <=  102) // inscription shoulder chants
  381.                 {
  382.                     if(item->GetProto()->InventoryType == INVTYPE_SHOULDERS)
  383.                     {
  384.                         item->RemoveEnchantment(0);
  385.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  386.                         item->m_isDirty = true;
  387.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  388.                     }
  389.                     else
  390.                     {
  391.                         plr->BroadcastMessage("The item equipped in your shoulder slot is not a valid enchant target");
  392.                     }
  393.                 }
  394.                 else if (IntId >= 103 && IntId <=  106) // engi items, 1 is boots, othe 3 are hands
  395.                 {
  396.                     if(item->GetProto()->InventoryType == INVTYPE_HANDS) // hand shit
  397.                     {
  398.                         item->RemoveEnchantment(0);
  399.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  400.                         item->m_isDirty = true;
  401.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  402.                     }
  403.                     else
  404.                     {
  405.                         if(item->GetProto()->InventoryType != INVTYPE_FEET)
  406.                             plr->BroadcastMessage("The item equipped in your hand slot is not a valid enchant target");
  407.                     }
  408.  
  409.                     if(item->GetProto()->InventoryType == INVTYPE_FEET) // rocket boots
  410.                     {
  411.                         item->RemoveEnchantment(0);
  412.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  413.                         item->m_isDirty = true;
  414.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  415.                     }
  416.                     else
  417.                     {
  418.                         if(item->GetProto()->InventoryType != INVTYPE_HANDS)
  419.                             plr->BroadcastMessage("The item equipped in your foot slot is not a valid enchant target");
  420.                     }
  421.                 }
  422.                 else if (IntId >= 107 && IntId <=  108) // unreleased lw leg armor
  423.                 {
  424.                     if(item->GetProto()->InventoryType == INVTYPE_LEGS)
  425.                     {
  426.                         item->RemoveEnchantment(0);
  427.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  428.                         item->m_isDirty = true;
  429.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  430.                     }
  431.                     else
  432.                     {
  433.                         plr->BroadcastMessage("The item equipped in your leg slot is not a valid enchant target");
  434.                     }
  435.                 }
  436.                 else if (IntId >= 108 && IntId <= 122) // OH 1h enchants
  437.                 {
  438.                     if(item->GetProto()->InventoryType == INVTYPE_WEAPON || item->GetProto()->InventoryType == INVTYPE_WEAPONOFFHAND || item->GetProto()->InventoryType == INVTYPE_WEAPONMAINHAND || item->GetProto()->InventoryType == INVTYPE_2HWEAPON)
  439.                     {
  440.                         item->RemoveEnchantment(0);
  441.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  442.                         item->m_isDirty = true;
  443.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  444.                     }
  445.                     else
  446.                     {
  447.                         plr->BroadcastMessage("The item equipped in your offhand is not a weapon");
  448.                     }
  449.                 }
  450.                 else if (IntId >= 123 && IntId <= 125) // OH 2h enchants
  451.                 {
  452.                     if(item->GetProto()->InventoryType == INVTYPE_2HWEAPON)
  453.                     {
  454.                         item->RemoveEnchantment(0);
  455.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  456.                         item->m_isDirty = true;
  457.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  458.                     }
  459.                     else
  460.                     {
  461.                         plr->BroadcastMessage("The item equipped in your offhand is not a two handed weapon");
  462.                     }
  463.                 }
  464.                 else if (IntId >= 126 && IntId <= 129)
  465.                 {
  466.                     if(item->GetProto()->InventoryType == INVTYPE_FINGER)
  467.                     {
  468.                         item->RemoveEnchantment(0);
  469.                         item->AddEnchantment(Enchant, 0, true, true, false, 0);
  470.                         item->m_isDirty = true;
  471.                         plr->BroadcastMessage("%s has been successfully enchanted with %s.", item->GetProto()->Name1, Enchant->Name);
  472.                     }
  473.                     else
  474.                     {
  475.                         plr->BroadcastMessage("The item equipped in your second finger slot is not a valid enchant target");
  476.                     }
  477.  
  478.                 }
  479.             }
  480.             else
  481.             {
  482.                 plr->BroadcastMessage("You do not have an item the slot");
  483.             }
  484.         }
  485.         else
  486.         {  
  487.             GossipMenu * Menu;
  488.             switch(IntId)
  489.             {
  490.             case 140: // Helm
  491.                 {
  492.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4040, plr);
  493.                     Menu->AddItem(0, "Arcanum of Triumph", 73);
  494.                     Menu->AddItem(0, "Arcanum of Dominance", 74);
  495.                     Menu->AddItem(0, "Arcanum of the Savage Gladiator", 75);
  496.                     Menu->AddItem(0, "Arcanum of Blissful mending", 76);
  497.                     Menu->AddItem(0, "Arcanum of Burning Mysteries", 77);
  498.                     Menu->AddItem(0, "Arcanum of Torment", 78);
  499.                     Menu->AddItem(0, "Arcanum of The Stalward Protector", 79);
  500.                     Menu->AddItem(0, "Arcanum of the Eclipsed Moon", 80);
  501.                     Menu->AddItem(0, "Arcanum of the Flame's Soul", 81);
  502.                     Menu->AddItem(0, "Arcanum of the Fleeing Shadow", 82);
  503.                     Menu->AddItem(0, "Arcanum of the Frosty Soul", 83);
  504.                     Menu->AddItem(0, "Arcanum of Toxic Warding", 84);
  505.                     Menu->SendTo(plr);
  506.                 }break;
  507.             case 141: // Shoulder
  508.                 {
  509.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4041, plr);
  510.                     Menu->AddItem(0, "Greater Inscription of the Gladiator", 66);
  511.                     Menu->AddItem(0, "Inscription of Triumph", 67);
  512.                     Menu->AddItem(0, "Inscription of Dominance", 68);
  513.                     Menu->AddItem(0, "Greater Inscription of the Axe", 69);
  514.                     Menu->AddItem(0, "Greater Inscription of the Crag", 70);
  515.                     Menu->AddItem(0, "Greater Inscription of the Pinnacle", 71);
  516.                     Menu->AddItem(0, "Greater Inscription of the Storm", 72);
  517.                     Menu->SendTo(plr);
  518.                 }break;
  519.             case 142: // Cloak
  520.                 {
  521.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4042, plr);
  522.                     Menu->AddItem(0, "Enchant Cloak - Shadow Armor", 43);
  523.                     Menu->AddItem(0, "Enchant Cloak - Wisdom", 44);
  524.                     Menu->AddItem(0, "Enchant Cloak - Titan Weave", 45);
  525.                     Menu->AddItem(0, "Enchant Cloak - Greater Speed", 46);
  526.                     Menu->AddItem(0, "Enchant Cloak - Mighty Armor", 47);
  527.                     Menu->AddItem(0, "Enchant Cloak - Major Agility", 48);
  528.                     Menu->AddItem(0, "Enchant Cloak - Spell Piercing", 54);
  529.                     Menu->AddItem(0, "Enchant Cloak - Superior Arcane Resistance", 49);
  530.                     Menu->AddItem(0, "Enchant Cloak - Superior Fire Resistance", 50);
  531.                     Menu->AddItem(0, "Enchant Cloak - Superior Frost Resistance", 51);
  532.                     Menu->AddItem(0, "Enchant Cloak - Superior Nature Resistance", 52);
  533.                     Menu->AddItem(0, "Enchant Cloak - Superior Shadow Resistance", 53);
  534.                     Menu->SendTo(plr);
  535.                 }break;
  536.             case 143: // Chest
  537.                 {
  538.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4043, plr);
  539.                     Menu->AddItem(0, "Enchant Chest - Powerful Stats", 31);
  540.                     Menu->AddItem(0, "Enchant Chest - Super Health", 32);
  541.                     Menu->AddItem(0, "Enchant Chest - Greater Mana Restoration", 33);
  542.                     Menu->AddItem(0, "Enchant Chest - Exceptional Resilience", 34);
  543.                     Menu->AddItem(0, "Enchant Chest - Greater Defense", 35);
  544.                     Menu->SendTo(plr);
  545.                 }break;
  546.             case 144: // Bracer
  547.                 {
  548.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4044, plr);
  549.                     Menu->AddItem(0, "Enchant Bracer - Major Stamina", 23);
  550.                     Menu->AddItem(0, "Enchant Bracer - Superior Spellpower", 24);
  551.                     Menu->AddItem(0, "Enchant Bracer - Greater Assult", 25);
  552.                     Menu->AddItem(0, "Enchant Bracer - Major Spirit", 26);
  553.                     Menu->AddItem(0, "Enchant Bracer - Expertise", 27);
  554.                     Menu->AddItem(0, "Enchant Bracer - Greater Stats", 28);
  555.                     Menu->AddItem(0, "Enchant Bracer - Exceptional Intellect", 29);
  556.                     Menu->SendTo(plr);
  557.                 }break;
  558.             case 145: // Gloves
  559.                 {
  560.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4045, plr);
  561.                     Menu->AddItem(0, "Enchant Gloves - Greater Blasting", 17);
  562.                     Menu->AddItem(0, "Enchant Gloves - Armsman", 18);
  563.                     Menu->AddItem(0, "Enchant Gloves - Crusher", 19);
  564.                     Menu->AddItem(0, "Enchant Gloves - Agility", 20);
  565.                     Menu->AddItem(0, "Enchant Gloves - Precision", 21);
  566.                     Menu->AddItem(0, "Enchant Gloves - Expertise", 22);
  567.                     Menu->AddItem(0, "Enchant Gloves - Exceptional Spellpower", 130);
  568.                     Menu->SendTo(plr);
  569.                 }break;
  570.             case 146: // Legs
  571.                 {
  572.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4046, plr);
  573.                     Menu->AddItem(0, "Earthen Leg Armor", 61);
  574.                     Menu->AddItem(0, "Frosthide Leg Armor", 62);
  575.                     Menu->AddItem(0, "Icescale Leg Armor", 63);
  576.                     Menu->AddItem(0, "Brilliant Spellthread", 64);
  577.                     Menu->AddItem(0, "Sapphire Spellthread", 65);
  578.                     Menu->SendTo(plr);
  579.                 }break;
  580.             case 147: // Boots
  581.                 {
  582.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4047, plr);
  583.                     Menu->AddItem(0, "Enchant Boots - Greater Assult", 36);
  584.                     Menu->AddItem(0, "Enchant Boots - Tuskars Vitality", 37);
  585.                     Menu->AddItem(0, "Enchant Boots - Superior Agility", 38);
  586.                     Menu->AddItem(0, "Enchant Boots - Greater Spirit", 39);
  587.                     Menu->AddItem(0, "Enchant Boots - Greater Vitality", 40);
  588.                     Menu->AddItem(0, "Enchant Boots - Icewalker", 41);
  589.                     Menu->AddItem(0, "Enchant Boots - Greater Fortitude", 42);
  590.                     Menu->SendTo(plr);
  591.                 }break;
  592.             case 148: // Mainhand
  593.                 {
  594.                     if(i_InventoryType(plr, EQUIPMENT_SLOT_MAINHAND, INVTYPE_2HWEAPON) == true)
  595.                     {
  596.                         objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4055, plr);
  597.                         Menu->AddItem(0, "Enchant Weapon - Titan Guard", 0);
  598.                         Menu->AddItem(0, "Enchant Weapon - Accuracy", 1);
  599.                         Menu->AddItem(0, "Enchant Weapon - Berserking", 2);
  600.                         Menu->AddItem(0, "Enchant Weapon - Black Magic", 3);
  601.                         Menu->AddItem(0, "Enchant Weapon - Mighty Spellpower", 4);
  602.                         Menu->AddItem(0, "Enchant Weapon - Superior Potency", 5);
  603.                         Menu->AddItem(0, "Enchant Weapon - Ice Breaker", 6);
  604.                         Menu->AddItem(0, "Enchant Weapon - Lifeward", 7);
  605.                         Menu->AddItem(0, "Enchant Weapon - Blood Draining", 8);
  606.                         Menu->AddItem(0, "Enchant Weapon - Blade Ward", 9);
  607.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Agility", 10);
  608.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Spirit", 11);
  609.                         Menu->AddItem(0, "Enchant Weapon - Executioner", 12);
  610.                         Menu->AddItem(0, "Enchant Weapon - Mongoose", 13);
  611.                         Menu->AddItem(0, "Next Page...", 150);
  612.                         Menu->SendTo(plr);
  613.                     }
  614.                     else if (i_InventoryType(plr, EQUIPMENT_SLOT_MAINHAND, INVTYPE_WEAPON) == true || i_InventoryType(plr, EQUIPMENT_SLOT_MAINHAND, INVTYPE_WEAPONMAINHAND)== true)
  615.                     {
  616.                         objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4051, plr);
  617.                         Menu->AddItem(0, "Enchant Weapon - Titan Guard", 0);
  618.                         Menu->AddItem(0, "Enchant Weapon - Accuracy", 1);
  619.                         Menu->AddItem(0, "Enchant Weapon - Berserking", 2);
  620.                         Menu->AddItem(0, "Enchant Weapon - Black Magic", 3);
  621.                         Menu->AddItem(0, "Enchant Weapon - Mighty Spellpower", 4);
  622.                         Menu->AddItem(0, "Enchant Weapon - Superior Potency", 5);
  623.                         Menu->AddItem(0, "Enchant Weapon - Ice Breaker", 6);
  624.                         Menu->AddItem(0, "Enchant Weapon - Lifeward", 7);
  625.                         Menu->AddItem(0, "Enchant Weapon - Blood Draining", 8);
  626.                         Menu->AddItem(0, "Enchant Weapon - Blade Ward", 9);
  627.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Agility", 10);
  628.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Spirit", 11);
  629.                         Menu->AddItem(0, "Enchant Weapon - Executioner", 12);
  630.                         Menu->AddItem(0, "Enchant Weapon - Mongoose", 13);
  631.                         Menu->SendTo(plr);
  632.                     }
  633.                     else
  634.                     {
  635.                         plr->BroadcastMessage("|cFFFF0000Error: You either have no main hand weapon currently equipped, or the item in your main hand weapon slot is not a weapon|r");
  636.                     }
  637.                     Menu->SendTo(plr);
  638.                 }break;
  639.             case 149: // Offhand
  640.                 {
  641.                     if(i_InventoryType(plr, EQUIPMENT_SLOT_OFFHAND, INVTYPE_2HWEAPON) == true)
  642.                     {
  643.                         if(plr->HasSpell(46917))
  644.                         {
  645.                             objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4054, plr);
  646.                             Menu->AddItem(0, "Enchant Weapon - Titan Guard", 109);
  647.                             Menu->AddItem(0, "Enchant Weapon - Accuracy", 110);
  648.                             Menu->AddItem(0, "Enchant Weapon - Berserking", 111);
  649.                             Menu->AddItem(0, "Enchant Weapon - Black Magic", 112);
  650.                             Menu->AddItem(0, "Enchant Weapon - Mighty Spellpower", 113);
  651.                             Menu->AddItem(0, "Enchant Weapon - Superior Potency", 114);
  652.                             Menu->AddItem(0, "Enchant Weapon - Ice Breaker", 115);
  653.                             Menu->AddItem(0, "Enchant Weapon - Lifeward", 116);
  654.                             Menu->AddItem(0, "Enchant Weapon - Blood Draining", 117);
  655.                             Menu->AddItem(0, "Enchant Weapon - Blade Ward", 118);
  656.                             Menu->AddItem(0, "Enchant Weapon - Exceptional Agility", 119);
  657.                             Menu->AddItem(0, "Enchant Weapon - Exceptional Spirit", 120);
  658.                             Menu->AddItem(0, "Enchant Weapon - Executioner", 121);
  659.                             Menu->AddItem(0, "Enchant Weapon - Mongoose", 122);
  660.                             Menu->AddItem(0, "Next Page...", 151);
  661.                             Menu->SendTo(plr);
  662.                         }
  663.                         else
  664.                         {
  665.                             plr->BroadcastMessage("|cFFFF0000Error: Your have a two handed weapon as an offhand, and you do not have Titans Grip trained. A GM has been alerted|r");
  666.                         }
  667.                     }
  668.                     else if(i_InventoryType(plr, EQUIPMENT_SLOT_OFFHAND, INVTYPE_WEAPON) == true || i_InventoryType(plr, EQUIPMENT_SLOT_OFFHAND, INVTYPE_WEAPONOFFHAND) == true)
  669.                     {
  670.                         objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4050, plr);
  671.                         Menu->AddItem(0, "Enchant Weapon - Titan Guard", 109);
  672.                         Menu->AddItem(0, "Enchant Weapon - Accuracy", 110);
  673.                         Menu->AddItem(0, "Enchant Weapon - Berserking", 111);
  674.                         Menu->AddItem(0, "Enchant Weapon - Black Magic", 112);
  675.                         Menu->AddItem(0, "Enchant Weapon - Mighty Spellpower", 113);
  676.                         Menu->AddItem(0, "Enchant Weapon - Superior Potency", 114);
  677.                         Menu->AddItem(0, "Enchant Weapon - Ice Breaker", 115);
  678.                         Menu->AddItem(0, "Enchant Weapon - Lifeward", 116);
  679.                         Menu->AddItem(0, "Enchant Weapon - Blood Draining", 117);
  680.                         Menu->AddItem(0, "Enchant Weapon - Blade Ward", 118);
  681.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Agility", 119);
  682.                         Menu->AddItem(0, "Enchant Weapon - Exceptional Spirit", 120);
  683.                         Menu->AddItem(0, "Enchant Weapon - Executioner", 121);
  684.                         Menu->AddItem(0, "Enchant Weapon - Mongoose", 122);
  685.                         Menu->SendTo(plr);
  686.                     }
  687.                     else if(i_InventoryType(plr, EQUIPMENT_SLOT_OFFHAND, INVTYPE_SHIELD) == true)
  688.                     {
  689.                         objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4048, plr);
  690.                         Menu->AddItem(0, "Enchant Shield - Defense", 55);
  691.                         Menu->AddItem(0, "Enchant Shield - Greater Intellect", 56);
  692.                         Menu->AddItem(0, "Enchant Shield - Shield Block", 57);
  693.                         Menu->AddItem(0, "Enchant Shield - Resilience", 58);
  694.                         Menu->AddItem(0, "Enchant Shield - Major Stamina", 59);
  695.                         Menu->AddItem(0, "Enchant Shield - Tough Shield", 60);
  696.                         Menu->SendTo(plr);
  697.                     }
  698.                     else
  699.                     {
  700.                         plr->BroadcastMessage("|cFFFF0000Error: Either you have no offhand, or you offhand is not a valid target for any enchants|r");
  701.                     }
  702.                 }break;
  703.  
  704.             case 150: // Long menu for mainhand weapons that may want either 1h or 2h weapon enchants
  705.                 {
  706.                     if(i_InventoryType(plr, EQUIPMENT_SLOT_MAINHAND, INVTYPE_2HWEAPON) == true)
  707.                     {
  708.                         objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4055, plr);
  709.                         Menu->AddItem(0, "Enchant 2H Weapon - Massacre", 14);
  710.                         Menu->AddItem(0, "Enchant 2H Weapon - Scourgebane", 15);
  711.                         Menu->AddItem(0, "Enchant 2H Weapon - Giant Slayer", 16);
  712.                         if(IsWeaponType(plr, EQUIPMENT_SLOT_MAINHAND, ITEM_SUBCLASS_WEAPON_STAFF))
  713.                         {
  714.                             Menu->AddItem(0, "Enchant Stave - Greater Spellpower", 30);
  715.                         }
  716.                         Menu->SendTo(plr);
  717.                     }
  718.                 }break;
  719.            
  720.             case 151: // Long menu for offhand 2h weapons that may want either 1h or 2h weapon enchants
  721.                 {
  722.                     if(i_InventoryType(plr, EQUIPMENT_SLOT_OFFHAND, INVTYPE_2HWEAPON) == true)
  723.                     {
  724.                         if(plr->HasSpell(46917))
  725.                         {
  726.                             objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4054, plr);
  727.                             Menu->AddItem(0, "Enchant 2H Weapon - Massacre", 123);
  728.                             Menu->AddItem(0, "Enchant 2H Weapon - Scourgebane", 124);
  729.                             Menu->AddItem(0, "Enchant 2H Weapon - Giant Slayer", 125);
  730.                             if(IsWeaponType(plr, EQUIPMENT_SLOT_MAINHAND, ITEM_SUBCLASS_WEAPON_STAFF))
  731.                             {
  732.                                 Menu->AddItem(0, "Enchant Stave - Greater Spellpower", 131); // Might as well add it incase :S.
  733.                             }
  734.                             Menu->SendTo(plr);
  735.                         }
  736.                         else
  737.                         {
  738.                             plr->BroadcastMessage("|cFFFF0000Error: Your have a two handed weapon as an offhand, and you do not have Titans Grip trained. A GM has been alerted|r");
  739.                         }
  740.                     }
  741.                 }break;
  742.             case 152: // Prof specific main menu
  743.                 {
  744.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4064, plr);
  745.                     Menu->AddItem(0, "First Ring Slot", 153);
  746.                     Menu->AddItem(0, "Second Ring Slot", 159);
  747.                     Menu->AddItem(0, "Bracer - Fur Lining", 154);
  748.                     Menu->AddItem(0, "Cloak - Embroidery", 155);
  749.                     Menu->AddItem(0, "Shoulder - Inscription", 156);
  750.                     Menu->AddItem(0, "Boots & Gloves - Engineering Gadgets", 157);
  751.                     Menu->AddItem(0, "Legs - Improved Leg Armor", 158);
  752.                     Menu->SendTo(plr);
  753.                 }break;
  754.             case 153: // 1st ring
  755.                 {
  756.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4057, plr);
  757.                     Menu->AddItem(0, "Enchant Ring - Assult", 85);
  758.                     Menu->AddItem(0, "Enchant Ring - Greater Spellpower", 86);
  759.                     Menu->AddItem(0, "Enchant Ring - Stamina", 87);
  760.                     Menu->SendTo(plr);
  761.                 }break;
  762.             case 154: // fur lining
  763.                 {
  764.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4058, plr);
  765.                     Menu->AddItem(0, "Fur Lining - Attack Power", 93);
  766.                     Menu->AddItem(0, "Fur Lining - Spellpower", 95);
  767.                     Menu->AddItem(0, "Fur Lining - Stamina", 94);
  768.                     Menu->AddItem(0, "Fur Lining - Arcane Resist", 88);
  769.                     Menu->AddItem(0, "Fur Lining - Fire Resist", 89);
  770.                     Menu->AddItem(0, "Fur Lining - Frost Resist", 90);
  771.                     Menu->AddItem(0, "Fur Lining - Nature Resist", 91);
  772.                     Menu->AddItem(0, "Fur Lining - Shadow Resist", 92);
  773.                     Menu->SendTo(plr);
  774.                 }break;
  775.             case 155: // cloak embroidery
  776.                 {
  777.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4059, plr);
  778.                     Menu->AddItem(0, "Embroid Cloak - Darkglow", 96);
  779.                     Menu->AddItem(0, "Embroid Cloak - Lightweave", 97);
  780.                     Menu->AddItem(0, "Embroid Cloak - Swordguard", 98);
  781.                     Menu->SendTo(plr);
  782.                 }break;
  783.             case 156: // inscription enchants
  784.                 {
  785.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4060, plr);
  786.                     Menu->AddItem(0, "Master's Inscription of the Axe", 99);
  787.                     Menu->AddItem(0, "Master's Inscription of the Crag", 100);
  788.                     Menu->AddItem(0, "Master's Inscription of the Pinnacle", 101);
  789.                     Menu->AddItem(0, "Master's Inscription of the Storm", 102);
  790.                     Menu->SendTo(plr);
  791.                 }break;
  792.             case 157: // Engineering Gadgets
  793.                 {
  794.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4061, plr);
  795.                     Menu->AddItem(0, "Nitro Boots", 103);
  796.                     Menu->AddItem(0, "Hand-Mounted Pyro Rocket", 104);
  797.                     Menu->AddItem(0, "Handguard Hyperspeed Accelerators", 105);
  798.                     Menu->AddItem(0, "Handguard Reticulated Armor Webbing", 106);
  799.                     Menu->SendTo(plr);
  800.                 }break;
  801.             case 158: // Unreleased lw leg armor (100 ap / 36 crit)
  802.                 {
  803.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4062, plr);
  804.                     Menu->AddItem(0, "Dragonscale Leg Armor", 107);
  805.                     Menu->AddItem(0, "Wyrmscale Leg Armor", 108);
  806.                     Menu->SendTo(plr);
  807.                 }break;
  808.             case 159: // 2nd slot ring
  809.                 {
  810.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4063, plr);
  811.                     Menu->AddItem(0, "Enchant Ring - Assult", 127);
  812.                     Menu->AddItem(0, "Enchant Ring - Greater Spellpower", 128);
  813.                     Menu->AddItem(0, "Enchant Ring - Stamina", 129);
  814.                     Menu->SendTo(plr);
  815.                 }break;
  816.             case 160: // Any Enchant -> Any Slot
  817.                 {
  818.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  819.                     Menu->AddItem(0, "Helm Enchants", 161);
  820.                     Menu->AddItem(0, "Shoulder Enchants", 162);
  821.                     Menu->AddItem(0, "Cloak Enchants", 163);
  822.                     Menu->AddItem(0, "Chest Enchants", 164);
  823.                     Menu->AddItem(0, "Bracer Enchants", 165);
  824.                     Menu->AddItem(0, "Hand Enchants", 166);
  825.                     Menu->AddItem(0, "Leg Enchants", 167);
  826.                     Menu->AddItem(0, "Boot Enchants", 168);
  827.                     Menu->AddItem(0, "Ring Enchants", 169);
  828.                     Menu->AddItem(0, "One Handed Weapon Enchants", 170);
  829.                     Menu->AddItem(0, "Two Handed Weapon Enchants", 171);
  830.                     Menu->AddItem(0, "Shield Enchants", 172);
  831.                     Menu->AddItem(0, "Help!", 175);
  832.                     Menu->SendTo(plr);
  833.                 }break;
  834.             case 161: // helm
  835.                 {
  836.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  837.                     Menu->AddItem(0, "Arcanum of Triumph", 73, 1);
  838.                     Menu->AddItem(0, "Arcanum of Dominance", 74, 1);
  839.                     Menu->AddItem(0, "Arcanum of the Savage Gladiator", 75, 1);
  840.                     Menu->AddItem(0, "Arcanum of Blissful mending", 76, 1);
  841.                     Menu->AddItem(0, "Arcanum of Burning Mysteries", 77, 1);
  842.                     Menu->AddItem(0, "Arcanum of Torment", 78, 1);
  843.                     Menu->AddItem(0, "Arcanum of The Stalward Protector", 79, 1);
  844.                     Menu->AddItem(0, "Arcanum of the Eclipsed Moon", 80, 1);
  845.                     Menu->AddItem(0, "Arcanum of the Flame's Soul", 81, 1);
  846.                     Menu->AddItem(0, "Arcanum of the Fleeing Shadow", 82, 1);
  847.                     Menu->AddItem(0, "Arcanum of the Frosty Soul", 83, 1);
  848.                     Menu->AddItem(0, "Arcanum of Toxic Warding", 84, 1);
  849.                     Menu->SendTo(plr);
  850.                 }break;
  851.             case 162: // shoulder
  852.                 {
  853.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  854.                     Menu->AddItem(0, "Greater Inscription of the Gladiator", 66, 1);
  855.                     Menu->AddItem(0, "Inscription of Triumph", 67, 1);
  856.                     Menu->AddItem(0, "Inscription of Dominance", 68, 1);
  857.                     Menu->AddItem(0, "Greater Inscription of the Axe", 69, 1);
  858.                     Menu->AddItem(0, "Greater Inscription of the Crag", 70, 1);
  859.                     Menu->AddItem(0, "Greater Inscription of the Pinnacle", 71, 1);
  860.                     Menu->AddItem(0, "Greater Inscription of the Storm", 72, 1);
  861.                     Menu->AddItem(0, "Master's Inscription of the Axe", 99, 1);
  862.                     Menu->AddItem(0, "Master's Inscription of the Crag", 100, 1);
  863.                     Menu->AddItem(0, "Master's Inscription of the Pinnacle", 101, 1);
  864.                     Menu->AddItem(0, "Master's Inscription of the Storm", 102, 1);
  865.                     Menu->SendTo(plr);
  866.                 }break;
  867.             case 163: // cloak
  868.                 {
  869.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  870.                     Menu->AddItem(0, "Enchant Cloak - Shadow Armor", 43, 1);
  871.                     Menu->AddItem(0, "Enchant Cloak - Wisdom", 44, 1);
  872.                     Menu->AddItem(0, "Enchant Cloak - Titan Weave", 45, 1);
  873.                     Menu->AddItem(0, "Enchant Cloak - Greater Speed", 46, 1);
  874.                     Menu->AddItem(0, "Enchant Cloak - Mighty Armor", 47, 1);
  875.                     Menu->AddItem(0, "Enchant Cloak - Major Agility", 48, 1);
  876.                     Menu->AddItem(0, "Enchant Cloak - Spell Piercing", 54, 1);
  877.                     Menu->AddItem(0, "Enchant Cloak - Superior Arcane Resistance", 49, 1);
  878.                     Menu->AddItem(0, "Enchant Cloak - Superior Fire Resistance", 50, 1);
  879.                     Menu->AddItem(0, "Enchant Cloak - Superior Frost Resistance", 51, 1);
  880.                     Menu->AddItem(0, "Enchant Cloak - Superior Nature Resistance", 52, 1);
  881.                     Menu->AddItem(0, "Enchant Cloak - Superior Shadow Resistance", 53, 1);
  882.                     Menu->AddItem(0, "Embroid Cloak - Darkglow", 96, 1);
  883.                     Menu->AddItem(0, "Embroid Cloak - Lightweave", 97, 1);
  884.                     Menu->AddItem(0, "Embroid Cloak - Swordguard", 98, 1);
  885.                     Menu->SendTo(plr);
  886.                 }break;
  887.             case 164: // chest
  888.                 {
  889.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  890.                     Menu->AddItem(0, "Enchant Chest - Powerful Stats", 31, 1);
  891.                     Menu->AddItem(0, "Enchant Chest - Super Health", 32, 1);
  892.                     Menu->AddItem(0, "Enchant Chest - Greater Mana Restoration", 33, 1);
  893.                     Menu->AddItem(0, "Enchant Chest - Exceptional Resilience", 34, 1);
  894.                     Menu->AddItem(0, "Enchant Chest - Greater Defense", 35, 1);
  895.                     Menu->SendTo(plr);
  896.                 }break;
  897.             case 165: // bracer
  898.                 {
  899.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  900.                     Menu->AddItem(0, "Enchant Bracer - Major Stamina", 23, 1);
  901.                     Menu->AddItem(0, "Enchant Bracer - Superior Spellpower", 24, 1);
  902.                     Menu->AddItem(0, "Enchant Bracer - Greater Assult", 25, 1);
  903.                     Menu->AddItem(0, "Enchant Bracer - Major Spirit", 26, 1);
  904.                     Menu->AddItem(0, "Enchant Bracer - Expertise", 27, 1);
  905.                     Menu->AddItem(0, "Enchant Bracer - Greater Stats", 28, 1);
  906.                     Menu->AddItem(0, "Enchant Bracer - Exceptional Intellect", 29, 1);
  907.                     Menu->AddItem(0, "Fur Lining - Attack Power", 93, 1);
  908.                     Menu->AddItem(0, "Fur Lining - Spellpower", 95, 1);
  909.                     Menu->AddItem(0, "Fur Lining - Stamina", 94, 1);
  910.                     Menu->AddItem(0, "Fur Lining - Arcane Resist", 88, 1);
  911.                     Menu->AddItem(0, "Fur Lining - Fire Resist", 89, 1);
  912.                     Menu->AddItem(0, "Fur Lining - Frost Resist", 90, 1);
  913.                     Menu->AddItem(0, "Fur Lining - Nature Resist", 91, 1);
  914.                     Menu->AddItem(0, "Fur Lining - Shadow Resist", 92, 1);
  915.                     Menu->SendTo(plr);
  916.                 }break;
  917.             case 166: // glove
  918.                 {
  919.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  920.                     Menu->AddItem(0, "Hand-Mounted Pyro Rocket", 104, 1);
  921.                     Menu->AddItem(0, "Handguard Hyperspeed Accelerators", 105, 1);
  922.                     Menu->AddItem(0, "Handguard Reticulated Armor Webbing", 106, 1);
  923.                     Menu->AddItem(0, "Enchant Gloves - Greater Blasting", 17, 1);
  924.                     Menu->AddItem(0, "Enchant Gloves - Armsman", 18, 1);
  925.                     Menu->AddItem(0, "Enchant Gloves - Crusher", 19, 1);
  926.                     Menu->AddItem(0, "Enchant Gloves - Agility", 20, 1);
  927.                     Menu->AddItem(0, "Enchant Gloves - Precision", 21, 1);
  928.                     Menu->AddItem(0, "Enchant Gloves - Expertise", 22, 1);
  929.                     Menu->AddItem(0, "Enchant Gloves - Exceptional Spellpower", 130, 1);
  930.                     Menu->SendTo(plr);
  931.                 }break;
  932.             case 167: // legs
  933.                 {
  934.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  935.                     Menu->AddItem(0, "Earthen Leg Armor", 61, 1);
  936.                     Menu->AddItem(0, "Frosthide Leg Armor", 62, 1);
  937.                     Menu->AddItem(0, "Icescale Leg Armor", 63, 1);
  938.                     Menu->AddItem(0, "Brilliant Spellthread", 64, 1);
  939.                     Menu->AddItem(0, "Sapphire Spellthread", 65, 1);
  940.                     Menu->AddItem(0, "Dragonscale Leg Armor", 107, 1);
  941.                     Menu->AddItem(0, "Wyrmscale Leg Armor", 108, 1);
  942.                     Menu->SendTo(plr);
  943.                 }break;
  944.             case 168: // boots
  945.                 {
  946.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  947.                     Menu->AddItem(0, "Nitro Boots", 103, 1);
  948.                     Menu->AddItem(0, "Enchant Boots - Greater Assult", 36, 1);
  949.                     Menu->AddItem(0, "Enchant Boots - Tuskars Vitality", 37, 1);
  950.                     Menu->AddItem(0, "Enchant Boots - Superior Agility", 38, 1);
  951.                     Menu->AddItem(0, "Enchant Boots - Greater Spirit", 39, 1);
  952.                     Menu->AddItem(0, "Enchant Boots - Greater Vitality", 40, 1);
  953.                     Menu->AddItem(0, "Enchant Boots - Icewalker", 41, 1);
  954.                     Menu->AddItem(0, "Enchant Boots - Greater Fortitude", 42, 1);
  955.                     Menu->SendTo(plr);
  956.                 }break;
  957.             case 169: // rings
  958.                 {
  959.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  960.                     Menu->AddItem(0, "Enchant Ring - Assult", 85, 1);
  961.                     Menu->AddItem(0, "Enchant Ring - Greater Spellpower", 86, 1);
  962.                     Menu->AddItem(0, "Enchant Ring - Stamina", 87, 1);
  963.                     Menu->SendTo(plr);
  964.                 }break;
  965.             case 170: // One handed
  966.                 {
  967.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  968.                     Menu->AddItem(0, "Enchant Weapon - Titan Guard", 0, 1);
  969.                     Menu->AddItem(0, "Enchant Weapon - Accuracy", 1, 1);
  970.                     Menu->AddItem(0, "Enchant Weapon - Berserking", 2, 1);
  971.                     Menu->AddItem(0, "Enchant Weapon - Black Magic", 3, 1);
  972.                     Menu->AddItem(0, "Enchant Weapon - Mighty Spellpower", 4, 1);
  973.                     Menu->AddItem(0, "Enchant Weapon - Superior Potency", 5, 1);
  974.                     Menu->AddItem(0, "Enchant Weapon - Ice Breaker", 6, 1);
  975.                     Menu->AddItem(0, "Enchant Weapon - Lifeward", 7, 1);
  976.                     Menu->AddItem(0, "Enchant Weapon - Blood Draining", 8, 1);
  977.                     Menu->AddItem(0, "Enchant Weapon - Blade Ward", 9, 1);
  978.                     Menu->AddItem(0, "Enchant Weapon - Exceptional Agility", 10, 1);
  979.                     Menu->AddItem(0, "Enchant Weapon - Exceptional Spirit", 11, 1);
  980.                     Menu->AddItem(0, "Enchant Weapon - Executioner", 12, 1);
  981.                     Menu->AddItem(0, "Enchant Weapon - Mongoose", 13, 1);
  982.                     Menu->SendTo(plr);
  983.                 }break;
  984.             case 171: // Two handed
  985.                 {
  986.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  987.                     Menu->AddItem(0, "Enchant 2H Weapon - Massacre", 14, 1);
  988.                     Menu->AddItem(0, "Enchant 2H Weapon - Scourgebane", 15, 1);
  989.                     Menu->AddItem(0, "Enchant 2H Weapon - Giant Slayer", 16, 1);
  990.                     Menu->AddItem(0, "Enchant Stave - Greater Spellpower", 30, 1);
  991.                     Menu->SendTo(plr);
  992.                 }break;
  993.             case 172: // Shield
  994.                 {
  995.                     objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4065, plr);
  996.                     Menu->AddItem(0, "Enchant Shield - Defense", 55, 1);
  997.                     Menu->AddItem(0, "Enchant Shield - Greater Intellect", 56, 1);
  998.                     Menu->AddItem(0, "Enchant Shield - Shield Block", 57, 1);
  999.                     Menu->AddItem(0, "Enchant Shield - Resilience", 58, 1);
  1000.                     Menu->AddItem(0, "Enchant Shield - Major Stamina", 59, 1);
  1001.                     Menu->AddItem(0, "Enchant Shield - Tough Shield", 60, 1);
  1002.                     Menu->SendTo(plr);
  1003.                 }break;
  1004.             case 175:
  1005.                 {
  1006.                     plr->BroadcastMessage("You have the ability to put any enchant on any weapon %s. Select the enchant you want to apply to any item and when the message box appears type in either 'All' to have all your gear enchanted, or a keyword for a specific peice of gear. Keywords would be 'helm' for helm, 'shoulder' for shoulders, and so on. Keep in mind you can enchant trinkets and rings. the keywords for these are: trinket1, trinket2, ring 1, ring 2. Enjoy!", plr->GetName());
  1007.                 }break;
  1008.             }
  1009.         }
  1010.     }
  1011.     void Destroy()
  1012.     {
  1013.         delete this;
  1014.     }
  1015. };
  1016.  
  1017. void SetupEnchantNPC(ScriptMgr * mgr)
  1018. {
  1019.     GossipScript * EnchantNPCGossip = (GossipScript*) new EnchantNPC_Gossip;
  1020.     mgr->register_gossip_script(48056, EnchantNPCGossip);
  1021.  
  1022. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement