Files
bl/logic/service/fight/info/item.go
昔念 c916440033 ```
feat(fight): 完善战斗系统中道具使用逻辑与血量恢复机制

- 修改 item.go 中 Item 结构体,将 Bonus 字段类型由 string
2025-11-08 16:38:41 +08:00

12 lines
732 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package info
// UsePetIteminfo 对应Java的UsePetIteminfo实现OutboundMessage接口
type UsePetIteminfo struct {
UserID uint32 `description:"玩家ID" codec:"userId"` // @UInt long 对应Go的uint32无符号64位
ItemID uint32 `description:"使用的物品ID" codec:"itemId"` // 结构体标签模拟@FieldDescription和@AutoCodec注解
UserHp uint32 `description:"用户血量 这里是原始HP+药剂回复的HP总和 比如我只有20血使用了150药剂 这里应该是170 使用PP药剂 这里为原始HP" codec:"userHp"`
//这里实现是int, 可以+血
ChangeHp int32 `description:"改变血量 药剂增加的血量 使用PP药剂这里为0 实际增加PP为Note USE Skill包" codec:"changeHp"`
}