Skip to content

Commit

Permalink
add logging to EnumerateQuest
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiwish committed Jan 14, 2024
1 parent 4fbfd56 commit 1a6a9da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/channelserver/handlers_quest.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {

err = rows.Scan(&id, &maxPlayers, &questType, &questId, &mark, &flags, &startTime, &activeDays, &inactiveDays)
if err != nil {
s.logger.Error("Failed to scan event quest row", zap.Error(err))
continue
}

Expand Down Expand Up @@ -283,9 +284,11 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {

data, err := makeEventQuest(s, rows)
if err != nil {
s.logger.Error("Failed to make event quest", zap.Error(err))
continue
} else {
if len(data) > 896 || len(data) < 352 {
s.logger.Error("Invalid quest data length", zap.Int("len", len(data)))
continue
} else {
totalCount++
Expand Down

0 comments on commit 1a6a9da

Please sign in to comment.