Files
bl/logic/service/item/item.go
昔念 5e01837f78 refactor(logic): 重构逻辑层代码
- 移除未使用的 SocketHandler_Tomee.go、ai.go、effect_1.go 文件
- 更新 player 包名引用,替换原 service 包
- 调整 TomeeHeader 和相关处理逻辑至 player 包
- 更新各控制器中的 Player 引用为 player 包中的类型
- 移除冗余的 GetPlayer 方法,使用新逻辑
2025-09-14 01:35:16 +08:00

38 lines
1.4 KiB
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/logic/service/player"
"blazing/modules/blazing/model"
)
// 实现了入站消息接口Go中通过方法集隐式实现
type ItemListInboundInfo struct {
Head player.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 []model.SingleItemInfo `autoCodec:"true" messageType:"Item_List" fieldDesc:"物品列表"`
}
// SingleItemInfo 单个物品信息结构体对应Java的SingleItemInfo类
type GoldOnlineRemainInboundInfo struct {
Head player.TomeeHeader `cmd:"1106" struc:"[0]pad"`
}
// GoldOnlineRemainOutboundInfo 对应Java的GoldOnlineRemainOutboundInfo
// 实现OutboundMessage接口包含金豆数量信息
type GoldOnlineRemainOutboundInfo struct {
// GoldNumber 金豆数量(后端返回实际数量需要*100
// 对应Java的@UInt long类型使用uint64
GoldNumber uint32 `json:"goldNumber" fieldDescription:"金豆数量, 后端返回实际数量需要*100" uint:"true"`
}