playroom优化

This commit is contained in:
hahwu 2025-02-07 14:58:10 +08:00
parent 6893138df0
commit ff818441f7
2 changed files with 7 additions and 2 deletions

View File

@ -180,3 +180,9 @@ func UnitOrder2(p *Player, Lv, EnergyMul int) float64 {
}
return Energy / float64(5000)
}
func UnitPlayroom(p *Player) error {
PlayroomMod := p.PlayMod.getPlayroomMod()
PlayroomMod.CreateOrderReward(100, p.PlayMod.getItemMod())
return nil
}

View File

@ -230,10 +230,9 @@ func (p *PlayroomMod) CreateOrderReward(Star int, itemMod *item.ItemMod) {
RandSlice := GoUtil.IfTrue((NormalCleanNum+PremiumCleanNum) > (NormalFoodNum+PremiumFoodNum), []int{PremiumCleanId, NormalCleanId}, []int{NormalFoodId, PremiumFoodId}).([]int)
Prob := GoUtil.RandSlice(RandSlice)
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
return
}
RandSlice = []int{NormalFoodNum, NormalCleanNum}
RandSlice = []int{NormalFoodId, NormalCleanId, PremiumFoodId, PremiumCleanId}
Prob := GoUtil.RandSlice(RandSlice)
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
}