【猫草大作战】-领奖逻辑优化
This commit is contained in:
parent
af72af6ec4
commit
d17992a6f1
@ -191,7 +191,11 @@ func (c *CatnipMod) Reward(Id, Progress int) ([]*item.Item, *CatnipGame, error)
|
||||
return nil, nil, fmt.Errorf("reward for progress %d has already been claimed in game ID %d", Progress, Id)
|
||||
}
|
||||
GameInfo.Reward = append(GameInfo.Reward, Progress)
|
||||
return catnipCfg.GetProgressReward(c.Id, Progress), GameInfo, nil
|
||||
Items := catnipCfg.GetProgressReward(c.Id, Progress)
|
||||
if Items == nil {
|
||||
return nil, nil, fmt.Errorf("no reward found for progress %d in game ID %d", Progress, Id)
|
||||
}
|
||||
return Items, GameInfo, nil
|
||||
}
|
||||
|
||||
func (c *CatnipMod) GrandReward() ([]*item.Item, error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user