- 移除 common/data/socket 目录下的大部分文件 - 新增 service 目录,将 Player 和 Conn 结构体移至该目录 - 更新 LogicClient 中的方法签名,使用 service 包的类型 - 重构 Controller 中的方法,适应新的 service 包结构
33 lines
990 B
Go
33 lines
990 B
Go
package item
|
||
|
||
import "blazing/logic/service"
|
||
|
||
// 实现了入站消息接口(Go中通过方法集隐式实现)
|
||
type ItemListInboundInfo struct {
|
||
Head service.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
|
||
}
|