refactor(blazing): 重构项目并优化数据结构

- 更新 LoginUserInfo 结构体,将 uint64 类型改为 uint32
- 调整 ServerInfo 结构体,将 IP 字段从 []byte 改为 string
- 移除未使用的 ArraySerialize 结构体
- 更新 ByteArray 类,修改相关方法名
- 删除未使用的 serialize 相关代码
- 优化模块导入,移除冗余依赖
This commit is contained in:
2025-06-22 12:05:07 +08:00
parent c00a87800a
commit 720294ad27
24 changed files with 631 additions and 395 deletions

View File

@@ -7,7 +7,7 @@ type ServerInfo struct {
// 当前服务器玩家在线数量, 供SWF显示
UserCnt uint32
// 服务器IP, 16字节UTF-8, 不足16补齐到16
IP []byte `v:"FIXED_LENGTH|length:16"`
IP string `serialize:"fixed:16"` // 定长模式16字节
// 端口
Port uint16
// 好友在线的个数
@@ -19,7 +19,7 @@ func NewServerInfo() *ServerInfo {
return &ServerInfo{
OnlineID: 0,
UserCnt: 0,
IP: []byte{},
IP: "",
Port: 0,
Friends: 0,
}