mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
优化注册与登录流程
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user