feat(cache): 添加复合键缓存操作支持 添加了基于 uint32+string 组合键的缓存操作方法,包括 GetByCompoundKey、SetByCompoundKey、DelByCompoundKey 和 ContainsByCompoundKey 方法,用于处理用户ID和会话ID的组合缓存场景 fix(vscode): 添加 cSpell 配置支持 struc 词汇 refactor(session): 移除过时的会话管理方法 移除了基于单一字符串键的会话管理方法,因为已迁移到使用 复合键的缓存操作方式 ```
39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
package user
|
||
|
||
import "blazing/logic/service/common"
|
||
|
||
type CreatePlayerInboundInfo struct { //这里直接使用组合来实现将传入的原始头部数据和结构体参数序列化
|
||
Head common.TomeeHeader `cmd:"108" struc:"skip"` //玩家登录
|
||
|
||
// 玩家昵称,@ArraySerialize注解
|
||
Nickname string `struc:"[16]byte"` // 固定长度16字节
|
||
// 机器人人物颜色 rgb,@UInt注解
|
||
Color uint32 `fieldDescription:"机器人人物颜色 rgb" uint:"true"`
|
||
}
|
||
type CreatePlayerOutInfo struct {
|
||
|
||
//不用回包,因为前端已经处理了
|
||
|
||
}
|
||
|
||
type ChangePlayerNameInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2061" struc:"skip"` //玩家登录
|
||
|
||
// 玩家昵称
|
||
Nickname string `struc:"[16]byte"` // 固定长度16字节
|
||
}
|
||
|
||
type ChangePlayerNameOutboundInfo struct {
|
||
UserID uint32
|
||
Nickname string `struc:"[16]byte"` // 固定长度16字节
|
||
}
|
||
type ChangeTitleInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"3404" struc:"skip"` //玩家登录
|
||
TileID uint32
|
||
}
|
||
|
||
type ChangeTitleOutboundInfo struct {
|
||
UserID uint32
|
||
TileID uint32
|
||
}
|