修复订单bug
This commit is contained in:
parent
738015e1d3
commit
87c3448dce
@ -1310,7 +1310,7 @@ func (p *Player) FormatPetOrderItem(Items []*item.Item) []*item.Item {
|
|||||||
cleanItem := p.GetPlayroomClean()
|
cleanItem := p.GetPlayroomClean()
|
||||||
cleanPlo := playroomCfg.GetItemAddPhysiology(cleanItem)
|
cleanPlo := playroomCfg.GetItemAddPhysiology(cleanItem)
|
||||||
// 卫生值低于等于5点,优先产出清洁类物品
|
// 卫生值低于等于5点,优先产出清洁类物品
|
||||||
if clean.Num+cleanPlo <= 5 {
|
if clean != nil && clean.Num+cleanPlo <= 5 {
|
||||||
RandList := OrderItem[2]
|
RandList := OrderItem[2]
|
||||||
NewItems = append(NewItems, item.NewItem(GoUtil.RandSlice(RandList), 1))
|
NewItems = append(NewItems, item.NewItem(GoUtil.RandSlice(RandList), 1))
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user