add option to dump raw saves

This commit is contained in:
wish
2023-12-03 17:57:23 +11:00
parent 4ce65e47e6
commit 5662564842
3 changed files with 7 additions and 2 deletions

View File

@@ -34,6 +34,7 @@
"EarthMonsterOverride": [0, 0, 0, 0],
"SaveDumps": {
"Enabled": true,
"RawEnabled": false,
"OutputDir": "save-backups"
}
},

View File

@@ -117,8 +117,9 @@ type DevModeOptions struct {
}
type SaveDumpOptions struct {
Enabled bool
OutputDir string
Enabled bool
RawEnabled bool
OutputDir string
}
// GameplayOptions has various gameplay modifiers

View File

@@ -45,6 +45,9 @@ func handleMsgMhfSavedata(s *Session, p mhfpacket.MHFPacket) {
doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
return
}
if s.server.erupeConfig.DevModeOptions.SaveDumps.RawEnabled {
dumpSaveData(s, saveData, "raw-savedata")
}
s.logger.Info("Updating save with blob")
characterSaveData.decompSave = saveData
}