From af8dafd75f9a6fae017734d58fc7b34d6bdcd0f4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 25 八月 2025 22:03:51 +0800
Subject: [PATCH] 0312 开启限帧

---
 Main/SDK/SDKUtils.cs |  160 ++++++++++++++++------------------------------------
 1 files changed, 50 insertions(+), 110 deletions(-)

diff --git a/Main/SDK/SDKUtils.cs b/Main/SDK/SDKUtils.cs
index 041f154..80c40dd 100644
--- a/Main/SDK/SDKUtils.cs
+++ b/Main/SDK/SDKUtils.cs
@@ -18,23 +18,9 @@
 
     public enum E_ChannelPlatform
     {
-        Free = 1,// 鑷敱
-        Mr = 2,// 鐚��
-        Sp = 3,// 鎬濈挒
-        Js = 4,// 鏋侀��
-        Yj = 5,// 鏄撴帴
-        Yl = 6,// 鏄撲箰
-        Xn = 7,// 灏忕墰
-        Cjm = 8,// 瓒呯骇姊�
-        Ky = 9,//鎭鸿嫳
+        Free = 1,// 榛樿
         Quick = 10, //quick
-        SanXia = 11, //涓夊场锛堟腐鍙颁娇鐢級
-        SanXiaiOS = 12, //涓夊场 锛堟腐鍙癷os浣跨敤锛�
         Hy = 15, //娆㈡父
-        hygt = 16, //娆㈡父娓彴
-        mlgt = 17, //鍜櫆娓彴
-        newyn = 19, //鏂扮殑瓒婂崡锛堟娓�0.1锛�
-        en = 20, //鑻辨枃鐗�
     }
 
     //鏉冮檺鐢宠鍥炶皟
