fix: 修正使用道具时的物品ID计算错误
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user