coa.23: correct CoA class names (PROPHET->Venomancer etc.) + fix Skills rank/max
release / release (push) Successful in 5s
release / release (push) Successful in 5s
- CoA renamed classes but UnitClass returns old tokens; added a token->name map (CoAClassColors.lua, from coa-omen) applied in the Skills header + the shared AddCharacterTooltipHeader/SetCharacterRowNameLevel helpers (fixes class names everywhere). - Skills vertical list now shows rank/max (precompute carries maxRank; was showing /0).
This commit is contained in:
@@ -338,7 +338,7 @@ function addon:OnEnable()
|
||||
-- CoA: use a Lua constant, not GetAddOnMetadata — TOC metadata is cached at game launch
|
||||
-- and does NOT refresh on /reload, so the .toc version looked stale ("still .18"). A Lua
|
||||
-- constant re-evaluates on every /reload, giving a truthful loaded-code version. Bump with the .toc.
|
||||
AltoholicFrameName:SetText("Altoholic |cFFFFFFFF3.3.002b-coa.22|r")
|
||||
AltoholicFrameName:SetText("Altoholic |cFFFFFFFF3.3.002b-coa.23|r")
|
||||
|
||||
local realm = GetRealmName()
|
||||
local player = UnitName("player")
|
||||
@@ -608,13 +608,17 @@ end
|
||||
-- Fresh alts have partial per-module data, so every field is guarded here once
|
||||
-- instead of being copy-pasted (and missed) across the frames.
|
||||
function Altoholic:AddCharacterTooltipHeader(character)
|
||||
local locClass, engClass = DS:GetCharacterClass(character)
|
||||
local className = Altoholic:GetCoAClassName(engClass) or locClass or "" -- CoA: current class name (PROPHET->Venomancer, …)
|
||||
AltoTooltip:AddDoubleLine(DS:GetColoredCharacterName(character) or "?", DS:GetColoredCharacterFaction(character) or "")
|
||||
AltoTooltip:AddLine(format("%s %s |r%s %s", L["Level"],
|
||||
GREEN..(DS:GetCharacterLevel(character) or 0), DS:GetCharacterRace(character) or "", DS:GetCharacterClass(character) or ""), 1, 1, 1)
|
||||
GREEN..(DS:GetCharacterLevel(character) or 0), DS:GetCharacterRace(character) or "", className), 1, 1, 1)
|
||||
end
|
||||
|
||||
function Altoholic:SetCharacterRowNameLevel(entry, i, icon, character)
|
||||
_G[entry..i.."NameNormalText"]:SetText(icon .. format("%s (%s)", DS:GetColoredCharacterName(character) or "?", DS:GetCharacterClass(character) or ""))
|
||||
local locClass, engClass = DS:GetCharacterClass(character)
|
||||
local className = Altoholic:GetCoAClassName(engClass) or locClass or "" -- CoA: current class name
|
||||
_G[entry..i.."NameNormalText"]:SetText(icon .. format("%s (%s)", DS:GetColoredCharacterName(character) or "?", className))
|
||||
_G[entry..i.."Level"]:SetText(GREEN .. (DS:GetCharacterLevel(character) or 0))
|
||||
end
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
## Author: Thaoky, Telkar-RG
|
||||
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
|
||||
## Version: 3.3.002b-coa.22
|
||||
## Version: 3.3.002b-coa.23
|
||||
## X-Category: Inventory, Tradeskill, Mail
|
||||
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
|
||||
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
|
||||
|
||||
@@ -98,6 +98,7 @@ local function AddRealm(AccountName, RealmName)
|
||||
professions[#professions + 1] = {
|
||||
name = p.name,
|
||||
rank = p.rank or 0,
|
||||
maxRank = p.maxRank or 0, -- CoA: needed for the "rank/max" display in the vertical Skills list
|
||||
spellID = DataStore:GetProfessionSpellID(p.name),
|
||||
}
|
||||
end
|
||||
|
||||
@@ -115,3 +115,23 @@ function Alto:GetCoAClassIcon(token)
|
||||
if not tc then return end
|
||||
return COA_CLASS_ICON_TEXTURE, tc[1], tc[2], tc[3], tc[4]
|
||||
end
|
||||
|
||||
-- CoA renamed its classes, but UnitClass()/DataStore still return the OLD tokens
|
||||
-- (PROPHET, MONK, …). Map them to the current display names. Source: coa-omen/README-CoA.md.
|
||||
-- Tokens not listed here keep their normal localized name (returns nil).
|
||||
local COA_CLASS_NAMES = {
|
||||
HERO = "Hero", BARBARIAN = "Barbarian", WITCHDOCTOR = "Witch Doctor",
|
||||
DEMONHUNTER = "Felsworn", WITCHHUNTER = "Witch Hunter", STORMBRINGER = "Stormbringer",
|
||||
FLESHWARDEN = "Knight of Xoroth", GUARDIAN = "Guardian", MONK = "Templar",
|
||||
SONOFARUGAL = "Bloodmage", RANGER = "Ranger", CHRONOMANCER = "Chronomancer",
|
||||
NECROMANCER = "Necromancer", PYROMANCER = "Pyromancer", CULTIST = "Cultist",
|
||||
STARCALLER = "Starcaller", SUNCLERIC = "Sun Cleric", TINKER = "Tinker",
|
||||
PROPHET = "Venomancer", REAPER = "Reaper", WILDWALKER = "Primalist",
|
||||
SPIRITMAGE = "Runemaster",
|
||||
}
|
||||
|
||||
-- Current CoA display name for a class token, or nil if unmapped (caller falls back).
|
||||
function Alto:GetCoAClassName(token)
|
||||
if type(token) ~= "string" then return end
|
||||
return COA_CLASS_NAMES[token]
|
||||
end
|
||||
|
||||
@@ -87,8 +87,9 @@ function ns:Update()
|
||||
_G[e.."NameNormalText"]:SetWidth(680)
|
||||
|
||||
if item.kind == "header" then
|
||||
local _, class = DS:GetCharacterClass(item.character)
|
||||
_G[e.."NameNormalText"]:SetText( (DS:GetColoredCharacterName(item.character) or "?") .. " " .. WHITE .. "(" .. (class or "") .. ")" )
|
||||
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 .. ")" )
|
||||
else
|
||||
local iconEsc = ""
|
||||
if item.spellID then
|
||||
|
||||
Reference in New Issue
Block a user