@@ -389,54 +375,7 @@
         switch (Application.platform)
         {
             case RuntimePlatform.Android:
-                if (ChannelPlatform == E_ChannelPlatform.Sp)
-                {
-                    using (AndroidJavaClass _jc = new AndroidJavaClass("com.sp.sdk.utils.SDKManagerUtils"))
-                    {
-                        using (AndroidJavaObject _jo = _jc.CallStatic<AndroidJavaObject>("getAssetPropConfig", GetApplicationContext(), "plugin_config.properties"))
-                        {
-                            _result = _jo.Call<string>("get", "game_id");
-                        }
-                    }
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.Mr)
-                {
-                    using (AndroidJavaClass _jc = new AndroidJavaClass("com.secondworld.univeralsdk.UniversalUtil"))
-                    {
-                        _result = _jc.CallStatic<string>("getMetaString", "Mr_GAME_ID");
-                    }
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.Js)
-                {
-                    using (AndroidJavaClass _jc = new AndroidJavaClass("com.secondworld.univeralsdk.UniversalUtil"))
-                    {
-                        _result = _jc.CallStatic<string>("getMetaString", "LL_APPID");
-                    }
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.Free)
-                {
-                    _result = "freeplatform";
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.Yl)
-                {
-                    _result = "yileplatform";
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.Ky)
-                {
-                    _result = "kyplatform";
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.hygt)
-                {
-                    _result = "hygt";
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.newyn)
-                {
-                    _result = "vn";
-                }
-                else if (ChannelPlatform == E_ChannelPlatform.en)
-                {
-                    _result = "en";
-                }
+                _result = "android";
                 break;
             case RuntimePlatform.IPhonePlayer:
                 _result = "ios";//ios骞冲彴鍥哄畾杩斿洖ios
@@ -662,7 +601,7 @@
 //             case CodeA2U.ExitGame:
 //                 if (ChannelPlatform == E_ChannelPlatform.Free)
 //                 {
-//                     vnxbqy.UI.WindowCenter.Instance.Open<vnxbqy.UI.ExitGameWin>();
+//                     WindowCenter.Instance.Open<ExitGameWin>();
 //                 }
 //                 else
 //                 {
@@ -1016,53 +955,53 @@
     public void FreePlatformPay(string title, float money, string cpInfo)
     {
         // 鎻愮ず鏄惁浣跨敤浠i噾鍒�
-        // var gameCash = UIHelper.GetAllVourcher();
+        var gameCash = UIHelper.GetAllVourcher();
 
-        // bool isBuyGameCash = false; //浠i噾鍒告湰韬殑鍏呭�间笉鑳界敤浠i噾鍒歌喘涔� 閫犳垚寰幆
-        // int ctgID = ModelCenter.Instance.GetModel<VipModel>().orderInfoToCTGID[cpInfo];
-        // if (ctgID != 0)
-        // {
-        //     isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17;
-        // }
+        bool isBuyGameCash = false; //浠i噾鍒告湰韬殑鍏呭�间笉鑳界敤浠i噾鍒歌喘涔� 閫犳垚寰幆
+        int ctgID = RechargeManager.Instance.orderInfoToCTGID[cpInfo];
+        if (ctgID != 0)
+        {
+            isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17;
+        }
 
 
-        // if (!isBuyGameCash && gameCash >= money * 100 && !LoginAwardModel.rechargeLimit.Contains(ctgID))
-        // {
+        if (!isBuyGameCash && gameCash >= money * 100)
+        {
 
-        //     WindowCenter.Instance.Close<GotoChargeWin>();
-        //     if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip))
-        //     {
-        //         var pack = new CA125_tagCMCoinBuyOrderInfo();
-        //         pack.AppID = VersionConfig.Get().appId;
-        //         pack.AppIDLen = (byte)pack.AppID.Length;
-        //         pack.OrderInfo = cpInfo;
-        //         pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
-        //         GameNetSystem.Instance.SendInfo(pack);
-        //     }
-        //     else
-        //     {
-        //         ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) =>
-        //         {
-        //             if (isOk)
-        //             {
-        //                 var pack = new CA125_tagCMCoinBuyOrderInfo();
-        //                 pack.AppID = VersionConfig.Get().appId;
-        //                 pack.AppIDLen = (byte)pack.AppID.Length;
-        //                 pack.OrderInfo = cpInfo;
-        //                 pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
-        //                 GameNetSystem.Instance.SendInfo(pack);
-        //             }
-        //             if (isToggle)
-        //             {
-        //                 DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true);
-        //             }
-        //         });
-        //     }
-        // }
-        // else
-        // { 
-        //     FreePlatformPayEx(title, money, cpInfo);
-        // }
+            UIManager.Instance.CloseWindow<GotoChargeWin>();
+            if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip))
+            {
+                var pack = new CA125_tagCMCoinBuyOrderInfo();
+                pack.AppID = VersionConfig.Get().appId;
+                pack.AppIDLen = (byte)pack.AppID.Length;
+                pack.OrderInfo = cpInfo;
+                pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
+                GameNetSystem.Instance.SendInfo(pack);
+            }
+            else
+            {
+                ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("GameCashRule1", money), Language.Get("TodayNoNotify"), (bool isOk, bool isToggle) =>
+                {
+                    if (isOk)
+                    {
+                        var pack = new CA125_tagCMCoinBuyOrderInfo();
+                        pack.AppID = VersionConfig.Get().appId;
+                        pack.AppIDLen = (byte)pack.AppID.Length;
+                        pack.OrderInfo = cpInfo;
+                        pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
+                        GameNetSystem.Instance.SendInfo(pack);
+                    }
+                    if (isToggle)
+                    {
+                        DayRemind.Instance.SetDayRemind(DayRemind.DJQTip, true);
+                    }
+                });
+            }
+        }
+        else
+        { 
+            FreePlatformPayEx(title, money, cpInfo);
+        }
     }
 
     public void FreePlatformPayEx(string title, float money, string cpInfo)
@@ -1379,11 +1318,12 @@
 
     public void RoleLoginOut()
     {
-        if (PlayerDatas.Instance.PlayerId == 0/* || PlayerDatas.Instance.hero == null*/)
+        if (PlayerDatas.Instance.PlayerId == 0)
+            return;
+        
+        if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin) 
             return;
 
-        
-        // TODO YYL if (DTC0403_tagPlayerLoginLoadOK.neverLoginOk) return;
         m_Json.Clear();
         m_Json["code"] = CodeU2A.RoleLoginOut;
 

--
Gitblit v1.8.0