feat(pet): 添加宠物收集功能和称号系统 - 实现了宠物收集任务状态查询功能 - 新增Collect方法处理宠物收集逻辑,包括类型验证和ID合法性检查 - 创建validTypeIDMap映射表统一管理合法的类型ID集合 - 重构任务状态判断逻辑,基于model.Completion状态进行判断 refactor(map): 统一玩家信息结构体 - 将OutInfo重命名为SimpleInfo并添加Title字段 - 更新EnterMap方法的返回类型为SimpleInfo - 修改space包中的UserInfo映射类型为SimpleInfo feat(task): 集成称号奖励到任务系统 - 在PlayerInfo结构体中添加Title字段 - 扩展TaskConfig模型支持称号奖励配置 - 更新用户信息服务处理用户名大小写转换 refactor(space): 优化空间服务数据结构 - 更新GetInfo方法返回SimpleInfo切片 - 调整UserInfo CsMap泛型类型参数 - 修改ListMapPlayerOutboundInfo中Player数组类型 style(login): 规范化用户名输入处理 - 登录时将用户名转换为小写进行比较 - 使用strings.EqualFold进行大小
137 lines
5.0 KiB
Go
137 lines
5.0 KiB
Go
package user
|
|
|
|
import (
|
|
"blazing/logic/service/common"
|
|
"blazing/modules/blazing/model"
|
|
)
|
|
|
|
type SimUserInfoInboundInfo struct {
|
|
Head common.TomeeHeader `cmd:"2051" struc:"skip"`
|
|
UserId uint32 `fieldDescription:"米米号" uint:"true" codec:"true"`
|
|
}
|
|
type SimUserInfoOutboundInfo struct {
|
|
// UserID 米米号
|
|
UserID uint32 `codec:"true"`
|
|
|
|
Nick string `struc:"[16]byte" default:"seer" json:"nick"` // 16字节昵称
|
|
Title uint32 `struc:"uint32" json:"title"` // 称号
|
|
|
|
// Color rgb颜色
|
|
Color uint32 `codec:"true"`
|
|
|
|
// Texture 纹理 0
|
|
// 对应 Java 注解: @FieldDescription("纹理 0") @UInt
|
|
Texture uint32 `codec:"true"`
|
|
|
|
// Vip 默认值 1 位置
|
|
// 对应 Java 注解: @FieldDescription("默认值 1 位置") @UInt
|
|
Vip uint32 `codec:"true"`
|
|
|
|
// Status 默认值0 未知
|
|
// 对应 Java 注解: @FieldDescription("默认值0 未知") @UInt
|
|
Status uint32 `codec:"true"`
|
|
|
|
// MapType 地图类型 进入地图包传入的字段
|
|
// 对应 Java 注解: @FieldDescription("地图类型 进入地图包传入的字段") @UInt
|
|
MapType uint32 `codec:"true"`
|
|
|
|
// MapID 地图id
|
|
// 对应 Java 注解: @FieldDescription("地图id") @UInt
|
|
MapID uint32 `codec:"true"`
|
|
|
|
// IsCanBeTeacher 能不能做教官
|
|
// 对应 Java 注解: @FieldDescription("能不能做教官") @UInt
|
|
IsCanBeTeacher uint32 `codec:"true"`
|
|
|
|
// TeacherID 教官id
|
|
// 对应 Java 注解: @FieldDescription("教官id") @UInt
|
|
TeacherID uint32 `codec:"true"`
|
|
|
|
// StudentID 学生id
|
|
// 对应 Java 注解: @FieldDescription("学生id") @UInt
|
|
StudentID uint32 `codec:"true"`
|
|
|
|
// GraduationCount 教官成绩
|
|
// 对应 Java 注解: @FieldDescription("教官成绩") @UInt
|
|
GraduationCount uint32 `codec:"true"`
|
|
|
|
// VipLevel vip等级 8
|
|
// 对应 Java 注解: @FieldDescription("vip等级 8") @UInt
|
|
VipLevel uint32 `codec:"true"`
|
|
|
|
// TeamId 战队id
|
|
// 对应 Java 注解: @FieldDescription("战队id") @UInt
|
|
TeamId uint32 `codec:"true"`
|
|
|
|
// IsShow 有没有跟随的精灵
|
|
// 对应 Java 注解: @FieldDescription("有没有跟随的精灵") @UInt
|
|
IsShow uint32 `codec:"true"`
|
|
ClothesCount uint32 `struc:"sizeof=Clothes" json:"clothes_count"` // 穿戴装备数量
|
|
// Clothes 穿戴装备
|
|
// 对应 Java 注解: @FieldDescription("穿戴装备") @Builder.Default
|
|
Clothes []model.PeopleItemInfo `codec:"true"`
|
|
}
|
|
type MoreUserInfoInboundInfo struct {
|
|
Head common.TomeeHeader `cmd:"2052" struc:"skip"`
|
|
UserId uint32 `fieldDescription:"米米号" uint:"true" codec:"true"`
|
|
}
|
|
type MoreUserInfoOutboundInfo struct {
|
|
// UserID 米米号
|
|
// 对应 Java 注解: @FieldDescription("米米号") @UInt
|
|
UserID uint32 `codec:"true"`
|
|
|
|
Nick string `struc:"[16]byte" default:"seer" json:"nick"` // 16字节昵称
|
|
Title uint32 `struc:"uint32" json:"title"` // 称号
|
|
RegisterTime uint32 `struc:"uint32" json:"register_time"` // 注册时间(秒时间戳)
|
|
|
|
// PetAllNum 所有精灵数量
|
|
// 对应 Java 注解: @FieldDescription("所有精灵数量") @UInt
|
|
AllPetNumber uint32 `codec:"true"`
|
|
|
|
// PetMaxLev 精灵最大等级
|
|
// 对应 Java 注解: @FieldDescription("精灵最大等级") @UInt
|
|
PetMaxLevel uint32 `codec:"true"`
|
|
|
|
// BossAchievement spt boos成就 20字节 以任务状态完成 3为击败该boss, 目前spt只有12个, 剩下的长度以3填充
|
|
// 对应 Java 注解: @FieldDescription(...) @ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 20) @Builder.Default
|
|
BossAchievement [20]byte `codec:"true"`
|
|
|
|
// GraduationCount 教官成绩
|
|
// 对应 Java 注解: @FieldDescription("教官成绩") @UInt
|
|
GraduationCount uint32 `codec:"true"`
|
|
|
|
// MonKingWin 精灵王胜场
|
|
// 对应 Java 注解: @FieldDescription("精灵王胜场") @UInt
|
|
MonKingWin uint32 `codec:"true"`
|
|
|
|
// MessWin 大乱斗胜场
|
|
// 对应 Java 注解: @FieldDescription("大乱斗胜场") @UInt
|
|
MessWin uint32 `codec:"true"`
|
|
|
|
// MaxStage 勇者之塔层数
|
|
// 对应 Java 注解: @FieldDescription("勇者之塔层数") @UInt
|
|
MaxStage uint32 `codec:"true"`
|
|
|
|
// MaxArenaWins 星际擂台胜场
|
|
// 对应 Java 注解: @FieldDescription("星际擂台胜场") @UInt
|
|
MaxArenaWins uint32 `codec:"true"`
|
|
}
|
|
|
|
// AimatInboundInfo 对应Java的AimatInboundInfo类
|
|
type AimatInboundInfo struct {
|
|
Head common.TomeeHeader `cmd:"2104" struc:"skip"`
|
|
ItemId uint32 `description:"物品id 射击激光 物品id为0" codec:"auto" uint:"true"`
|
|
ShootType uint32 `description:"射击类型 未知 给0" codec:"auto" uint:"true"`
|
|
Point model.Pos `description:"射击的坐标 x y" codec:"auto"` // 默认值对应@Builder.Default
|
|
}
|
|
|
|
// AimatOutboundInfo 对应Java的AimatOutboundInfo类
|
|
type AimatOutboundInfo struct {
|
|
UserId uint32 `description:"射出子弹的人 米米号" codec:"auto" uint:"true"`
|
|
ItemId uint32 `description:"物品id 射击激光 物品id为0" codec:"auto" uint:"true"`
|
|
ShootType uint32 `description:"射击类型 未知 给0" codec:"auto" uint:"true"`
|
|
Point model.Pos `description:"射击的坐标 x y" codec:"auto"` // 对应@Builder.Default默认值
|
|
}
|
|
|
|
// M
|