Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ClassSpecList = {
- [1] = { -- Warrior
- {46924, 12294, 12328}, -- Arms
- {46917, 23881, 12292}, -- Fury
- {46968, 20243, 50720} -- Protection
- },
- [2] = { -- Paladin
- {53563, 20473, 20215}, -- Holy
- {53595, 20925, 20911}, -- Prot
- {35395, 53385, 20375} -- Ret
- },
- [3] = { -- Hunter
- {53270, 34692, 19574}, -- Beast Mastery
- {53209, 19506, 19434}, -- Marksmanship
- {53301, 19386, 56344} -- Survival
- },
- [4] = { -- Rogue
- {51662, 1329, 14177}, -- Assassination
- {51690, 13750, 13877}, -- Combat
- {51713, 14183, 16511} -- Sublety
- },
- [5] = { -- Priest
- {47540, 10060, 63574}, -- Discipline
- {47788, 20711, 19236}, -- Holy
- {34914, 15473, 15286} -- Shadow
- },
- [6] = { -- CLASS_DEATH_KNIGHT
- {55050, 49016, 48982}, -- Blood
- {49184, 49143, 50887}, -- Frost
- {55090, 52143, 49194} -- Unholy
- },
- [7] = { -- CLASS_SHAMAN
- {51490, 30706, 16164}, -- Elemental
- {51533, 60103, 16268}, -- Enhancement
- {61295, 590, 591} -- Restoration
- },
- [8] = { -- CLASS_MAGE
- {44425, 12042, 54646}, -- Arcane
- {44457, 11129, 11366}, -- Fire
- {44572, 11426, 12472} -- Frost
- },
- [9] = { -- CLASS_WARLOCK
- {48181, 30108, 63108}, -- Affliction
- {59672, 47193, 19028}, -- Demonology
- {50796, 17962, 17877} -- Destruction
- },
- [11] = { -- CLASS_DRUID
- {48505, 24858, 5570}, -- Balance
- {50334, 33917, 61336}, -- Feral
- {48438, 33891, 18562} -- Restoration
- }
- }
- function Player:GetPlayerSpec()
- local class = self:GetClass()
- for tier = 1, 3 do
- for tree = 1, 3 do
- if(ClassSpecList[class][tree][tier]) then
- if(self:HasSpell(ClassSpecList[class][tree][tier])) then
- return(tree)
- end
- end
- end
- end
- -- If no spec is found (You fucked up your spec dude, go reroll..) return 0.
- -- Check for this wherever this function is used.
- return 0;
- end
- -- This is how you use it in a script
- -- player:GetPlayerSpec()
Add Comment
Please, Sign In to add comment