From a56f19bd4c980b237312dd0034f82cc79e1eb527 Mon Sep 17 00:00:00 2001 From: xinian Date: Sun, 8 Mar 2026 16:48:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=81=93=E5=85=B7=E6=97=B6=E7=9A=84=E7=89=A9=E5=93=81ID?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/controller/item_use.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 }