Files
bl/logic/service/room/pet.go
昔念 a6386daad8
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-04-22 00:39:41 +08:00

48 lines
2.0 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/common"
"blazing/logic/service/pet"
)
type C2S_PetShowList struct {
// CatchTime 展示精灵的捕获时间Unix时间戳/自定义时间格式,按前端规则)
CatchTime uint32 `json:"catchTime"` // C# uint → Go uint32严格匹配32位无符号整数
// PetID 展示精灵的唯一ID
PetID uint32 `json:"petID"`
}
// C2S_PET_ROOM_SHOW 客户端→服务端的「精灵房间展示」请求结构体
// 对应前端 C2S_PET_ROOM_SHOW 结构体
type C2S_PET_ROOM_SHOW struct {
Head common.TomeeHeader `cmd:"2323" struc:"skip"` //玩家登录
PetShowInfoLen uint32 `json:"PetShowInfoLen" struc:"sizeof=PetShowList"`
// PetShowList 整个展示精灵的数组
// 业务规则展示1只精灵对应数组1个元素展示多只时所有已展示精灵的结构体均包含在内
// 数据来源前端展示精灵的map数组直接转换而来
PetShowList []C2S_PetShowList `json:"PetShowList"`
}
// S2C_PET_ROOM_SHOW 服务端→客户端的「精灵房间展示」响应结构体
// 对应前端 S2C_PET_ROOM_SHOW 结构体
type S2C_PET_ROOM_SHOW struct {
// PetShowList 整个展示精灵的数组
PetShowListLen uint32 `json:"PetShowListLen" struc:"sizeof=PetShowList"`
// 数组内每个元素为 S2C_PetShowList字段顺序petID → catchTime
PetShowList []pet.PetShortInfo `json:"PetShowList"`
}
type C2S_RoomPetInfo struct {
Head common.TomeeHeader `cmd:"2325" struc:"skip"` //玩家登录
// UserID 跟随精灵的主人用户ID
UserID uint32 `json:"userID"` // C# uint → Go uint32严格匹配32位无符号整数
// CatchTime 精灵的捕获时间Unix时间戳/前端自定义时间格式)
CatchTime uint32 `json:"catchTime"`
}
// S2C_RoomPetShowToggle 基地展示精灵添加/移除响应
type S2C_RoomPetShowToggle struct {
PetShowListLen uint32 `json:"PetShowListLen" struc:"sizeof=PetShowList"`
PetShowList []pet.PetShortInfo `json:"PetShowList"`
}