宠物宝藏优化

This commit is contained in:
hahwu 2025-03-19 17:20:37 +08:00
parent cd9afa8c7e
commit 29e3061fc7

View File

@ -60,15 +60,15 @@ func (f *FriendTreasureMod) Flip(Pos int) ([]*item.Item, error) {
}
f.Shift++
Info := f.List[Pos]
if Info.Uid != 0 {
f.Uids = append(f.Uids, Info.Uid)
}
if Info.Type == FRIEND_TYPE_ALIVE {
ProbMap := friendTreasureCfg.GetChestProb()
Prob := GoUtil.RandMap(ProbMap)
Info.Status = GAME_STATUS_START
return friendTreasureCfg.GetChestItems(Prob), nil
}
if Info.Uid != 0 {
f.Uids = append(f.Uids, Info.Uid)
}
Info.Status = GAME_STATUS_START
return nil, nil
}