diff --git a/Altoholic/Altoholic.toc b/Altoholic/Altoholic.toc index d78e4ce..00ad0fd 100644 --- a/Altoholic/Altoholic.toc +++ b/Altoholic/Altoholic.toc @@ -1,18 +1,19 @@ ## Interface: 30300 -## Title: Altoholic (|cFF69CCF0Telkar-RG|cFFFFFFFF 1.04a|r) +## Title: Altoholic (|cFF69CCF0Telkar-RG|cFFFFFFFF 1.04a|r |cFFFFD100CoA|r) ## X-Curse-Packaged-Version: r90 ## X-Curse-Project-Name: Altoholic ## X-Curse-Project-ID: altoholic ## X-Curse-Repository-ID: wow/altoholic/mainline -## Notes: Provides information about your alts +## Notes: Provides information about your alts (CoA fork) ## Notes-ruRU: Предоставляет информацию о вашем персонажах ## Notes-zhTW: 讓你即時撿閱你所有角色的資料 ## Notes-zhCN: 能让你全面掌握你的所有角色的信息。 ## Author: Thaoky, Telkar-RG -## Version: 3.3.002b +## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at +## Version: 3.3.002b-coa.2 ## 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 diff --git a/Altoholic/Characters.lua b/Altoholic/Characters.lua index ba1782c..9c5634a 100644 --- a/Altoholic/Characters.lua +++ b/Altoholic/Characters.lua @@ -277,7 +277,9 @@ function ns:GetInfo(index) end function ns:GetLineType(index) - return mod(characterList[index].linetype, 3) + local c = characterList[index] -- CoA: hover can fire with a stale/out-of-range line id; callers (Level_OnEnter) already handle a nil return + if not c then return end + return mod(c.linetype, 3) end function ns:GetField(index, field) diff --git a/DataStore_Characters/DataStore_Characters.lua b/DataStore_Characters/DataStore_Characters.lua index 360bbd2..20e8983 100644 --- a/DataStore_Characters/DataStore_Characters.lua +++ b/DataStore_Characters/DataStore_Characters.lua @@ -169,7 +169,7 @@ do end local function _GetColoredCharacterName(character) - return (ClassColors[character.englishClass] or WHITE) .. character.name + return (ClassColors[character.englishClass] or WHITE) .. (character.name or "?") -- CoA: records seeded from guild comm before a full scan have no name yet end local function _GetClassColor(character) diff --git a/DataStore_Characters/DataStore_Characters.toc b/DataStore_Characters/DataStore_Characters.toc index 2be9e21..9e180ae 100644 --- a/DataStore_Characters/DataStore_Characters.toc +++ b/DataStore_Characters/DataStore_Characters.toc @@ -2,7 +2,8 @@ ## Title: DataStore_Characters ## Notes: Stores information about characters (race, level, etc..) ## Author: Thaoky (EU-Marécages de Zangar) -## Version: 3.3.001 +## X-Edited-By: Exiles (Sub-Net) +## Version: 3.3.001-coa.2 ## Dependencies: DataStore ## OptionalDeps: Ace3 ## SavedVariables: DataStore_CharactersDB diff --git a/DataStore_Inventory/DataStore_Inventory.lua b/DataStore_Inventory/DataStore_Inventory.lua index c069282..6275a8e 100644 --- a/DataStore_Inventory/DataStore_Inventory.lua +++ b/DataStore_Inventory/DataStore_Inventory.lua @@ -88,7 +88,7 @@ local function GetAIL(alts) local out = {} local character = DataStore:GetCharacter() -- this character - local ail = DataStore:GetAverageItemLevel(character) + local ail = DataStore:GetAverageItemLevel(character) or 0 -- CoA: guard nil so the login AIL broadcast can't crash (mirrors the alt loop below) table.insert(out, format("%s:%d", UnitName("player"), ail)) if strlen(alts) > 0 then @@ -162,7 +162,7 @@ function ScanInventory() end end - addon.ThisCharacter.averageItemLvl = totalItemLevel / itemCount + addon.ThisCharacter.averageItemLvl = (itemCount > 0) and (totalItemLevel / itemCount) or 0 -- CoA: ungeared char => itemCount 0; avoid 0/0 nan addon.ThisCharacter.lastUpdate = time() end @@ -202,7 +202,7 @@ local function _GetInventoryItemCount(character, searchedID) end local function _GetAverageItemLevel(character) - return character.averageItemLvl + return character.averageItemLvl or 0 -- CoA: chars known only via guild comm / not yet scanned have no iLvl; callers do arithmetic on it (Altoholic sort, AccountSummary format) end local sentRequests -- recently sent requests diff --git a/DataStore_Inventory/DataStore_Inventory.toc b/DataStore_Inventory/DataStore_Inventory.toc index 27ad376..46fa63d 100644 --- a/DataStore_Inventory/DataStore_Inventory.toc +++ b/DataStore_Inventory/DataStore_Inventory.toc @@ -2,7 +2,8 @@ ## Title: DataStore_Inventory ## Notes: Stores information about character inventory ## Author: Thaoky (EU-Marécages de Zangar) -## Version: 3.3.002 +## X-Edited-By: Exiles (Sub-Net) +## Version: 3.3.002-coa.2 ## Dependencies: DataStore ## OptionalDeps: Ace3 ## SavedVariables: DataStore_InventoryDB diff --git a/DataStore_Pets/DataStore_Pets.lua b/DataStore_Pets/DataStore_Pets.lua index 212a8dd..4182863 100644 --- a/DataStore_Pets/DataStore_Pets.lua +++ b/DataStore_Pets/DataStore_Pets.lua @@ -70,7 +70,7 @@ local function _GetPets(character, companionType) end local function _GetNumPets(pets) - assert(type(pets) == "table") -- this is the pointer to a pet table, obtained through GetPets() + if type(pets) ~= "table" then return 0 end -- CoA: char may have no scanned CRITTER/MOUNT table yet; upstream assert() crashed TabCharacters return #pets end diff --git a/DataStore_Pets/DataStore_Pets.toc b/DataStore_Pets/DataStore_Pets.toc index d872846..45ecd6b 100644 --- a/DataStore_Pets/DataStore_Pets.toc +++ b/DataStore_Pets/DataStore_Pets.toc @@ -2,7 +2,8 @@ ## Title: DataStore_Pets ## Notes: Stores information about character pets and mounts ## Author: Thaoky (EU-Marécages de Zangar) -## Version: 3.3.001 +## X-Edited-By: Exiles (Sub-Net) +## Version: 3.3.001-coa.2 ## Dependencies: DataStore ## OptionalDeps: Ace3 ## SavedVariables: DataStore_PetsDB diff --git a/README.md b/README.md index e218740..dada96a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # wow-Altoholic-dev Altoholic: modified development for WotLK +## CoA fork (Exiles) + +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.2** — Defensive guards for CoA data shapes (custom classes, records seeded from guild comm before a full scan, ungeared chars). Fixes login/UI crashes: + - `DataStore_Inventory` — `GetAverageItemLevel` returns `0` instead of `nil` (crashed the Altoholic char sort and AccountSummary iLvl format); guarded the login AIL broadcast and the `0/0` average for ungeared chars. + - `DataStore_Pets` — `GetNumPets` returns `0` for an unscanned companion table instead of `assert`-crashing TabCharacters. + - `DataStore_Characters` — `GetColoredCharacterName` tolerates a `nil` name (records known only via guild comm). + - `Altoholic/Characters.lua` — `GetLineType` returns `nil` for a stale/out-of-range line id (caller already handles it) instead of indexing a nil row. +- **3.3.002b-coa.1** — Initial CoA packaging (Altoholic + Altoholic_Achievements + 16 DataStore modules). + Added "Keys" Tab for better overview of owned keys and some attunement quests. ## Changes - [Edited Version 1.04a](https://github.com/telkar-rg/wow-Altoholic-dev/releases/tag/t1.04a)