mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Fix panic when quest finish-reward switch checks an unstarted quest
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
func (h *QuestHandler) isQuestCleared(user *store.UserState, questId int32) bool {
|
||||
quest, ok := user.Quests[questId]
|
||||
if !ok {
|
||||
panic(fmt.Sprintf("unknown questId=%d for isQuestCleared", questId))
|
||||
return false
|
||||
}
|
||||
return quest.QuestStateType == model.UserQuestStateTypeCleared
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user