Example #1
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PlayerLoginRequest create(long playerID)
    {
        PlayerLoginRequest re = (PlayerLoginRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
Example #2
0
    /** 选择角色登录 */
    protected virtual void stepPlayerLogin()
    {
        if (CommonSetting.isSingleGame)
        {
            GameC.offline.loadPlayer(1);

            PlayerListData listData = GameC.offline.getListData();

            showSinglePlayerLogin(listData);
        }
        else
        {
            long playerID = _playerList[0].playerID;

            if (CommonSetting.useOfflineGame)
            {
                GameC.offline.loadPlayer(playerID);

                ClientOfflineWorkListData listData = GameC.offline.getOfflineWorkListData();

                SList <ClientOfflineWorkData> list = new SList <ClientOfflineWorkData>();

                if (listData != null)
                {
                    list.addAll(listData.list);
                }

                Ctrl.log("发送离线登录");

                PlayerLoginForOfflineRequest.create(playerID, list, listData != null ? listData.clientRandomSeedIndex : 0).send();
            }
            else
            {
                //登录
                PlayerLoginRequest.create(playerID).send();
            }
        }
    }
 private Task HandlePlayerLogin(PlayerLoginRequest request)
 {
     return(ShardSession.Login(request.CharacterId));
 }