MichaelCrow

Untitled

Sep 28th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.82 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class Talent_Specialization : public CreatureScript
  4. {
  5. public:
  6. Talent_Specialization() : CreatureScript("Talent_Specialization") { }
  7.  
  8.  
  9. bool HasSpec(Player* pPlayer, uint32 talentID)
  10. {
  11. TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentID);
  12.  
  13. if (!talentInfo) // You gave me the wrong ID
  14. return false;
  15.  
  16. uint32 points = 0;
  17.  
  18. uint32 tTab = talentInfo->TalentTab;
  19. if (talentInfo->Row > 0)
  20. {
  21. uint32 numRows = sTalentStore.GetNumRows();
  22. for (uint32 i = 0; i < numRows; i++) // Loop through all talents.
  23. {
  24. // Someday, someone needs to revamp
  25. const TalentEntry* tmpTalent = sTalentStore.LookupEntry(i);
  26. if (tmpTalent) // the way talents are tracked
  27. {
  28. if (tmpTalent->TalentTab == tTab)
  29. {
  30. for (uint8 rank = 0; rank < MAX_TALENT_RANK; rank++)
  31. {
  32. if (tmpTalent->RankID[rank] != 0)
  33. {
  34. if (pPlayer->HasSpell(tmpTalent->RankID[rank]))
  35. {
  36. points += (rank + 1);
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. }
  44. if (points > 11)
  45. return true;
  46. return false;
  47.  
  48. }
  49.  
  50.  
  51. bool OnGossipHello(Player * pPlayer, Creature * pCreature)
  52. {
  53.  
  54. switch(pPlayer->getClass())
  55. {
  56. case CLASS_PALADIN:
  57. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a paladin. Paladins can perform all three possible roles of damage dealing, healing, or tanking.", GOSSIP_SENDER_MAIN, 100);
  58. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffE066FFRetribution|r Paladin. This specialization focuses on damage dealing by applying additional holy damage to each attack.", GOSSIP_SENDER_MAIN, 0);
  59. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Judgements of the Wise\nActives: Crusader Strike and Repentance", GOSSIP_SENDER_MAIN, 100);
  60. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffFFFFFFHoly|r Paladin.", GOSSIP_SENDER_MAIN, 1);
  61. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Sheath of Light and Judgements of the Pure.\nActives: Cleanse and Divine Favor.", GOSSIP_SENDER_MAIN, 100);
  62. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff2E37FEProtection|r Paladin.", GOSSIP_SENDER_MAIN, 2);
  63. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features: \nPassives: Rebout. \nActives: Hammer of the Righteous.", GOSSIP_SENDER_MAIN, 100);
  64. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  65. break;
  66. case CLASS_MAGE:
  67. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a mage. Mages may only fulfill the role of damage dealing, but they are notoriously good at doing so.", GOSSIP_SENDER_MAIN, 100);
  68. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cff1D7CF2Arcane|r Mage", GOSSIP_SENDER_MAIN, 3);
  69. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassive: Arcane Mind, Arcane Empowerment and Missile Barrage.\nPresence of Mind.", GOSSIP_SENDER_MAIN, 100);
  70. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffB22222Fire|r Mage.", GOSSIP_SENDER_MAIN, 4);
  71. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Blazing Speed, Hotstreak and Critical Mass\nActives: Combustion and Blast Wave", GOSSIP_SENDER_MAIN, 100);
  72. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff0EBFE9Frost|r Mage.", GOSSIP_SENDER_MAIN, 5);
  73. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features: \nPassives: Fingers of Frost and Brainfreeze\nActives: Ice Block, Deep Freeze.", GOSSIP_SENDER_MAIN, 100);
  74. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  75. break;
  76. case CLASS_WARRIOR:
  77. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a warrior. Warriors can perform well in both the role of a tank and a damage dealer.", GOSSIP_SENDER_MAIN, 100);
  78. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cff7B68EEArms|r Warrior.", GOSSIP_SENDER_MAIN, 600);
  79. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Unrelenting Assault and Juggernaut (And a weapon specialization).\nActives: (NONE)", GOSSIP_SENDER_MAIN, 100);
  80. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff8B2500Fury|r Warrior.", GOSSIP_SENDER_MAIN, 7);
  81. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Flurry and Titans Grip.\nActives: Bloodthirst", GOSSIP_SENDER_MAIN, 100);
  82. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff8B5742Protection|r Warrior.", GOSSIP_SENDER_MAIN, 8);
  83. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Damage Shield and Vitality.\nActives: Vigilance and Shockwave.", GOSSIP_SENDER_MAIN, 100);
  84. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  85. break;
  86. case CLASS_PRIEST:
  87. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a priest. Priests may act as damage dealers by harming the soul and healers by soothing the spirit.", GOSSIP_SENDER_MAIN, 100);
  88. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffFFFFFFHoly|r Priest.", GOSSIP_SENDER_MAIN, 9);
  89. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Body and Soul, Spiritual Guidance.\nActives: Guardian Spirit.", GOSSIP_SENDER_MAIN, 100);
  90. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff78AB46Discipline|r Priest.", GOSSIP_SENDER_MAIN, 10);
  91. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Divine Aegis, Focused Will, and Borrowed Time\nActives: Power Infusion.", GOSSIP_SENDER_MAIN, 100);
  92. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff757575Shadow|r Priest.", GOSSIP_SENDER_MAIN, 11);
  93. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Shadow Weaving and Shadow Power\nActives: Shadowform and Vampiric Embrace.", GOSSIP_SENDER_MAIN, 100);
  94. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  95. break;
  96. case CLASS_HUNTER:
  97. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a hunter. Hunters have a vast array of utilities and excel in dealing damage by teaming up with a pet.", GOSSIP_SENDER_MAIN, 100);
  98. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff800000Marksman|r Hunter. ", GOSSIP_SENDER_MAIN, 12);
  99. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features passives:\nPiercing Shots, and Trueshot Aura.\nActives: Silencing Shot", GOSSIP_SENDER_MAIN, 100);
  100. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7BCC70Survival|r Hunter.", GOSSIP_SENDER_MAIN, 13);
  101. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Expose Weakness\nActives: Frost Trap and Wyvern Sting.", GOSSIP_SENDER_MAIN, 100);
  102. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff8A2BE2Beastmastery|r Hunter.", GOSSIP_SENDER_MAIN, 14);
  103. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Kindred Spirits and Serpents Swiftness\nActives: Intimidation", GOSSIP_SENDER_MAIN, 100);
  104. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  105. break;
  106. case CLASS_ROGUE:
  107. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a rogue. Rogues specialize in being stealthy, dealing damage should they choose to reveal themselves.", GOSSIP_SENDER_MAIN, 100);
  108. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff838EDESubtlety|r Rogue.", GOSSIP_SENDER_MAIN, 15);
  109. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Honor Among Thieves, Cheat Death, Slaughter from the Shadows\nActives: Shadowstep", GOSSIP_SENDER_MAIN, 100);
  110. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cff8B3626Assassination|r Rogue.", GOSSIP_SENDER_MAIN, 16);
  111. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Overkill, Focused Attacks, Fleet Footed, Seal Fate, Deadly Brew\nActives: Mutilate.", GOSSIP_SENDER_MAIN, 100);
  112. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff87CEEBCombat|r Rogue.", GOSSIP_SENDER_MAIN, 1700);
  113. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Lightning Reflexes, Combat Potency, Unfair Advantage (And either Dagger, Swords/Axes, or Mace spec).\nActives: Adrenaline Rush, Blade Flurry", GOSSIP_SENDER_MAIN, 100);
  114. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  115. break;
  116. case CLASS_SHAMAN:
  117. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a shaman. Shamans are able to fulfill the roles of spell caster, melee damage dealer and healer, relying greatly on their totems.", GOSSIP_SENDER_MAIN, 100);
  118. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7BBF6ARestoration|r Shaman.", GOSSIP_SENDER_MAIN, 18);
  119. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features Passives:\nNature's Blessing\nActives: Nature's swiftness and EarthLiving Weapon.", GOSSIP_SENDER_MAIN, 100);
  120. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cffD9D919Enhancement|r Shaman.", GOSSIP_SENDER_MAIN, 19);
  121. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Maelstrom weapon and Dual Wield\nActives: Stormstrike and Lavalash.", GOSSIP_SENDER_MAIN, 100);
  122. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cff912CEEElemental|r Shaman.", GOSSIP_SENDER_MAIN, 20);
  123. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Lightning Mastery, Lightning Overload, and Storm Earth and Fire\nActives: Elemental Mastery", GOSSIP_SENDER_MAIN, 100);
  124. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  125. break;
  126. case CLASS_WARLOCK:
  127. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a warlock. Warlocks use dark magic to corrupt their enemies and minions to do their dirty work.", GOSSIP_SENDER_MAIN, 100);
  128. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be an |cff9CCB19Affliciton|r Warlock.", GOSSIP_SENDER_MAIN, 21);
  129. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features \nPassives: Pandemic and Siphon Life.\nActives: (NONE).", GOSSIP_SENDER_MAIN, 100);
  130. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffA020F0Demonology|r Warlock.", GOSSIP_SENDER_MAIN, 22);
  131. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives:Demonic Pact, Demonic Knowledge.\nActives:Summon Felguard", GOSSIP_SENDER_MAIN, 100);
  132. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff9E0508Destruction|r Warlock.", GOSSIP_SENDER_MAIN, 23);
  133. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives:Backlash and Backdraft.\nActives: Conflagrate.", GOSSIP_SENDER_MAIN, 100);
  134. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  135. break;
  136. case CLASS_DRUID:
  137. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a druid. A druid may fulfill all roles as spell caster, melee damage dealer, healer, and tank. Druids rely on their forms for survival.", GOSSIP_SENDER_MAIN, 100);
  138. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffE6E6FABalance|r Druid.", GOSSIP_SENDER_MAIN, 25);
  139. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Dreamstate, Earth and Moon, Eclipse, Improved Faerie Fire\nActives: Moonkin Form.", GOSSIP_SENDER_MAIN, 100);
  140. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7BBF6ARestoration|r Druid.", GOSSIP_SENDER_MAIN, 26);
  141. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Nature's Bounty, Living Seed, Improved Barkskin\nActives: Tree form, Swiftmend.", GOSSIP_SENDER_MAIN, 100);
  142. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7B3F00Feral|r Druid.", GOSSIP_SENDER_MAIN, 27);
  143. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Leader of the Pack, Rend and Tear, Primal Gore\nActives: Feral Charge.", GOSSIP_SENDER_MAIN, 100);
  144. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  145. break;
  146. case CLASS_DEATH_KNIGHT:
  147. pPlayer->ADD_GOSSIP_ITEM(7, "Greetings. You are a deathknight. A deathknight resilient class of soldier that may wear one down with plagues, burst you down with the potency of their very blood or be the last one standing, frozen of course.", GOSSIP_SENDER_MAIN, 100);
  148. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cffE6E6FABlood|r Deathknight.", GOSSIP_SENDER_MAIN, 28);
  149. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Dreamstate, Earth and Moon, Eclipse, Improved Faerie Fire\nActives: Moonkin Form.", GOSSIP_SENDER_MAIN, 100);
  150. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7BBF6AFrost|r Deathknight.", GOSSIP_SENDER_MAIN, 29);
  151. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Nature's Bounty, Living Seed, Improved Barkskin\nActives: Tree form, Swiftmend.", GOSSIP_SENDER_MAIN, 100);
  152. pPlayer->ADD_GOSSIP_ITEM(3, "Click here to be a |cff7B3F00Unholy|r Ddeathknight.", GOSSIP_SENDER_MAIN, 30);
  153. pPlayer->ADD_GOSSIP_ITEM(0, "This specialization features:\nPassives: Leader of the Pack, Rend and Tear, Primal Gore\nActives: Feral Charge.", GOSSIP_SENDER_MAIN, 100);
  154. pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID());
  155. break;
  156. }
  157. return true;
  158. }
  159.  
  160. bool OnGossipSelect(Player * pPlayer, Creature * creature, uint32 sender, uint32 uiAction)
  161. {
  162. uint32 ret[3] = {31877, 35395, 20066}; //these are spellids for each class
  163. uint32 pprot[2] = {20135, 53595};// assuming you aren't a fuckass or cant read, this is pretty
  164. uint32 pholy[4] = {4987, 54155, 20216, 53503}; // obvious shit.
  165.  
  166. uint32 arcane[4] = {31583, 12043, 12503, 54490};
  167. uint32 fire[5] = {11368, 31642, 44448, 11129, 11113};
  168. uint32 frost[4] = {44549, 44545, 44572, 27619};
  169.  
  170. uint32 arms[2] = {64976, 46860};
  171. uint32 fury[3] = {23881, 16284, 46917};
  172. uint32 protection[4] = {29144, 58874, 50720, 46968}; //in case you havent noticed, some trees have the same name so I switch em up a bit
  173.  
  174. uint32 holy[3] = {64129, 15031, 47788};
  175. uint32 discipline[4] = {47515, 52800, 45244, 10060};
  176. uint32 shadow[5] = {15473, 15286, 15332, 33224};
  177.  
  178. uint32 bm[3] = {56318, 34470, 19577};
  179. uint32 marksman[3] = {19506, 34490, 53238};
  180. uint32 survival[3] = {13809, 19386, 34503};
  181.  
  182. uint32 elemental[4] = {16582, 30679, 51486, 16166};
  183. uint32 enhancement[4] = {17364, 51532, 60103, 42459};
  184. uint32 srestoration[3] = {16188, 30869, 51730};
  185.  
  186. uint32 affliction[2] = {58435, 63108};
  187. uint32 demonology[3] = {47240, 35693, 30146};
  188. uint32 destruction[3] = {34939, 47260, 17962};
  189.  
  190. uint32 balance[5] = {60433, 33956, 48525, 33602, 24858};
  191. uint32 restoration[5] = {63411, 65139, 18562, 17078, 48500};
  192. uint32 feral[4] = {17007, 51269, 63503, 49377};
  193.  
  194. uint32 assassin[6] = {31209, 58426, 51636, 14195, 1329, 51626};
  195. uint32 combat[6] = {13875, 51674, 13789, 35553, 13750, 13877};
  196. uint32 subtlety[4] = {31230, 51701, 36554, 51712};
  197.  
  198. uint32 dkfrost[6] = {31209, 58426, 51636, 14195, 1329, 51626};
  199. uint32 dkblood[6] = {13875, 51674, 13789, 35553, 13750, 13877};
  200. uint32 dkunholy[4] = {31230, 51701, 36554, 51712};
  201.  
  202. uint32 rweaponspec[3] = {13807, 13964, 13803}; //daggers, swords, maces in that order
  203. uint32 wweaponspec[3] = {12785, 12815, 12704}; //axe, sword, mace in that order
  204.  
  205. if (sender == GOSSIP_SENDER_MAIN, 100)
  206. {
  207. pPlayer->PlayerTalkClass->ClearMenus();
  208.  
  209. switch(uiAction)
  210. {
  211. case 100:
  212. OnGossipHello(pPlayer, creature);
  213. break;
  214.  
  215. // Paladin
  216. case 0: //Retrubition
  217. if (HasSpec(pPlayer, 1403))
  218. {
  219. for (uint32 i = 0; i < 3; i++)
  220. {
  221. pPlayer->learnSpell(ret[i], false);
  222. }
  223.  
  224. for (uint32 j = 0; j < 2; j++)
  225. {
  226. pPlayer->removeSpell(pprot[j], false, false);
  227. }
  228.  
  229. for (uint32 k = 0; k < 4; k++)
  230. {
  231. pPlayer->removeSpell(pholy[k], false, false);
  232. }
  233. pPlayer->PlayDirectSound(3337);
  234. pPlayer->CastSpell(pPlayer, 47292);
  235. }
  236. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Retribution Tree!");
  237. break;
  238. case 1: //Holy
  239. if (HasSpec(pPlayer, 1432))
  240. {
  241. for (uint32 i = 0; i < 3; i++)
  242. {
  243. pPlayer->removeSpell(ret[i], false, false);
  244. }
  245.  
  246. for (uint32 j = 0; j < 2; j++)
  247. {
  248. pPlayer->removeSpell(pprot[j], false, false);
  249. }
  250.  
  251. for (uint32 k = 0; k < 4; k++)
  252. {
  253. pPlayer->learnSpell(pholy[k], false);
  254. }
  255. pPlayer->PlayDirectSound(3337);
  256. pPlayer->CastSpell(pPlayer, 47292);
  257. }
  258. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Holy Tree!");
  259. break;
  260. case 2: //Protection
  261. if (HasSpec(pPlayer, 1442))
  262. {
  263. for (uint32 i = 0; i < 3; i++)
  264. {
  265. pPlayer->removeSpell(ret[i], false, false);
  266. }
  267.  
  268. for (uint32 j = 0; j < 2; j++)
  269. {
  270. pPlayer->learnSpell(pprot[j], false);
  271. }
  272.  
  273. for (uint32 k = 0; k < 4; k++)
  274. {
  275. pPlayer->removeSpell(pholy[k], false, false);
  276. }
  277. pPlayer->PlayDirectSound(3337);
  278. pPlayer->CastSpell(pPlayer, 47292);
  279. }
  280. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Protection Tree!");
  281. break;
  282.  
  283. // Mage
  284. case 3: // Arcane
  285. if (HasSpec(pPlayer, 74))
  286. {
  287. for (uint32 i = 0; i < 4; i++)
  288. {
  289. pPlayer->learnSpell(arcane[i], false);
  290. pPlayer->removeSpell(frost[i], false, false);
  291. }
  292.  
  293. for (uint32 k = 0; k < 5; k++)
  294. {
  295. pPlayer->removeSpell(fire[k], false, false);
  296. }
  297. pPlayer->PlayDirectSound(3337);
  298. pPlayer->CastSpell(pPlayer, 47292);
  299. }
  300. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Arcane Tree!");
  301. break;
  302.  
  303. case 4: // Fire
  304. if (HasSpec(pPlayer, 27))
  305. {
  306. for (uint32 i = 0; i < 4; i++)
  307. {
  308. pPlayer->removeSpell(arcane[i], false, false);
  309. pPlayer->removeSpell(frost[i], false, false);
  310. }
  311.  
  312. for (uint32 k = 0; k < 5; k++)
  313. {
  314. pPlayer->learnSpell(fire[k], false);
  315. }
  316. pPlayer->PlayDirectSound(3337);
  317. pPlayer->CastSpell(pPlayer, 47292);
  318. }
  319. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Fire Tree!");
  320. break;
  321.  
  322. case 5: // Frost
  323. if (HasSpec(pPlayer, 38))
  324. {
  325. for (uint32 i = 0; i < 4; i++)
  326. {
  327. pPlayer->removeSpell(arcane[i], false, false);
  328. pPlayer->learnSpell(frost[i], false);
  329. }
  330.  
  331. for (uint32 k = 0; k < 5; k++)
  332. {
  333. pPlayer->removeSpell(fire[k], false, false);
  334. }
  335. pPlayer->PlayDirectSound(3337);
  336. pPlayer->CastSpell(pPlayer, 47292);
  337. }
  338. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Frost Tree!");
  339. break;
  340.  
  341. // Warrior
  342.  
  343.  
  344. case 7: // Fury
  345. if (HasSpec(pPlayer, 2250))
  346. {
  347. for (uint32 i = 0; i < 2; i++)
  348. {
  349.  
  350. pPlayer->removeSpell(arms[i], false, false);
  351.  
  352. }
  353.  
  354. for (uint32 j = 0; j < 3; j++)
  355. {
  356. pPlayer->learnSpell(fury[j], false);
  357. }
  358.  
  359. for (uint32 k = 0; k < 4; k++)
  360. {
  361. pPlayer->removeSpell(protection[k], false, false);
  362. }
  363. pPlayer->PlayDirectSound(3337);
  364. pPlayer->CastSpell(pPlayer, 47292);
  365. }
  366. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Fury Tree!");
  367. break;
  368. case 8: // Protection
  369. if (HasSpec(pPlayer, 142))
  370. {
  371. for (uint32 i = 0; i < 2; i++)
  372. {
  373.  
  374. pPlayer->removeSpell(arms[i], false, false);
  375.  
  376. }
  377.  
  378. for (uint32 j = 0; j < 3; j++)
  379. {
  380. pPlayer->removeSpell(fury[j], false, false);
  381. }
  382.  
  383. for (uint32 k = 0; k < 4; k++)
  384. {
  385. pPlayer->learnSpell(protection[k], false);
  386. }
  387. pPlayer->PlayDirectSound(3337);
  388. pPlayer->CastSpell(pPlayer, 47292);
  389. }
  390. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Protection Tree!");
  391. break;
  392.  
  393. // Priest
  394. case 9: // Holy
  395. if (HasSpec(pPlayer, 410))
  396. {
  397. for (uint32 i = 0; i < 3; i++)
  398. {
  399. pPlayer->learnSpell(holy[i], false);
  400. }
  401.  
  402. for (uint32 j = 0; j < 4; j++)
  403. {
  404. pPlayer->removeSpell(discipline[j], false, false);
  405. }
  406.  
  407. for (uint32 k = 0; k < 5; k++)
  408. {
  409. pPlayer->removeSpell(shadow[k], false, false);
  410. }
  411. pPlayer->PlayDirectSound(3337);
  412. pPlayer->CastSpell(pPlayer, 47292);
  413. }
  414. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Holy Tree!");
  415. break;
  416. case 10: // Discipline
  417. if (HasSpec(pPlayer, 342))
  418. {
  419. for (uint32 i = 0; i < 3; i++)
  420. {
  421. pPlayer->removeSpell(holy[i], false, false);
  422. }
  423.  
  424. for (uint32 j = 0; j < 4; j++)
  425. {
  426. pPlayer->learnSpell(discipline[j], false);
  427. }
  428.  
  429. for (uint32 k = 0; k < 5; k++)
  430. {
  431. pPlayer->removeSpell(shadow[k], false, false);
  432. }
  433. pPlayer->PlayDirectSound(3337);
  434. pPlayer->CastSpell(pPlayer, 47292);
  435. }
  436. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Discipline Tree!");
  437. break;
  438. case 11: // Shadow
  439. if (HasSpec(pPlayer, 465))
  440. {
  441. for (uint32 i = 0; i < 3; i++)
  442. {
  443. pPlayer->removeSpell(holy[i], false, false);
  444. }
  445.  
  446. for (uint32 j = 0; j < 4; j++)
  447. {
  448. pPlayer->removeSpell(discipline[j], false, false);
  449. }
  450.  
  451. for (uint32 k = 0; k < 5; k++)
  452. {
  453. pPlayer->learnSpell(shadow[k], false);
  454. }
  455. pPlayer->PlayDirectSound(3337);
  456. pPlayer->CastSpell(pPlayer, 47292);
  457. }
  458. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Shadow Tree!");
  459. break;
  460.  
  461. // Hunter
  462. case 12: // Marksman
  463. if (HasSpec(pPlayer, 1341))
  464. {
  465. for (uint32 i = 0; i < 3; i++)
  466. {
  467. pPlayer->learnSpell(marksman[i], false);
  468. pPlayer->removeSpell(survival[i], false, false);
  469. pPlayer->removeSpell(bm[i], false, false);
  470. }
  471. pPlayer->PlayDirectSound(3337);
  472. pPlayer->CastSpell(pPlayer, 47292);
  473. }
  474. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Marksman Tree!");
  475. break;
  476. case 13: // Survival
  477. if (HasSpec(pPlayer, 1623))
  478. {
  479. for (uint32 i = 0; i < 3; i++)
  480. {
  481. pPlayer->learnSpell(survival[i], false);
  482. pPlayer->removeSpell(bm[i], false, false);
  483. pPlayer->removeSpell(marksman[i], false, false);
  484. }
  485. pPlayer->PlayDirectSound(3337);
  486. pPlayer->CastSpell(pPlayer, 47292);
  487. }
  488. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Survival Tree!");
  489. break;
  490. case 14: // Beastmaster
  491. if (HasSpec(pPlayer, 1382))
  492. {
  493. for (uint32 i = 0; i < 3; i++)
  494. {
  495. pPlayer->learnSpell(bm[i], false);
  496. pPlayer->removeSpell(marksman[i], false, false);
  497. pPlayer->removeSpell(survival[i], false, false);
  498. }
  499. pPlayer->PlayDirectSound(3337);
  500. pPlayer->CastSpell(pPlayer, 47292);
  501. }
  502. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Beastmastery Tree!");
  503. break;
  504.  
  505. // Rogue
  506. case 15: //Sub
  507. if (HasSpec(pPlayer, 2244))
  508. {
  509. for (uint32 i = 0; i < 4; i++)
  510. {
  511. pPlayer->learnSpell(subtlety[i], false);
  512. }
  513.  
  514. for (uint32 j = 0; j < 6; j++)
  515. {
  516. pPlayer->removeSpell(combat[j], false, false);
  517. pPlayer->removeSpell(assassin[j], false, false);
  518. }
  519. pPlayer->PlayDirectSound(3337);
  520. pPlayer->CastSpell(pPlayer, 47292);
  521. }
  522. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Subtlety Tree!");
  523. break;
  524. case 16: // Assassination
  525. if (HasSpec(pPlayer, 276))
  526. {
  527. for (uint32 i = 0; i < 4; i++)
  528. {
  529. pPlayer->removeSpell(subtlety[i], false);
  530. }
  531.  
  532. for (uint32 j = 0; j < 6; j++)
  533. {
  534. pPlayer->removeSpell(combat[j], false, false);
  535. pPlayer->learnSpell(assassin[j], false);
  536. }
  537. pPlayer->PlayDirectSound(3337);
  538. pPlayer->CastSpell(pPlayer, 47292);
  539. }
  540. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Assassination Tree!");
  541. break;
  542.  
  543. // Shaman
  544. case 18: //Restoration
  545. if (HasSpec(pPlayer, 586))
  546. {
  547. for (uint32 i = 0; i < 3; i++)
  548. {
  549. pPlayer->learnSpell(srestoration[i], false);
  550. }
  551.  
  552. for (uint32 j = 0; j < 4; j++)
  553. {
  554. pPlayer->removeSpell(enhancement[j], false, false);
  555. pPlayer->removeSpell(elemental[j], false, false);
  556. }
  557. pPlayer->PlayDirectSound(3337);
  558. pPlayer->CastSpell(pPlayer, 47292);
  559. }
  560. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Restoration Tree!");
  561. break;
  562. case 19: // Enhancement
  563. if (HasSpec(pPlayer, 610))
  564. {
  565. for (uint32 i = 0; i < 3; i++)
  566. {
  567. pPlayer->removeSpell(srestoration[i], false, false);
  568. }
  569.  
  570. for (uint32 j = 0; j < 4; j++)
  571. {
  572. pPlayer->learnSpell(enhancement[j], false);
  573. pPlayer->removeSpell(elemental[j], false, false);
  574. }
  575. pPlayer->PlayDirectSound(3337);
  576. pPlayer->CastSpell(pPlayer, 47292);
  577. }
  578. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Enhancement Tree!");
  579. break;
  580. case 20: // Elemental
  581. if (HasSpec(pPlayer, 564))
  582. {
  583. for (uint32 i = 0; i < 3; i++)
  584. {
  585. pPlayer->removeSpell(srestoration[i], false, false);
  586. }
  587.  
  588. for (uint32 j = 0; j < 4; j++)
  589. {
  590. pPlayer->removeSpell(enhancement[j], false, false);
  591. pPlayer->learnSpell(elemental[j], false);
  592. }
  593. pPlayer->PlayDirectSound(3337);
  594. pPlayer->CastSpell(pPlayer, 47292);
  595. }
  596. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Elemental Tree!");
  597. break;
  598.  
  599. // Warlock
  600. case 21: //Affliction
  601. if (HasSpec(pPlayer, 1284))
  602. {
  603. for (uint32 i = 0; i < 2; i++)
  604. {
  605. pPlayer->learnSpell(affliction[i], false);
  606. }
  607.  
  608. for (uint32 j = 0; j < 3; j++)
  609. {
  610. pPlayer->removeSpell(demonology[j], false, false);
  611. pPlayer->removeSpell(destruction[j], false, false);
  612. }
  613. pPlayer->PlayDirectSound(3337);
  614. pPlayer->CastSpell(pPlayer, 47292);
  615. }
  616. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Affliction Tree!");
  617. break;
  618. case 22: // Demonology
  619. if (HasSpec(pPlayer, 1221))
  620. {
  621. for (uint32 i = 0; i < 2; i++)
  622. {
  623. pPlayer->removeSpell(affliction[i], false, false);
  624. }
  625.  
  626. for (uint32 j = 0; j < 3; j++)
  627. {
  628. pPlayer->learnSpell(demonology[j], false);
  629. pPlayer->removeSpell(destruction[j], false, false);
  630. }
  631. pPlayer->PlayDirectSound(3337);
  632. pPlayer->CastSpell(pPlayer, 47292);
  633. }
  634. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Demonology Tree!");
  635. break;
  636. case 23: //Destruction
  637. if (HasSpec(pPlayer, 944))
  638. {
  639. for (uint32 i = 0; i < 2; i++)
  640. {
  641. pPlayer->removeSpell(affliction[i], false, false);
  642. }
  643.  
  644. for (uint32 j = 0; j < 3; j++)
  645. {
  646. pPlayer->removeSpell(demonology[j], false, false);
  647. pPlayer->learnSpell(destruction[j], false);
  648. }
  649. pPlayer->PlayDirectSound(3337);
  650. pPlayer->CastSpell(pPlayer, 47292);
  651. }
  652. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Destruction Tree!");
  653. break;
  654.  
  655. // Druid
  656. case 25: // Balance
  657. if (HasSpec(pPlayer, 783))
  658. {
  659. for (uint32 i = 0; i < 5; i++)
  660. {
  661. pPlayer->learnSpell(balance[i], false);
  662. pPlayer->removeSpell(restoration[i], false, false);
  663. }
  664.  
  665. for (uint32 j = 0; j < 4; j++)
  666. {
  667. pPlayer->removeSpell(feral[j], false, false);
  668. }
  669. pPlayer->PlayDirectSound(3337);
  670. pPlayer->CastSpell(pPlayer, 47292);
  671. }
  672. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Balance Tree!");
  673. break;
  674. case 26: //Restoration
  675. if (HasSpec(pPlayer, 824))
  676. {
  677. for (uint32 i = 0; i < 5; i++)
  678. {
  679. pPlayer->removeSpell(balance[i], false, false);
  680. pPlayer->learnSpell(restoration[i], false);
  681. }
  682.  
  683. for (uint32 j = 0; j < 4; j++)
  684. {
  685. pPlayer->removeSpell(feral[j], false, false);
  686. }
  687. pPlayer->PlayDirectSound(3337);
  688. pPlayer->CastSpell(pPlayer, 47292);
  689. }
  690. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Restoration Tree!");
  691. break;
  692.  
  693. case 27: //Feral
  694. if (HasSpec(pPlayer, 801))
  695. {
  696. for (uint32 i = 0; i < 5; i++)
  697. {
  698. pPlayer->removeSpell(balance[i], false, false);
  699. pPlayer->removeSpell(restoration[i], false, false);
  700. }
  701.  
  702. for (uint32 j = 0; j < 4; j++)
  703. {
  704. pPlayer->learnSpell(feral[j], false);
  705. }
  706. pPlayer->PlayDirectSound(3337);
  707. pPlayer->CastSpell(pPlayer, 47292);
  708. }
  709. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Feral Tree!");
  710. break;
  711.  
  712. case 28: //Blood
  713. if (HasSpec(pPlayer, 1945))
  714. {
  715. for (uint32 i = 0; i < 6; i++)
  716. {
  717. pPlayer->removeSpell(dkfrost[i], false, false);
  718. pPlayer->learnSpell(dkblood[i], false);
  719. }
  720.  
  721. for (uint32 j = 0; j < 4; j++)
  722. {
  723. pPlayer->removeSpell(dkunholy[j], false, false);
  724. }
  725. pPlayer->PlayDirectSound(3337);
  726. pPlayer->CastSpell(pPlayer, 47292);
  727. }
  728. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Feral Tree!");
  729. break;
  730.  
  731. case 29: //Frost
  732. if (HasSpec(pPlayer, 2020))
  733. {
  734. for (uint32 i = 0; i < 6; i++)
  735. {
  736. pPlayer->learnSpell(dkfrost[i], false);
  737. pPlayer->removeSpell(dkblood[i], false, false);
  738. }
  739.  
  740. for (uint32 j = 0; j < 4; j++)
  741. {
  742. pPlayer->removeSpell(dkunholy[j], false, false);
  743. }
  744. pPlayer->PlayDirectSound(3337);
  745. pPlayer->CastSpell(pPlayer, 47292);
  746. }
  747. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Feral Tree!");
  748. break;
  749.  
  750. case 30: //Unholy
  751. if (HasSpec(pPlayer, 2082))
  752. {
  753. for (uint32 i = 0; i < 6; i++)
  754. {
  755. pPlayer->removeSpell(dkfrost[i], false, false);
  756. pPlayer->removeSpell(dkblood[i], false, false);
  757. }
  758.  
  759. for (uint32 j = 0; j < 4; j++)
  760. {
  761. pPlayer->learnSpell(dkunholy[j], false);
  762. }
  763. pPlayer->PlayDirectSound(3337);
  764. pPlayer->CastSpell(pPlayer, 47292);
  765. }
  766. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Feral Tree!");
  767. break;
  768.  
  769.  
  770.  
  771. case 600:
  772. pPlayer->ADD_GOSSIP_ITEM(0, "You may choose a weapon specialization talent.", GOSSIP_SENDER_MAIN, 100);
  773. pPlayer->ADD_GOSSIP_ITEM(5, "Poleaxe Specialization: While wielding an Axe or Poleaxe you recieve +5% critical strike chance.", GOSSIP_SENDER_MAIN, 999);
  774. pPlayer->ADD_GOSSIP_ITEM(5, "Mace Specialization: While wielding a Mace you recieve +15% Armor Penetration.", GOSSIP_SENDER_MAIN, 998);
  775. pPlayer->ADD_GOSSIP_ITEM(5, "Sword Specialization: While wielding a sword you have a 10% chance to strike again.", GOSSIP_SENDER_MAIN, 997);
  776. pPlayer->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID());
  777. break;
  778.  
  779. case 999:
  780. if (HasSpec(pPlayer, 124))
  781. {
  782. pPlayer->learnSpell(wweaponspec[0], false);
  783. for (uint32 i = 0; i < 2; i++)
  784. {
  785.  
  786. pPlayer->learnSpell(arms[i], false);
  787.  
  788. }
  789.  
  790. for (uint32 i = 0; i < 3; i++)
  791. {
  792. pPlayer->removeSpell(fury[i], false, false);
  793. }
  794.  
  795. for (uint32 i = 0; i < 4; i++)
  796. {
  797. pPlayer->removeSpell(protection[i], false, false);
  798. }
  799. pPlayer->PlayDirectSound(3337);
  800. pPlayer->CastSpell(pPlayer, 47292);
  801. }
  802. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Arms Tree!");
  803. break;
  804.  
  805. case 998:
  806. if (HasSpec(pPlayer, 124))
  807. {
  808. pPlayer->learnSpell(wweaponspec[2], false);
  809. for (uint32 i = 0; i < 2; i++)
  810. {
  811.  
  812. pPlayer->learnSpell(arms[i], false);
  813.  
  814. }
  815.  
  816. for (uint32 i = 0; i < 3; i++)
  817. {
  818. pPlayer->removeSpell(fury[i], false, false);
  819. }
  820.  
  821. for (uint32 i = 0; i < 4; i++)
  822. {
  823. pPlayer->removeSpell(protection[i], false, false);
  824. }
  825. pPlayer->PlayDirectSound(3337);
  826. pPlayer->CastSpell(pPlayer, 47292);
  827. }
  828. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Arms Tree!");
  829. break;
  830.  
  831.  
  832. case 997:
  833. if (HasSpec(pPlayer, 124))
  834. {
  835. pPlayer->learnSpell(wweaponspec[1], false);
  836. for (uint32 i = 0; i < 2; i++)
  837. {
  838.  
  839. pPlayer->learnSpell(arms[i], false);
  840.  
  841. }
  842.  
  843. for (uint32 i = 0; i < 3; i++)
  844. {
  845. pPlayer->removeSpell(fury[i], false, false);
  846. }
  847.  
  848. for (uint32 i = 0; i < 4; i++)
  849. {
  850. pPlayer->removeSpell(protection[i], false, false);
  851. }
  852. pPlayer->PlayDirectSound(3337);
  853. pPlayer->CastSpell(pPlayer, 47292);
  854. }
  855. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Arms Tree!");
  856. break;
  857.  
  858. case 1700:
  859. pPlayer->ADD_GOSSIP_ITEM(0, "You may choose a weapon specialization talent.", GOSSIP_SENDER_MAIN, 100);
  860. pPlayer->ADD_GOSSIP_ITEM(5, "Close Quarters Combat: While wielding a Dagger or Fist Weapon you recieve +5% critical strike chance.", GOSSIP_SENDER_MAIN, 996);
  861. pPlayer->ADD_GOSSIP_ITEM(5, "Mace Specialization: While wielding a Mace you recieve +15% Armor Penetration.", GOSSIP_SENDER_MAIN, 995);
  862. pPlayer->ADD_GOSSIP_ITEM(5, "Hack and Slash: While wielding a Sword or Axe you have a 5% chance to strike again.", GOSSIP_SENDER_MAIN, 994);
  863. pPlayer->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID());
  864. break;
  865.  
  866. case 996:
  867. if (HasSpec(pPlayer, 203))
  868. {
  869. pPlayer->learnSpell(rweaponspec[0], false);
  870. for (uint32 i = 0; i < 4; i++)
  871. {
  872. pPlayer->removeSpell(subtlety[i], false);
  873. }
  874.  
  875. for (uint32 j = 0; j < 6; j++)
  876. {
  877. pPlayer->learnSpell(combat[j], false);
  878. pPlayer->removeSpell(assassin[j], false, false);
  879. }
  880. pPlayer->PlayDirectSound(3337);
  881. pPlayer->CastSpell(pPlayer, 47292);
  882. }
  883. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Combat Tree!");
  884. break;
  885.  
  886.  
  887. case 995:
  888. if (HasSpec(pPlayer, 203))
  889. {
  890. pPlayer->learnSpell(rweaponspec[2], false);
  891. for (uint32 i = 0; i < 4; i++)
  892. {
  893. pPlayer->removeSpell(subtlety[i], false);
  894. }
  895.  
  896. for (uint32 j = 0; j < 6; j++)
  897. {
  898. pPlayer->learnSpell(combat[j], false);
  899. pPlayer->removeSpell(assassin[j], false, false);
  900. }
  901. pPlayer->PlayDirectSound(3337);
  902. pPlayer->CastSpell(pPlayer, 47292);
  903. }
  904. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Combat Tree!");
  905. break;
  906.  
  907.  
  908. case 994:
  909. if (HasSpec(pPlayer, 203))
  910. {
  911. pPlayer->learnSpell(rweaponspec[1], false);
  912. for (uint32 i = 0; i < 4; i++)
  913. {
  914. pPlayer->removeSpell(subtlety[i], false);
  915. }
  916.  
  917. for (uint32 j = 0; j < 6; j++)
  918. {
  919. pPlayer->learnSpell(combat[j], false);
  920. pPlayer->removeSpell(assassin[j], false, false);
  921. }
  922. pPlayer->PlayDirectSound(3337);
  923. pPlayer->CastSpell(pPlayer, 47292);
  924. }
  925. pPlayer->GetSession()->SendNotification("You do not have eleven (11) points in the Combat Tree!");
  926. break;
  927. }
  928. pPlayer->CLOSE_GOSSIP_MENU();
  929. }
  930. return true;
  931. }
  932. };
  933.  
  934. void AddSC_Talent_Specialization()
  935. {
  936. new Talent_Specialization();
  937. }
Advertisement
Add Comment
Please, Sign In to add comment