fix(channelserver): handle silently discarded errors across handlers

Replace ~17 instances of '_ =' / '_ :=' with proper error checks that
log warnings or send fail ACKs. Affected handlers: cafe, distitem, data,
guild, guild_board, guild_cooking, guild_scout, house, mercenary, misc,
and rengoku. Also resolves all pre-existing lint issues: unchecked
bf.Seek in tests, unused filtered slice in svc_festa, unused mock
fields, and unused signserver test helper.
This commit is contained in:
Houmgaor
2026-02-27 11:33:25 +01:00
parent 4b24489ebe
commit 4e8c4b4e92
15 changed files with 236 additions and 37 deletions

View File

@@ -176,9 +176,13 @@ func dumpSaveData(s *Session, data []byte, suffix string) {
func handleMsgMhfLoaddata(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfLoaddata)
if _, err := os.Stat(filepath.Join(s.server.erupeConfig.BinPath, "save_override.bin")); err == nil {
data, _ := os.ReadFile(filepath.Join(s.server.erupeConfig.BinPath, "save_override.bin"))
doAckBufSucceed(s, pkt.AckHandle, data)
return
data, readErr := os.ReadFile(filepath.Join(s.server.erupeConfig.BinPath, "save_override.bin"))
if readErr != nil {
s.logger.Error("Failed to read save_override.bin", zap.Error(readErr))
} else {
doAckBufSucceed(s, pkt.AckHandle, data)
return
}
}
data, err := s.server.charRepo.LoadColumn(s.charID, "savedata")