fix: Commit to database via unique index rather than quest_id

This commit is contained in:
Matthew
2023-11-17 22:21:48 -05:00
parent 50d3ec36b2
commit a34a0e42b2

View File

@@ -223,7 +223,7 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
rotationTime := startTime.Add((time.Duration(activeDuration+inactiveDuration) * 24) * time.Hour)
if currentTime.After(rotationTime) {
// The rotation time has passed, update the start time and reset the rotation
_, err := transaction.Exec("UPDATE event_quests SET start_time = $1 WHERE quest_id = $2", rotationTime, questId)
_, err := transaction.Exec("UPDATE event_quests SET start_time = $1 WHERE id = $2", rotationTime, id)
if err != nil {
return
}