hch
10 天以前 eb27e5fd31f73b998a4bbd85511a31e40b8c61b7
Main/System/Login/LoginManager.cs
@@ -66,6 +66,9 @@
        SDKUtils.Instance.onFreePlatformBindOk += OnSDKAccountBindOk;
        LaunchInHot.Instance.OnApplicationOut += OnApplicationOut;
        // #if UNITY_EDITOR
        // GlobalTimeEvent.Instance.MSEvent += OnMSEvent;
        // #endif
    }
    public override void Release()
@@ -82,10 +85,6 @@
        sdkLogined = true;
        sdkLoginResult = _result;
        if (!DebugUtility.Instance.isWhiteListAccount)
        {
            DebugUtility.Instance.RequestWhiteListAuthority(sdkLoginResult.account);
        }
        ServerListCenter.Instance.RequestServerListPlayer(sdkLoginResult.account);
        SDKUtils.Instance.MakeKeyAndVisible();
@@ -247,9 +246,12 @@
    {
        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
        {
@@ -257,6 +259,13 @@
        }
    }
    // void OnMSEvent()
    // {
    //     //测试用 测试登录流程中一直发无用的包是否影响登录
    //     var pack = new CA504_tagCMPlayerGetReward();
    //     GameNetSystem.Instance.SendInfo(pack);
    // }
    public void AccessLogin(H0101_tagServerPrepared _serverInfo)
    {
@@ -295,6 +304,7 @@
    public C0101_tagCPlayerLogin Get0101SendPackage(H0101_tagServerPrepared _serverInfo)
    {
        GameNetSystem.Instance.SetIsWaitLogin(false);
        var send = new C0101_tagCPlayerLogin();
        switch (VersionConfig.Get().versionAuthority)
        {
@@ -317,22 +327,22 @@
                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;
@@ -356,15 +366,15 @@
                {
                    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);
    }
}