Save the reputations table on Classic Era, and skip factions absent from the running version - #16
Open
uga wants to merge 2 commits into
Open
Save the reputations table on Classic Era, and skip factions absent from the running version#16uga wants to merge 2 commits into
uga wants to merge 2 commits into
Conversation
The reputations grid builds its rows from DataStore:GetFactionName(id), which returns nil for a faction the current version never registered. Tranquillien is one: it is only added from The Burning Crusade onwards, so on Classic Era its row carries an icon and no name. Picking "All in one" then sorts those rows and compares a nil name with a string. Nameless factions are now left out of the view entirely - there is nothing to show for them - in the per-group views too, where they rendered as blank rows. The two leftover debug prints in the comparator go with them. AddFaction() had the mirror of the same problem: given a name it cannot resolve, it wrote factionNameToId[nil], which errors and would take out every faction declared after it. It now skips the faction instead, and RemoveFaction() no longer assumes the faction it clears was registered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DataStore_Reputations_Vanilla.toc declared DataStore_ReputationsDB as its saved variable - the AceDB object from before the migration, which no code touches any more. The table the module actually writes to, DataStore_Reputations_Characters, was never persisted, so it came back empty every session with a single entry: the row GetCharacterDB() creates for the character logging in. Every alt's reputation disappeared at logout, which is why the grid only ever had one populated column, and why the column followed whichever character was logged in. The three other tocs of the module already name the right table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes in
DataStore_Reputations. Verified in game on Classic Era and TBC Anniversary.1. Save the reputations table on Classic Era
DataStore_Reputations_Vanilla.tocstill declared the old AceDB object:The module writes
DataStore_Reputations_Characters, which was not declared, so on Classic Era nothing was ever persisted: reputations were rescanned from scratch every session and no alt ever had any. The other TOCs already declare the current table.2. Skip factions that do not exist in the running version of the game
Registering a faction whose id is absent from the running version indexed
factionNameToIdwith nil, which errors. Those ids are now skipped.Applicability
The reputation grid in
Altoholic_Catahas a companion change in the linked PR.Related PRs
This is one change set spread over the repos it touches. Account sharing needs the first two together; the others are independent of each other.