Exemple #1
0
    public override void OnOperationResponse(OperationResponse operationResponse)
    {
        if (operationResponse.ReturnCode == (short)ReturnCode.Success)
        {
            NetDataLoad.Player(operationResponse.Parameters);
            switch (_loadPlayerDataCode)
            {
            case LoadPlayeDataOverCode.Defalut:
                break;

            case LoadPlayeDataOverCode.RefreshUIByMainCityWnd:
                MainCitySys.Instance.RefreshUIByMainCityWnd();
                break;

            case LoadPlayeDataOverCode.RefreshUIByStrongWnd:
                MainCitySys.Instance.RefreshUIByStrongWnd(_index);
                MainCitySys.Instance.RefreshUIByMainCityWnd();
                TaskSys.Instance.CalcTaskPrgs(3);
                break;

            case LoadPlayeDataOverCode.RefreshUIByTaskWnd:
                MainCitySys.Instance.RefreshUIByMainCityWnd();
                TaskSys.Instance.RefreshUITaskWnd();
                break;

            default:
                break;
            }
        }
        else
        {
            GameRoot.AddTips("该ID角色游戏数据读取失败!请检查该ID是否存在!");
        }
        NetSvc.Instance.RemoveRequest(this);
    }
Exemple #2
0
    public override void OnOperationResponse(OperationResponse operationResponse)
    {
        if (operationResponse.ReturnCode == (short)ReturnCode.Success)
        {
            NetDataLoad.Player(operationResponse.Parameters);

            if (PlayerData.playerID != 0)
            {
                NetGetPlayerData netGetPlayerData = new NetGetPlayerData(PlayerData.playerID);
                LoginSys.Instance.RspEnterGame();
            }
            else
            {
                LoginSys.Instance.RspCreatePlayer();
            }
        }
        else if (operationResponse.ReturnCode == (short)ReturnCode.Default)
        {
            GameRoot.AddTips("登录失败,该账号已经在线!");
        }
        else
        {
            NetRegister netRegister = new NetRegister(_acct, _password);
        }
        NetSvc.Instance.RemoveRequest(this);
    }
Exemple #3
0
 public override void OnOperationResponse(OperationResponse operationResponse)
 {
     if (operationResponse.ReturnCode == (short)ReturnCode.Success)
     {
         PlayerData.playerName = _playerName;
         NetDataLoad.Player(operationResponse.Parameters);
         GameRoot.AddTips("角色创建成功!");
         MainCitySys.Instance.EnterMainCity();
     }
     else
     {
         GameRoot.AddTips("该名称重复,请重新输入!");
     }
     NetSvc.Instance.RemoveRequest(this);
 }