playroom优化
This commit is contained in:
parent
6893138df0
commit
ff818441f7
@ -180,3 +180,9 @@ func UnitOrder2(p *Player, Lv, EnergyMul int) float64 {
|
|||||||
}
|
}
|
||||||
return Energy / float64(5000)
|
return Energy / float64(5000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnitPlayroom(p *Player) error {
|
||||||
|
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||||
|
PlayroomMod.CreateOrderReward(100, p.PlayMod.getItemMod())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@ -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)
|
RandSlice := GoUtil.IfTrue((NormalCleanNum+PremiumCleanNum) > (NormalFoodNum+PremiumFoodNum), []int{PremiumCleanId, NormalCleanId}, []int{NormalFoodId, PremiumFoodId}).([]int)
|
||||||
Prob := GoUtil.RandSlice(RandSlice)
|
Prob := GoUtil.RandSlice(RandSlice)
|
||||||
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
|
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
RandSlice = []int{NormalFoodNum, NormalCleanNum}
|
RandSlice = []int{NormalFoodId, NormalCleanId, PremiumFoodId, PremiumCleanId}
|
||||||
Prob := GoUtil.RandSlice(RandSlice)
|
Prob := GoUtil.RandSlice(RandSlice)
|
||||||
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
|
p.Reward = append(p.Reward, &item.Item{Id: Prob, Num: 1})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user