/// <summary> /// 创建实例 /// </summary> public static PlayerLoginForOfflineRequest create(long playerID, SList <ClientOfflineWorkData> records, int clientRandomSeedIndex) { PlayerLoginForOfflineRequest re = (PlayerLoginForOfflineRequest)BytesControl.createRequest(dataID); re.playerID = playerID; re.records = records; re.clientRandomSeedIndex = clientRandomSeedIndex; return(re); }
/** 选择角色登录 */ 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(); } } }