Open stt opened 6 years ago
Unofficial achievements should be reverted from the cached file downloaded from the server.
TempSet
will have a m_nSetType
of Unofficial
. When TempSet.LoadFromFile
is called, it will go into the else code that processes the JSON response from the server which is stored in RACache\Data\[gameid].txt
.
I have verified the functionality in RAVBA with both the current master build and the 0.72 version of the DLL. Please clarify what isn't being reverted, as well as what emulator you're using.
Thanks for looking into it, sorry it took a bit to get back. Retried now what I did earlier with RASnes9x and took notes:
Now being aware of the state difference I can just click "Refresh from server" before doing "Revert selected" to get back to the desired point. So I guess the issue is mostly just that the UI is a bit confusing.
(Separate minor UI issue, the "* selected" buttons in "Achievements" dialog can be clicked even when no cheevo is selected, they just don't do anything)
That makes sense. The "Revert Selected" button restores the data to the last known server state, which is not updated when committing data to the server. I'll update the title to better reflect the issue.
IDC_RA_REVERTSELECTED in RA_Dlg_Achievement.cpp talks about "reverting from file" but the only thing that seems to write to file is IDC_RA_COMMIT_ACH when (g_nActiveAchievementSet == Local). Using the "Revert selected" button when Unofficial set is selected leads to some unclear behaviour. IMO it'd make sense if unofficial set actually reverted from server.