优化注册与登录流程

This commit is contained in:
flswld
2023-04-04 18:09:14 +08:00
parent 4bc835e0b1
commit d542647f55
22 changed files with 474 additions and 600 deletions

View File

@@ -141,10 +141,10 @@ func (g *Game) GetAi() *model.Player {
}
func (g *Game) CreateRobot(uid uint32, name string, sign string) *model.Player {
GAME.OnRegOk(false, &proto.SetPlayerBornDataReq{AvatarId: 10000007, NickName: name}, uid, 0, "")
GAME.ServerAppidBindNotify(uid, "", 0)
g.OnLogin(uid, 0, "", nil, 0)
robot := USER_MANAGER.GetOnlineUser(uid)
robot.DbState = model.DbNormal
g.SetPlayerBornDataReq(robot, &proto.SetPlayerBornDataReq{AvatarId: 10000007, NickName: name})
robot.SceneLoadState = model.SceneEnterDone
robot.Signature = sign
return robot