mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
拆分了聊天数据,减小玩家数据结构大小
This commit is contained in:
@@ -149,13 +149,13 @@ func (g *GameManager) LoginNotify(userId uint32, player *model.Player, clientSeq
|
||||
g.GCGLogin(player) // 发送GCG登录相关的通知包
|
||||
playerLoginRsp := &proto.PlayerLoginRsp{
|
||||
IsUseAbilityHash: true,
|
||||
AbilityHashCode: -228935105,
|
||||
AbilityHashCode: 0,
|
||||
GameBiz: "hk4e_cn",
|
||||
IsScOpen: false,
|
||||
RegisterCps: "taptap",
|
||||
CountryCode: "CN",
|
||||
Birthday: "2000-01-01",
|
||||
TotalTickTime: 1185941.871788,
|
||||
TotalTickTime: 0.0,
|
||||
}
|
||||
g.SendMsg(cmd.PlayerLoginRsp, userId, clientSeq, playerLoginRsp)
|
||||
}
|
||||
@@ -165,7 +165,7 @@ func (g *GameManager) PacketPlayerDataNotify(player *model.Player) *proto.Player
|
||||
NickName: player.NickName,
|
||||
ServerTime: uint64(time.Now().UnixMilli()),
|
||||
IsFirstLoginToday: true,
|
||||
RegionId: player.RegionId,
|
||||
RegionId: 1,
|
||||
PropMap: make(map[uint32]*proto.PropValue),
|
||||
}
|
||||
for k, v := range player.PropertiesMap {
|
||||
@@ -344,7 +344,6 @@ func (g *GameManager) CreatePlayer(userId uint32, nickName string, mainCharAvata
|
||||
player.FriendList = make(map[uint32]bool)
|
||||
player.FriendApplyList = make(map[uint32]bool)
|
||||
|
||||
player.RegionId = 1
|
||||
player.SceneId = 3
|
||||
|
||||
player.PropertiesMap = make(map[uint16]uint32)
|
||||
@@ -397,7 +396,6 @@ func (g *GameManager) CreatePlayer(userId uint32, nickName string, mainCharAvata
|
||||
player.AvatarMap = make(map[uint32]*model.Avatar)
|
||||
player.GameObjectGuidMap = make(map[uint64]model.GameObject)
|
||||
player.DropInfo = model.NewDropInfo()
|
||||
player.ChatMsgMap = make(map[uint32][]*model.ChatMsg)
|
||||
player.GCGInfo = model.NewGCGInfo()
|
||||
|
||||
// 添加选定的主角
|
||||
@@ -418,5 +416,7 @@ func (g *GameManager) CreatePlayer(userId uint32, nickName string, mainCharAvata
|
||||
player.TeamConfig = model.NewTeamInfo()
|
||||
player.TeamConfig.GetActiveTeam().SetAvatarIdList([]uint32{mainCharAvatarId})
|
||||
|
||||
player.ChatMsgMap = make(map[uint32][]*model.ChatMsg)
|
||||
|
||||
return player
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user