Compare commits

..

2 Commits

Author SHA1 Message Date
florian.berthold 11c47a86db coa.7: guard Skills tab summary against unscanned skill ranks
release / release (push) Successful in 5s
GetColor() did floor(rank/..) with no nil-guard and riding did 'field >= 300';
skillRank1/2/cooking/firstaid/fishing/riding are nil for chars DataStore_Characters
hasn't scanned. GetColor now defaults rank to 0 and each field falls back to 0.
2026-05-29 15:22:21 +02:00
florian.berthold 86e5b3485f coa.6: guard AccountSharing realm/name format (last straggler)
release / release (push) Successful in 5s
2026-05-29 10:44:59 +02:00
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
## Author: Thaoky, Telkar-RG ## Author: Thaoky, Telkar-RG
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at ## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
## Version: 3.3.002b-coa.5 ## Version: 3.3.002b-coa.7
## X-Category: Inventory, Tradeskill, Mail ## X-Category: Inventory, Tradeskill, Mail
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU ## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx ## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
+1 -1
View File
@@ -279,7 +279,7 @@ local ContentScrollFrame_Desc = {
[CHARACTER_HEADER_LINE] = { [CHARACTER_HEADER_LINE] = {
GetText = function(self, line) GetText = function(self, line)
local _, realm, name = strsplit(".", line.key) local _, realm, name = strsplit(".", line.key)
return format("%s|r / %s", WHITE..realm, DataStore:GetColoredCharacterName(line.key)) return format("%s|r / %s", WHITE..realm, DataStore:GetColoredCharacterName(line.key) or "?")
end, end,
GetOffset = function(self, line) GetOffset = function(self, line)
return 20 return 20
+7 -6
View File
@@ -119,7 +119,7 @@ function ns:Update()
else else
icon = "" icon = ""
end end
field = Characters:GetField(line, "skillRank1") field = Characters:GetField(line, "skillRank1") or 0
_G[entry..i.."Skill1NormalText"]:SetText(icon .. ns:GetColor(field) .. field) _G[entry..i.."Skill1NormalText"]:SetText(icon .. ns:GetColor(field) .. field)
-- profession 2 -- profession 2
@@ -130,29 +130,29 @@ function ns:Update()
else else
icon = "" icon = ""
end end
field = Characters:GetField(line, "skillRank2") field = Characters:GetField(line, "skillRank2") or 0
_G[entry..i.."Skill2NormalText"]:SetText(icon .. ns:GetColor(field) .. field) _G[entry..i.."Skill2NormalText"]:SetText(icon .. ns:GetColor(field) .. field)
-- cooking -- cooking
-- icon = addon:TextureToFontstring(addon:GetSpellIcon(2550), size, size) .. " " -- icon = addon:TextureToFontstring(addon:GetSpellIcon(2550), size, size) .. " "
icon = addon:TextureToFontstring2(addon:GetSpellIcon(2550), size, size, inset, inset, inset, inset) .. " " icon = addon:TextureToFontstring2(addon:GetSpellIcon(2550), size, size, inset, inset, inset, inset) .. " "
field = Characters:GetField(line, "cooking") field = Characters:GetField(line, "cooking") or 0
_G[entry..i.."CookingNormalText"]:SetText(icon .. ns:GetColor(field) .. field) _G[entry..i.."CookingNormalText"]:SetText(icon .. ns:GetColor(field) .. field)
-- first aid -- first aid
-- icon = addon:TextureToFontstring(addon:GetSpellIcon(3273), size, size) .. " " -- icon = addon:TextureToFontstring(addon:GetSpellIcon(3273), size, size) .. " "
icon = addon:TextureToFontstring2(addon:GetSpellIcon(3273), size, size, inset, inset, inset, inset) .. " " icon = addon:TextureToFontstring2(addon:GetSpellIcon(3273), size, size, inset, inset, inset, inset) .. " "
field = Characters:GetField(line, "firstaid") field = Characters:GetField(line, "firstaid") or 0
_G[entry..i.."FirstAidNormalText"]:SetText(icon .. ns:GetColor(field) .. field) _G[entry..i.."FirstAidNormalText"]:SetText(icon .. ns:GetColor(field) .. field)
-- fishing -- fishing
-- icon = addon:TextureToFontstring(addon:GetSpellIcon(7733), size, size) .. " " -- icon = addon:TextureToFontstring(addon:GetSpellIcon(7733), size, size) .. " "
icon = addon:TextureToFontstring2(addon:GetSpellIcon(7733), size, size, inset, inset, inset, inset) .. " " icon = addon:TextureToFontstring2(addon:GetSpellIcon(7733), size, size, inset, inset, inset, inset) .. " "
field = Characters:GetField(line, "fishing") field = Characters:GetField(line, "fishing") or 0
_G[entry..i.."FishingNormalText"]:SetText(icon .. ns:GetColor(field) .. field) _G[entry..i.."FishingNormalText"]:SetText(icon .. ns:GetColor(field) .. field)
-- riding -- riding
field = Characters:GetField(line, "riding") field = Characters:GetField(line, "riding") or 0
if field >= 300 then if field >= 300 then
-- icon = addon:TextureToFontstring("Interface\\Icons\\Ability_Mount_Gryphon_01", size, size) .. " " -- icon = addon:TextureToFontstring("Interface\\Icons\\Ability_Mount_Gryphon_01", size, size) .. " "
icon = addon:TextureToFontstring2("Interface\\Icons\\ability_mount_drake_bronze", size, size, inset, inset, inset, inset) icon = addon:TextureToFontstring2("Interface\\Icons\\ability_mount_drake_bronze", size, size, inset, inset, inset, inset)
@@ -400,6 +400,7 @@ end
local skillColors = { RECIPE_GREY, RED, ORANGE, YELLOW, GREEN } local skillColors = { RECIPE_GREY, RED, ORANGE, YELLOW, GREEN }
function ns:GetColor(rank, skillCap) function ns:GetColor(rank, skillCap)
rank = rank or 0 -- CoA: skill fields are nil for chars DataStore_Characters hasn't scanned
skillCap = skillCap or 450 skillCap = skillCap or 450
return skillColors[ floor(rank / (skillCap/4)) + 1 ] return skillColors[ floor(rank / (skillCap/4)) + 1 ]
end end
+2
View File
@@ -5,6 +5,8 @@ Altoholic: modified development for WotLK
Ported for the Ascension CoA (Vol'jin) 3.3.5a client by the Exiles guild. Released as `*-coa.N` tags via Gitea Actions; see `Exiles/coa-altoholic`. Ported for the Ascension CoA (Vol'jin) 3.3.5a client by the Exiles guild. Released as `*-coa.N` tags via Gitea Actions; see `Exiles/coa-altoholic`.
- **3.3.002b-coa.7** — Skills tab: `GetColor()` now nil-safe and the per-skill rank fields (`skillRank1/2`, `cooking`, `firstaid`, `fishing`, `riding`) default to `0` — they're nil for chars `DataStore_Characters` hasn't scanned, which crashed the Skills summary (`floor(rank/…)` arithmetic and the `>= 300` riding check).
- **3.3.002b-coa.6** — Final straggler: guarded `AccountSharing.lua` realm/name line (name getter was the last `format` arg, so a no-value collapsed it to a format error). Concludes the frame sweep.
- **3.3.002b-coa.5** — Refactor + completeness pass: - **3.3.002b-coa.5** — Refactor + completeness pass:
- Extracted the duplicated character header/row blocks into `Altoholic:AddCharacterTooltipHeader()` and `Altoholic:SetCharacterRowNameLevel()` — the nil-guards now live in one place instead of being copy-pasted across frames. - Extracted the duplicated character header/row blocks into `Altoholic:AddCharacterTooltipHeader()` and `Altoholic:SetCharacterRowNameLevel()` — the nil-guards now live in one place instead of being copy-pasted across frames.
- Fixed crash sites the per-frame sweep had missed: `Skills.lua` (row + skill-rank tooltip), `Keys.lua` (×3 `format` with possibly-nil name), and the latent `ShowClassIcons` sort (`Altoholic.lua` — getters bypass their own `or 0` via the DataStore wrapper). - Fixed crash sites the per-frame sweep had missed: `Skills.lua` (row + skill-rank tooltip), `Keys.lua` (×3 `format` with possibly-nil name), and the latent `ShowClassIcons` sort (`Altoholic.lua` — getters bypass their own `or 0` via the DataStore wrapper).