use GetSpellInfo to get the stance names

This commit is contained in:
Hendrik Leppkes
2008-03-27 10:18:15 +00:00
parent ea733bdad1
commit 8e97e69b42
+29 -20
View File
@@ -145,26 +145,35 @@ function module:GetStateOptionsTable()
end end
-- specifiy the available stances for each class -- specifiy the available stances for each class
module.DefaultStanceMap = { module.DefaultStanceMap = setmetatable({}, { __index = function(t,k)
WARRIOR = { local newT = nil
{ id = "battle", name = "Battle Stance", index = 1}, if k == "WARRIOR" then
{ id = "def", name = "Defensive Stance", index = 2 }, newT = {
{ id = "berserker", name = "Berserker Stance", index = 3 }, { id = "battle", name = GetSpellInfo(2457), index = 1},
}, { id = "def", name = GetSpellInfo(71), index = 2 },
DRUID = { { id = "berserker", name = GetSpellInfo(2458), index = 3 },
{ id = "bear", name = "Bear Form", index = 3 }, }
{ id = "cat", name = "Cat Form", index = 1 }, elseif k == "DRUID" then
-- prowl is virtual, no real stance newT = {
{ id = "prowl", name = "Cat Form (Prowl)", index = false}, { id = "bear", name = GetSpellInfo(5487), index = 3 },
{ id = "moonkintree", name = "Moonkin/Tree of Life", index = 2 }, { id = "cat", name = GetSpellInfo(768), index = 1 },
}, -- prowl is virtual, no real stance
ROGUE = { { id = "prowl", name = ("%s (%s)"):format((GetSpellInfo(768)), (GetSpellInfo(5215))), index = false},
{ id = "stealth", name = "Stealth", index = 1 }, { id = "moonkintree", name = ("%s/%s"):format((GetSpellInfo(24858)), (GetSpellInfo(33891))), index = 2 },
}, }
PRIEST = { --shadowform gets a position override because it doesnt have a real stance position .. and priests dont have other stances =) elseif k == "ROGUE" then
{ id = "shadowform", name = "Shadowform", index = 1 }, newT = {
} { id = "stealth", name = GetSpellInfo(1784), index = 1 },
} }
elseif k == "PRIEST" then
newT = {
{ id = "shadowform", name = "Shadowform", index = 1 },
}
end
rawset(t, k, newT)
return newT
end})
local searchFunc = function(h, n) return (h.match == n or h.match2 == n or h.id == n) end local searchFunc = function(h, n) return (h.match == n or h.match2 == n or h.id == n) end
function module:CreateStanceMap() function module:CreateStanceMap()