mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Share exp-cap helper across enhance flows; fix quest-reward rebirth
Build and Push Docker images to Docker Hub / build-and-push (push) Has been cancelled
Build and Push Docker images to Docker Hub / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -17,6 +17,25 @@ type CharacterRebirthCatalog struct {
|
||||
MaterialsByGroupId map[int32][]EntityMCharacterRebirthMaterialGroup
|
||||
}
|
||||
|
||||
func (c *CharacterRebirthCatalog) CostumeLevelLimitUp(characterId, rebirthCount int32) int32 {
|
||||
if c == nil || rebirthCount <= 0 {
|
||||
return 0
|
||||
}
|
||||
stepGroupId, ok := c.StepGroupByCharacterId[characterId]
|
||||
if !ok {
|
||||
return 0
|
||||
}
|
||||
var total int32
|
||||
for i := range rebirthCount {
|
||||
step, ok := c.StepByGroupAndCount[StepKey{GroupId: stepGroupId, BeforeRebirthCount: i}]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
total += step.CostumeLevelLimitUp
|
||||
}
|
||||
return total
|
||||
}
|
||||
|
||||
func LoadCharacterRebirthCatalog() (*CharacterRebirthCatalog, error) {
|
||||
rebirthRows, err := utils.ReadTable[EntityMCharacterRebirth]("m_character_rebirth")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user