完善登录流程的错误处理

This commit is contained in:
flswld
2023-02-11 21:08:44 +08:00
parent 4380aea9aa
commit b5b5cf59a5
17 changed files with 253 additions and 144 deletions

View File

@@ -27,12 +27,12 @@ type Avatar struct {
FetterLevel uint8 `bson:"fetterLevel"` // 好感度等级
FetterExp uint32 `bson:"fetterExp"` // 好感度经验
PromoteRewardMap map[uint32]bool `bson:"promoteRewardMap"` // 突破奖励 map[突破等级]是否已被领取
Guid uint64 `bson:"-"`
EquipGuidMap map[uint64]uint64 `bson:"-"`
EquipWeapon *Weapon `bson:"-"`
EquipReliquaryList []*Reliquary `bson:"-"`
FightPropMap map[uint32]float32 `bson:"-"`
ExtraAbilityEmbryos map[string]bool `bson:"-"`
Guid uint64 `bson:"-" msgpack:"-"`
EquipGuidMap map[uint64]uint64 `bson:"-" msgpack:"-"`
EquipWeapon *Weapon `bson:"-" msgpack:"-"`
EquipReliquaryList []*Reliquary `bson:"-" msgpack:"-"`
FightPropMap map[uint32]float32 `bson:"-" msgpack:"-"`
ExtraAbilityEmbryos map[string]bool `bson:"-" msgpack:"-"`
}
func (p *Player) InitAllAvatar() {

View File

@@ -5,7 +5,7 @@ import "hk4e/common/constant"
type Item struct {
ItemId uint32 `bson:"itemId"` // 道具id
Count uint32 `bson:"count"` // 道具数量
Guid uint64 `bson:"-"`
Guid uint64 `bson:"-" msgpack:"-"`
}
func (p *Player) InitAllItem() {

View File

@@ -62,6 +62,7 @@ type Player struct {
DbState int `bson:"-" msgpack:"-"` // 数据库存档状态
WorldId uint32 `bson:"-" msgpack:"-"` // 所在的世界id
GameObjectGuidCounter uint64 `bson:"-" msgpack:"-"` // 游戏对象guid计数器
LastKeepaliveTime uint32 `bson:"-" msgpack:"-"` // 上一次保持活跃时间
ClientTime uint32 `bson:"-" msgpack:"-"` // 玩家客户端的本地时钟
ClientRTT uint32 `bson:"-" msgpack:"-"` // 玩家客户端往返时延
GameObjectGuidMap map[uint64]GameObject `bson:"-" msgpack:"-"` // 游戏对象guid映射表

View File

@@ -15,7 +15,7 @@ type Reliquary struct {
AffixIdList []uint32 `bson:"affixIdList"` // 词缀
MainPropId uint32 `bson:"mainPropId"` // 主词条id
AvatarId uint32 `bson:"avatarId"` // 装备角色id
Guid uint64 `bson:"-"`
Guid uint64 `bson:"-" msgpack:"-"`
}
func (p *Player) InitReliquary(reliquary *Reliquary) {

View File

@@ -36,8 +36,8 @@ type TeamInfo struct {
TeamList []*Team `bson:"teamList"`
CurrTeamIndex uint8 `bson:"currTeamIndex"`
CurrAvatarIndex uint8 `bson:"currAvatarIndex"`
TeamResonances map[uint16]bool `bson:"-"`
TeamResonancesConfig map[int32]bool `bson:"-"`
TeamResonances map[uint16]bool `bson:"-" msgpack:"-"`
TeamResonancesConfig map[int32]bool `bson:"-" msgpack:"-"`
}
func NewTeamInfo() (r *TeamInfo) {

View File

@@ -15,7 +15,7 @@ type Weapon struct {
AffixIdList []uint32 `bson:"affixIdList"` // 词缀
Refinement uint8 `bson:"refinement"` // 精炼等阶
AvatarId uint32 `bson:"avatarId"` // 装备角色id
Guid uint64 `bson:"-"`
Guid uint64 `bson:"-" msgpack:"-"`
}
func (p *Player) InitWeapon(weapon *Weapon) {