修复订单bug

This commit is contained in:
hahwu 2026-02-18 13:40:42 +08:00
parent 9ccf6f3541
commit 92912ad341

View File

@ -1310,7 +1310,7 @@ func (p *Player) FormatPetOrderItem(Items []*item.Item) []*item.Item {
cleanItem := p.GetPlayroomClean()
cleanPlo := playroomCfg.GetItemAddPhysiology(cleanItem)
// 卫生值低于等于5点优先产出清洁类物品
if clean.Num+cleanPlo <= 5 {
if clean != nil && clean.Num+cleanPlo <= 5 {
RandList := OrderItem[2]
NewItems = append(NewItems, item.NewItem(GoUtil.RandSlice(RandList), 1))
continue