Refactor grantParts function to remove unnecessary parts existence check

This commit is contained in:
Ilya Groshev
2026-04-22 14:16:13 +03:00
parent 4dc722c5d3
commit 3bc8ed94c7
-6
View File
@@ -289,12 +289,6 @@ func (h *QuestHandler) grantCompanion(user *store.UserState, companionId int32,
}
func (h *QuestHandler) grantParts(user *store.UserState, partsId int32, nowMillis int64) {
for _, row := range user.Parts {
if row.PartsId == partsId {
return
}
}
var mainStatId int32
if partsDef, ok := h.PartsById[partsId]; ok {
mainStatId = h.DefaultPartsStatusMainByLotteryGroup[partsDef.PartsStatusMainLotteryGroupId]