| | |
| | | SDKUtils.Instance.onFreePlatformBindOk += OnSDKAccountBindOk; |
| | | |
| | | LaunchInHot.Instance.OnApplicationOut += OnApplicationOut; |
| | | // #if UNITY_EDITOR |
| | | // GlobalTimeEvent.Instance.MSEvent += OnMSEvent; |
| | | // #endif |
| | | } |
| | | |
| | | public override void Release() |
| | |
| | | sdkLogined = true; |
| | | sdkLoginResult = _result; |
| | | |
| | | if (!DebugUtility.Instance.isWhiteListAccount) |
| | | { |
| | | DebugUtility.Instance.RequestWhiteListAuthority(sdkLoginResult.account); |
| | | } |
| | | |
| | | ServerListCenter.Instance.RequestServerListPlayer(sdkLoginResult.account); |
| | | SDKUtils.Instance.MakeKeyAndVisible(); |
| | |
| | | { |
| | | if (ok) |
| | | { |
| | | GameNetSystem.Instance.SetIsWaitLogin(false); |
| | | GameNetSystem.Instance.SetIsWaitLoginMap(true); |
| | | var sendInfo = new C0123_tagCClientPackVersion(); |
| | | sendInfo.Version = DwVersionNo; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | GameNetSystem.Instance.SetIsWaitLogin(true); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | // void OnMSEvent() |
| | | // { |
| | | // //测试用 测试登录流程中一直发无用的包是否影响登录 |
| | | // var pack = new CA504_tagCMPlayerGetReward(); |
| | | // GameNetSystem.Instance.SendInfo(pack); |
| | | |
| | | // } |
| | | |
| | | public void AccessLogin(H0101_tagServerPrepared _serverInfo) |
| | | { |
| | |
| | | |
| | | public C0101_tagCPlayerLogin Get0101SendPackage(H0101_tagServerPrepared _serverInfo) |
| | | { |
| | | GameNetSystem.Instance.SetIsWaitLogin(false); |
| | | var send = new C0101_tagCPlayerLogin(); |
| | | switch (VersionConfig.Get().versionAuthority) |
| | | { |
| | |
| | | send.ExtraLen = 0; |
| | | send.Extra = ""; |
| | | break; |
| | | case VersionAuthority.Release:
|
| | | {
|
| | | var deviceInfo = DeviceUtility.GetDeviceModel();
|
| | | deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", "");
|
| | | var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo);
|
| | |
|
| | | case VersionAuthority.Release: |
| | | { |
| | | var deviceInfo = DeviceUtility.GetDeviceModel(); |
| | | deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", ""); |
| | | var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo); |
| | | |
| | | send.Extra = StringUtility.Contact(VersionConfig.Get().SpID, "|", |
| | | SDKUtils.Instance.Device.uniqueID, "|", |
| | | sdkLoginResult.token, "|", |
| | | sdkLoginResult.qkUserName, "|", |
| | | versionStr.Substring(0, Math.Min(24, versionStr.Length)));
|
| | |
|
| | |
|
| | | Debug.Log("=====> extra: " + send.Extra);
|
| | | send.ExtraLen = (ushort)send.Extra.Length;
|
| | |
|
| | | versionStr.Substring(0, Math.Min(24, versionStr.Length))); |
| | | |
| | | |
| | | Debug.Log("=====> extra: " + send.Extra); |
| | | send.ExtraLen = (ushort)send.Extra.Length; |
| | | |
| | | send.IDType = (byte)SDKUtils.Instance.ChannelPlatform; |
| | | send.Password = sdkLoginResult.token; |
| | | send.AccID = sdkLoginResult.account; |
| | |
| | | { |
| | | send.Adult = 0; |
| | | } |
| | | break;
|
| | | }
|
| | | break; |
| | | } |
| | | } |
| | | |
| | | return send; |
| | | } |
| | | |
| | | public string GetVersionStr() |
| | | {
|
| | | return StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", InitialFunctionConfig.Get("version").Numerical1);
|
| | | { |
| | | return StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", InitialFunctionConfig.Get("version").Numerical1); |
| | | } |
| | | } |