Exemplo n.º 1
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);
    }
Exemplo n.º 2
0
 public override void OnOperationResponse(OperationResponse operationResponse)
 {
     if (operationResponse.ReturnCode == (short)ReturnCode.Success)
     {
         NetGetPlayerData netGetPlayerData = new NetGetPlayerData(PlayerData.playerID, LoadPlayeDataOverCode.RefreshUIByMainCityWnd);
     }
     else
     {
     }
     NetSvc.Instance.RemoveRequest(this);
 }
Exemplo n.º 3
0
 public override void OnOperationResponse(OperationResponse operationResponse)
 {
     if (operationResponse.ReturnCode == (short)ReturnCode.Success)
     {
         GameRoot.AddTips("强化成功");
         NetGetPlayerData netGetPlayerData = new NetGetPlayerData(PlayerData.playerID, LoadPlayeDataOverCode.RefreshUIByStrongWnd, _pos);
     }
     else
     {
     }
     NetSvc.Instance.RemoveRequest(this);
 }
Exemplo n.º 4
0
    public override void OnOperationResponse(OperationResponse operationResponse)
    {
        if (operationResponse.ReturnCode == (byte)ReturnCode.Success)
        {
            TaskRewardCfg trc = ResSvc.Instance.GetTaskRewardCfg(_tid);
            GameRoot.AddTips("任务奖励领取成功!金币+" + trc.coin + "--经验+" + trc.exp);

            ComTools.CalcExp(trc.exp);
        }

        NetGetPlayerData netGetPlayerData2 = new NetGetPlayerData(PlayerData.playerID, LoadPlayeDataOverCode.RefreshUIByTaskWnd);


        NetSvc.Instance.RemoveRequest(this);
    }
Exemplo n.º 5
0
    public override void OnOperationResponse(OperationResponse operationResponse)
    {
        if (operationResponse.ReturnCode == (byte)ReturnCode.Success)
        {
            switch (_buyCode)
            {
            case BuyCode.Coin:
                GameRoot.AddTips("充值成功!!");
                TaskSys.Instance.CalcTaskPrgs(5);
                break;

            case BuyCode.Power:
                GameRoot.AddTips("体力购买成功!!");
                TaskSys.Instance.CalcTaskPrgs(4);
                break;

            default:
                break;
            }
        }
        NetGetPlayerData netGetPlayerData = new NetGetPlayerData(PlayerData.playerID, LoadPlayeDataOverCode.RefreshUIByMainCityWnd);

        NetSvc.Instance.RemoveRequest(this);
    }