Beispiel #1
0
        public void OnCreateAccountSuccess(SCCreateAccountAck ack)
        {
            SettingHelper.SetString(SettingDefine.AccountName, ack.AccountName);
            SettingHelper.SetString(SettingDefine.Password, ack.Passwd);
            //ack.LoginSess;
            //add user
            LoginModel.Instance.OnCreateAccount(ack);

            EnterGame();
        }
Beispiel #2
0
        public void OnCreateAccount(SCCreateAccountAck ack)
        {
            RecentUserId = ack.UserId;
            msgLoginUserInfo userInfo = new msgLoginUserInfo();

            userInfo.UserId   = ack.UserId;
            userInfo.UserNick = ack.UserId.ToString();
            userInfo.ServerId = SelectServerId;
            m_UserDict.Add(RecentUserId, userInfo);

            m_LoginSession = ack.LoginSess;
        }
Beispiel #3
0
    public void OnLoginScCreateAccountAck(byte[] buffer, Int64 errCode)
    {
        SCCreateAccountAck msg = new SCCreateAccountAck();

        msg = SCCreateAccountAck.Parser.ParseFrom(buffer);
        if (msg == null)
        {
            Debug.LogError("parse msg faild SCCreateAccountAck");
            return;
        }

        if (msg.Result == (int)ErrorCode.NoError)
        {
            LoginControl.Instance.OnCreateAccountSuccess(msg);

            Debug.Log("register visitor success," + msg.AccountName + "," + msg.Passwd);
        }
        else
        {
            //EventCenter.Broadcast<int>(EGameEvent.eGameEvent_InitGameFinish, msg.Result);
            EventCenter.Broadcast(EGameEvent.eGameEvent_InitGameFinish);
        }
    }