Fix function to retrieve current loot specialization
This commit is contained in:
parent
565ad1da6e
commit
77b30de8f7
@ -31,19 +31,14 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
T.GetLootSpec = function()
|
T.GetLootSpec = function()
|
||||||
local currentSpec = GetSpecialization()
|
|
||||||
local currentSpecName = select(2, GetSpecializationInfo(currentSpec))
|
|
||||||
local lootSpecID = GetLootSpecialization()
|
local lootSpecID = GetLootSpecialization()
|
||||||
local lootSpec = select(2, GetSpecializationInfoByID(lootSpecID))
|
local currentSpec = GetSpecialization()
|
||||||
|
local currentSpecName = currentSpec and select(2,GetSpecializationInfo(currentSpec)) or 'None'
|
||||||
|
|
||||||
-- if loot spec was manually set
|
if lootSpecID ~= 0 then
|
||||||
if lootSpec then
|
return '|cnWHITE_FONT_COLOR:Loot:|r '..select(2, GetSpecializationInfoByID(lootSpecID))..' '
|
||||||
return '|cnWHITE_FONT_COLOR:Loot:|r '..lootSpec..' '
|
|
||||||
-- otherwise use current loot spec
|
|
||||||
elseif currentSpec then
|
|
||||||
return '|cnWHITE_FONT_COLOR:Loot:|r '..currentSpecName..' '
|
|
||||||
else
|
else
|
||||||
return ''
|
return '|cnWHITE_FONT_COLOR:Loot:|r '..currentSpecName..' '
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user