Skip to content

Commit

Permalink
Fix issue with deaths not being tracked when startPlayedMinutes == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Thource committed Mar 28, 2023
1 parent 3d0c81f commit 25e65ef
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,14 @@ public void onGameTick() {
}
refreshInfoBoxes();

if (startPlayedMinutes <= 0) {
return;
}

Integer savedPlayedMinutes =
configManager.getRSProfileConfiguration(
DudeWheresMyStuffConfig.CONFIG_GROUP, "minutesPlayed", int.class);
if (savedPlayedMinutes == null || savedPlayedMinutes != getPlayedMinutes()) {
configManager.setRSProfileConfiguration(
DudeWheresMyStuffConfig.CONFIG_GROUP, "minutesPlayed", getPlayedMinutes());
if (startPlayedMinutes > 0) {
Integer savedPlayedMinutes =
configManager.getRSProfileConfiguration(
DudeWheresMyStuffConfig.CONFIG_GROUP, "minutesPlayed", int.class);
if (savedPlayedMinutes == null || savedPlayedMinutes != getPlayedMinutes()) {
configManager.setRSProfileConfiguration(
DudeWheresMyStuffConfig.CONFIG_GROUP, "minutesPlayed", getPlayedMinutes());
}
}

if (deathbank != null) {
Expand Down

0 comments on commit 25e65ef

Please sign in to comment.