Files
bl/logic/service/room/FitmentShowInfo.go
昔念 621a9d3858 refactor(socket): 重构 socket 模块
- 移除 common/data/socket 目录下的大部分文件
- 新增 service 目录,将 Player 和 Conn 结构体移至该目录
- 更新 LogicClient 中的方法签名,使用 service 包的类型
- 重构 Controller 中的方法,适应新的 service 包结构
2025-09-04 02:00:57 +08:00

74 lines
2.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 room
import (
"blazing/logic/service"
)
// FitmentShowInfo 表示家具展示信息
type FitmentShowInfo struct {
// 家具id 或 默认房型id: 500001
Id uint32 `json:"id"`
// x坐标
X uint32 `json:"x"`
// y坐标
Y uint32 `json:"y"`
// 默认0
Dir uint32 `json:"dir"`
// 默认0
Status uint32 `json:"status"`
}
// FitmentUseringInboundInfo FitmentUseringInboundInfo类实现InboundMessage接口
type FitmentUseringInboundInfo struct {
Head service.TomeeHeader `cmd:"10006" struc:"[0]pad"` //玩家登录
// 需要获取基地信息的目标玩家账号ID
TargetUserID uint32 `json:"targetUserId"`
}
// FitmentUseringOutboundInfo FitmentUseringOutboundInfo实现OutboundMessage接口
type FitmentUseringOutboundInfo struct {
// 玩家账号ID
UserId uint32 ` json:"userId"`
// 进入基地所有者的userid
RoomId uint32 `codec:"auto" json:"roomId"`
FitmentsLen uint32 `json:"fitmentsLen" struc:"sizeof=Fitments"`
// 基地摆放物品的数组, 就算没有摆放物品, 也必带一个小屋的参数
Fitments []FitmentShowInfo `codec:"auto" json:"fitments"`
}
// PetShowInfo 宠物展示信息
type PetShowInfo struct {
TypeId uint32 // 精灵类型ID
CatchTime uint32 // 精灵生成时间
}
type PetRoomListOutboundInfo struct {
PetsLen uint32 `json:"petsLen" struc:"sizeof=Pets"`
Pets []PetShowInfo `json:"pets"`
}
type PetRoomListInboundInfo struct {
Head service.TomeeHeader `cmd:"2324" struc:"[0]pad"` //玩家登录
// 需要获取基地信息的目标玩家账号ID
TargetUserID uint32 `json:"targetUserId"`
}
type FitmentAllInboundEmpty struct {
Head service.TomeeHeader `cmd:"10007" struc:"[0]pad"`
}
type FitmentAllOutboundInfo struct {
FitmentsLen uint32 `json:"fitmentsLen" struc:"sizeof=Fitments"`
// 基地摆放物品的数组, 就算没有摆放物品, 也必带一个小屋的参数
Fitments []FitmentItemInfo `codec:"auto" json:"fitments"`
}
// FitmentItemInfo 对应Java的FitmentItemInfo类
type FitmentItemInfo struct {
// Id 家具id 或 默认房型id: 500001对应Java的@UInt long id
Id uint32 `json:"id"`
// UsedCount 使用数量默认房型id项目的使用数据固定为1对应Java的@UInt long usedCount
UsedCount uint32 `json:"usedCount"`
// AllCount 拥有数量默认房型id项目的拥有数量固定为1对应Java的@UInt long allCount
AllCount uint32 `json:"allCount"`
}