refactor(item): 统一物品操作接口并优化金币处理逻辑

This commit is contained in:
1
2025-12-16 06:54:27 +00:00
parent 39dc79f706
commit 49b4c8cf2a
10 changed files with 47 additions and 28 deletions

View File

@@ -63,7 +63,7 @@ func (h Controller) ItemUsePet(data *item.C2S_USE_PET_ITEM_OUT_OF_FIGHT, c *play
}
c.Service.Item.SubItem(data.ItemID, 1)
c.Service.Item.UPDATE(data.ItemID, -1)
result = &item.S2C_USE_PET_ITEM_OUT_OF_FIGHT{}
onpet.CalculatePetPane(false)
copier.Copy(&result, onpet)
@@ -82,6 +82,6 @@ func (h Controller) ResetNature(data *item.C2S_PET_RESET_NATURE, c *player.Playe
onpet.Nature = data.Nature
onpet.CalculatePetPane(false)
c.Service.Item.SubItem(data.ItemId, 1)
c.Service.Item.UPDATE(data.ItemId, -1)
return result, 0
}