Add game version check to save (WiP)

fasthttp
Flashfyre 2024-04-15 10:10:22 -04:00
parent 25abf4914b
commit d232773ecd
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ func Update(uuid []byte, slot int, save any) error {
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)
case defs.SessionSaveData: // Session
if slot < 0 || slot >= defs.SessionSlotCount {