refactor(item): 统一物品操作接口并优化金币处理逻辑
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user