|
|
|
@@ -76,27 +76,37 @@ function ns:Update()
|
|
|
|
|
local item = items[i + offset]
|
|
|
|
|
if item then
|
|
|
|
|
_G[e.."Collapse"]:Hide()
|
|
|
|
|
_G[e.."Level"]:SetText("")
|
|
|
|
|
_G[e.."Skill1NormalText"]:SetText("")
|
|
|
|
|
_G[e.."CookingNormalText"]:SetText("")
|
|
|
|
|
_G[e.."FirstAidNormalText"]:SetText("")
|
|
|
|
|
_G[e.."FishingNormalText"]:SetText("")
|
|
|
|
|
_G[e.."RidingNormalText"]:SetText("")
|
|
|
|
|
_G[e.."Name"]:SetWidth(680)
|
|
|
|
|
_G[e.."Name"]:SetPoint("TOPLEFT", 15, 0)
|
|
|
|
|
_G[e.."NameNormalText"]:SetWidth(680)
|
|
|
|
|
|
|
|
|
|
if item.kind == "header" then
|
|
|
|
|
-- character header: colored name + (class) across the row, no rank column
|
|
|
|
|
_G[e.."Name"]:SetPoint("TOPLEFT", 15, 0)
|
|
|
|
|
_G[e.."Name"]:SetWidth(420)
|
|
|
|
|
_G[e.."NameNormalText"]:SetWidth(420)
|
|
|
|
|
local locClass, engClass = DS:GetCharacterClass(item.character)
|
|
|
|
|
local className = Altoholic:GetCoAClassName(engClass) or locClass or "" -- CoA: PROPHET->Venomancer, MONK->Templar, …
|
|
|
|
|
_G[e.."NameNormalText"]:SetText( (DS:GetColoredCharacterName(item.character) or "?") .. " " .. WHITE .. "(" .. className .. ")" )
|
|
|
|
|
_G[e.."NameNormalText"]:SetText( (DS:GetColoredCharacterName(item.character) or "?") .. " " .. WHITE .. "(" .. className .. ")" )
|
|
|
|
|
_G[e.."Level"]:SetText("")
|
|
|
|
|
else
|
|
|
|
|
-- profession row: [icon] name in the Name cell (indented), rank/max in its own column
|
|
|
|
|
local iconEsc = ""
|
|
|
|
|
if item.spellID then
|
|
|
|
|
iconEsc = addon:TextureToFontstring2(addon:GetSpellIcon(item.spellID), size, size, inset, inset, inset, inset) .. " "
|
|
|
|
|
end
|
|
|
|
|
_G[e.."Name"]:SetPoint("TOPLEFT", 38, 0)
|
|
|
|
|
_G[e.."Name"]:SetWidth(200)
|
|
|
|
|
_G[e.."NameNormalText"]:SetWidth(200)
|
|
|
|
|
_G[e.."NameNormalText"]:SetText( iconEsc .. WHITE .. item.name )
|
|
|
|
|
|
|
|
|
|
local cap = (item.maxRank > 0) and item.maxRank or 450
|
|
|
|
|
_G[e.."NameNormalText"]:SetText( " " .. iconEsc .. WHITE .. item.name .. " " .. ns:GetColor(item.rank, cap) .. item.rank .. "/" .. item.maxRank .. "|r" )
|
|
|
|
|
_G[e.."Level"]:SetPoint("TOPLEFT", 250, 0)
|
|
|
|
|
_G[e.."Level"]:SetWidth(120)
|
|
|
|
|
_G[e.."Level"]:SetJustifyH("LEFT")
|
|
|
|
|
_G[e.."Level"]:SetText( ns:GetColor(item.rank, cap) .. item.rank .. " / " .. item.maxRank )
|
|
|
|
|
end
|
|
|
|
|
btn.coaItem = item
|
|
|
|
|
btn:SetID(item.viewLine or 0)
|
|
|
|
|