Files
bl/logic/service/pet/list.go
昔念 0dbb7d9a8d refactor(pet): 重构精灵信息获取逻辑并丰富精灵简要信息
- 使用 copier 库简化精灵信息复制过程
- 在 PetShortInfo 结构体中添加更多精灵属性:
  - ID
  - Level
  - SkinID
  - Shiny
- 优化 GetPetList 函数返回值结构
2025-09-01 01:31:42 +08:00

21 lines
583 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 pet
import "blazing/common/socket/handler"
type GetPetListInboundEmpty struct {
Head handler.TomeeHeader `cmd:"2303" struc:"[0]pad"`
}
type GetPetListOutboundInfo struct {
ShortInfoListLen uint32 `struc:"int32,sizeof=ShortInfoList"`
ShortInfoList []PetShortInfo
}
// PetShortInfo 精灵简要信息结构体
type PetShortInfo struct {
ID uint32 // 精灵类型ID对应Java中的id
CatchTime uint32 // 精灵生成时间
Level uint32 // 精灵等级
SkinID uint32 // 精灵皮肤ID
Shiny uint32 // 精灵是否闪光0=否1=是)
}