diff --git a/logic/controller/item_use.go b/logic/controller/item_use.go index 466aecc9..a3900bbe 100644 --- a/logic/controller/item_use.go +++ b/logic/controller/item_use.go @@ -98,7 +98,8 @@ func (h Controller) handlexuancaiItem(currentPet *model.PetInfo, c *player.Playe if r.Secondary != nil { return errorcode.ErrorCodes.ErrItemUnusable } - items := c.Service.Item.CheakItem(uint32(xmlres.PetMAP[int(currentPet.ID)].Type) + 400686) + itemid := uint32(currentPet.Type()) + 400686 + items := c.Service.Item.CheakItem(itemid) if items < 100 { return errorcode.ErrorCodes.ErrInsufficientItems } @@ -108,7 +109,7 @@ func (h Controller) handlexuancaiItem(currentPet *model.PetInfo, c *player.Playe return errorcode.ErrorCodes.ErrItemUnusable } - c.Service.Item.UPDATE(uint32(items), -100) + c.Service.Item.UPDATE(itemid, -100) return 0 }