Files
bl/logic/service/item/item.go
昔念 4b5c6ce129 refactor(logic): 重构战斗相关逻辑和数据结构
- 优化了 FightPetInfo 和 AttackValue 结构体,使用更合理的数据类型
- 重新定义了战斗流程中的各种消息结构体
- 改进了宠物信息生成和计算逻辑
- 重构了宠物相关服务和控制器方法
- 优化了数据库操作,提高了代码的可读性和维护性
2025-09-01 01:03:46 +08:00

33 lines
998 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 item
import "blazing/common/socket/handler"
// 实现了入站消息接口Go中通过方法集隐式实现
type ItemListInboundInfo struct {
Head handler.TomeeHeader `cmd:"2605" struc:"[0]pad"`
// 查询物品id的开始对应Java的@UInt long
Param1 uint32 `fieldDesc:"查询物品id的开始" messageType:"Item_List"`
// 查询物品id的结尾对应Java的@UInt long
Param2 uint32 `fieldDesc:"查询物品id的结尾"`
// 默认值2对应Java的@UInt long
Param3 uint32 `fieldDesc:"默认值2"`
}
type ItemListOutboundInfo struct {
// 物品列表,
ItemListLen uint32 `struc:"sizeof=ItemList"`
ItemList []SingleItemInfo `autoCodec:"true" messageType:"Item_List" fieldDesc:"物品列表"`
}
// SingleItemInfo 单个物品信息结构体对应Java的SingleItemInfo类
type SingleItemInfo struct {
// 物品Id
ItemId uint32
// 物品数量,
ItemCnt uint32
// 固定值360000
LeftTime uint32
// 固定值0
ItemLevel uint32
}