```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(game): 宠物融合系统添加物品消耗异常处理

- 在宠物融合过程中添加物品扣除失败的错误检查
- 当物品不足时返回ErrInsufficientItems错误码

fix(pet): 宠物仓库管理功能增加数据库操作错误处理

- 在宠物释放到仓库和从仓库取出时验证数据库更新结果
- 添加宠物背包切换功能的错误检查机制

feat(fight):
This commit is contained in:
昔念
2026-03-19 14:50:11 +08:00
parent e2ac5a6325
commit b558f46d7a
10 changed files with 142 additions and 63 deletions

View File

@@ -66,7 +66,10 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
// utils.CountSliceElements(data.Item1[:])
for _, v := range data.Item1 {
c.Service.Item.UPDATE(v, -1)
err := c.Service.Item.UPDATE(v, -1)
if err != nil {
return result, errorcode.ErrorCodes.ErrInsufficientItems
}
}
result = &pet.PetFusionInfo{