Support granting companions and parts from the shop

This commit is contained in:
Ilya Groshev
2026-04-22 22:45:29 +03:00
parent 945ca2e3df
commit dcd4a55cf9
3 changed files with 66 additions and 56 deletions
+14 -5
View File
@@ -59,11 +59,20 @@ func BuildGranter(catalog *masterdata.QuestCatalog) *store.PossessionGranter {
}
releaseConditions[groupId] = conds
}
partsById := make(map[int32]store.PartsRef, len(catalog.PartsById))
for id, p := range catalog.PartsById {
partsById[id] = store.PartsRef{
PartsGroupId: p.PartsGroupId,
PartsStatusMainLotteryGroupId: p.PartsStatusMainLotteryGroupId,
}
}
return &store.PossessionGranter{
CostumeById: costumeById,
WeaponById: weaponById,
WeaponSkillSlots: catalog.WeaponSkillSlots,
WeaponAbilitySlots: catalog.WeaponAbilitySlots,
ReleaseConditions: releaseConditions,
CostumeById: costumeById,
WeaponById: weaponById,
WeaponSkillSlots: catalog.WeaponSkillSlots,
WeaponAbilitySlots: catalog.WeaponAbilitySlots,
ReleaseConditions: releaseConditions,
PartsById: partsById,
DefaultPartsStatusMainByLotteryGroup: catalog.DefaultPartsStatusMainByLotteryGroup,
}
}