dump other savedata types

This commit is contained in:
wish
2022-09-05 15:29:24 +10:00
parent b172168418
commit 616d58e70e
3 changed files with 3 additions and 0 deletions

View File

@@ -264,6 +264,7 @@ func handleMsgMhfLoaddata(s *Session, p mhfpacket.MHFPacket) {
func handleMsgMhfSaveScenarioData(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfSaveScenarioData)
dumpSaveData(s, pkt.RawDataPayload, "scenario")
_, err := s.server.db.Exec("UPDATE characters SET scenariodata = $1 WHERE id = $2", pkt.RawDataPayload, s.charID)
if err != nil {
s.logger.Fatal("Failed to update scenario data in db", zap.Error(err))