Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert button for server-side achievements reverts to state at login, not last committed state #92

Open
stt opened this issue Aug 21, 2018 · 4 comments
Labels
Achievement List Affects the achievements list window bug Something isn't working enhancement New feature or request

Comments

@stt
Copy link

stt commented Aug 21, 2018

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.

@Jamiras
Copy link
Member

Jamiras commented Aug 22, 2018

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.

@Jamiras
Copy link
Member

Jamiras commented Aug 22, 2018

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.

@stt
Copy link
Author

stt commented Aug 26, 2018

Thanks for looking into it, sorry it took a bit to get back.
Retried now what I did earlier with RASnes9x and took notes:

  1. created a new set for a game in local and created one new achievement
  2. promoted to unofficial
  3. added new requirement and did "commit selected"
  4. checked .txt file, it was still at the step#2 (so server now has newer set than the txt does)
  5. clicked "revert selected" it gave "attempt to revert from file?" prompt
  6. clicking ok the achievement set went back to the state in my local .txt (old state)

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)

@Jamiras
Copy link
Member

Jamiras commented Aug 26, 2018

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.

@Jamiras Jamiras changed the title Achievement revert feature broken? Revert button for server-side achievements reverts to state at login, not last committed state Aug 26, 2018
@kdecks kdecks added enhancement New feature or request Achievement List Affects the achievements list window labels Oct 21, 2018
@kdecks kdecks added the bug Something isn't working label Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Achievement List Affects the achievements list window bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants