Fix version check for outdated client
parent
d232773ecd
commit
420a4d17b3
|
@ -28,6 +28,10 @@ func Update(uuid []byte, slot int, save any) error {
|
||||||
return fmt.Errorf("invalid system data")
|
return fmt.Errorf("invalid system data")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if save.GameVersion != "1.0.1" {
|
||||||
|
return fmt.Errorf("client version out of date")
|
||||||
|
}
|
||||||
|
|
||||||
err = db.UpdateAccountStats(uuid, save.GameStats, save.VoucherCounts)
|
err = db.UpdateAccountStats(uuid, save.GameStats, save.VoucherCounts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to update account stats: %s", err)
|
return fmt.Errorf("failed to update account stats: %s", err)
|
||||||
|
@ -57,10 +61,6 @@ func Update(uuid []byte, slot int, save any) error {
|
||||||
return fmt.Errorf("failed to serialize save: %s", err)
|
return fmt.Errorf("failed to serialize save: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if save.GameVersion != "1.0.1" {
|
|
||||||
return fmt.Errorf("client version out of date")
|
|
||||||
}
|
|
||||||
|
|
||||||
db.DeleteClaimedAccountCompensations(uuid)
|
db.DeleteClaimedAccountCompensations(uuid)
|
||||||
case defs.SessionSaveData: // Session
|
case defs.SessionSaveData: // Session
|
||||||
if slot < 0 || slot >= defs.SessionSlotCount {
|
if slot < 0 || slot >= defs.SessionSlotCount {
|
||||||
|
|
Loading…
Reference in New Issue