소스 검색

Merge remote-tracking branch 'remotes/origin/master' into zhaoyang

zhaoyang 2 년 전
부모
커밋
26662be0fe

+ 5 - 3
FGUIProject/assets/EnduringGiftBox/components/BtnBuy.xml

@@ -4,9 +4,11 @@
   <displayList>
     <image id="n3_qqhz" name="bagGrey" src="qqhzm" fileName="images/cz_an_grey.png" xy="0,0"/>
     <image id="n6_yjmk" name="bagYellow" src="yjmk2y" fileName="images/button.png" xy="0,0"/>
-    <text id="n1_qqhz" name="txtNewPrice" xy="134,2" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
-    <text id="n2_qqhz" name="txtOldPrice" xy="21,2" size="84,69" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#fffdf4" align="center" vAlign="middle" autoSize="shrink" strike="true" text="86"/>
-    <loader id="n5_yjmk" name="loaIcon" xy="104,22" size="38,34" fill="scale" shrinkOnly="true"/>
+    <text id="n2_qqhz" name="txtOldPrice" xy="21,2" size="84,69" group="n7_naid" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#fffdf4" align="right" vAlign="middle" autoSize="shrink" strike="true" text="86"/>
+    <loader id="n5_yjmk" name="loaIcon" xy="105,22" size="38,34" group="n7_naid" fill="scale" shrinkOnly="true"/>
+    <text id="n1_qqhz" name="txtNewPrice" xy="143,2" size="104,69" group="n7_naid" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
+    <group id="n7_naid" name="n7" xy="21,2" size="226,69" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <text id="n8_naid" name="txtSoldOut" xy="26,8" size="208,53" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#fffdf4" align="center" vAlign="middle" autoSize="none" text=""/>
   </displayList>
   <Button/>
 </component>

+ 1 - 0
FGUIProject/assets/EnduringGiftBox/components/BtnBuyPink.xml

@@ -7,6 +7,7 @@
     <text id="n1_qqhz" name="txtNewPrice" xy="166,13" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="300元"/>
     <text id="n2_qqhz" name="txtOldPrice" xy="47,13" size="84,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" align="right" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
     <loader id="n5_yjmk" name="loaIcon" xy="122,30" size="33,31" fill="scale" shrinkOnly="true"/>
+    <text id="n8_naid" name="txtSoldOut" xy="49,13" size="218,69" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#fffdf4" align="center" vAlign="middle" autoSize="none" text=""/>
   </displayList>
   <Button/>
 </component>

+ 2 - 2
FGUIProject/assets/EnduringGiftBox/components/ComSpecialOfferGiftBoxItem.xml

@@ -3,8 +3,8 @@
   <displayList>
     <image id="n0_yjmk" name="nczlb" src="qqhzg" fileName="images/cz_lb_db.png" xy="0,0" size="940,220" group="n8_yjmk"/>
     <text id="n2_yjmk" name="txtBoxItemName" xy="55,7" size="459,44" group="n8_yjmk" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#cc9974" autoSize="none" text="体力补给礼包"/>
-    <component id="n3_yjmk" name="btnBuy" src="qqhzy" fileName="components/BtnBuy.xml" xy="660,85" size="261,73" group="n8_yjmk"/>
-    <graph id="n11_fter" name="holderBtn" xy="788,116" size="80,56" group="n8_yjmk"/>
+    <component id="n3_yjmk" name="btnBuy" src="qqhzy" fileName="components/BtnBuy.xml" xy="660,85" size="261,72" group="n8_yjmk"/>
+    <graph id="n11_fter" name="holderBtn" xy="791,119" size="35,31" group="n8_yjmk" scale="1,0.985"/>
     <image id="n4_yjmk" name="n4" src="qqhz8" fileName="images/lm_dt_tsdb_2.png" xy="679,8" group="n8_yjmk"/>
     <text id="n5_yjmk" name="txtUrc" xy="714,13" size="216,42" group="n8_yjmk" rotation="-0.6" fontSize="28" color="#cc6960" align="center" leading="0" autoSize="none" text="今日限购1/1"/>
     <text id="n6_yjmk" name="txtGetJf" xy="660,165" size="269,33" group="n8_yjmk" fontSize="28" color="#c69652" align="center" autoSize="none" text="可获得120会员积分"/>

+ 1 - 1
FGUIProject/assets/Task/OpenBattlePassUI.xml

@@ -6,7 +6,7 @@
       <relation target="" sidePair="right-right,top-top"/>
     </component>
     <image id="n3_or80" name="n3" src="uxxstmv" fileName="images/lm_biaotizi_12.png" xy="248,83"/>
-    <text id="n4_or80" name="n4" xy="186,130" size="228,39" fontSize="28" color="#b79f7d" text="解锁特别造奖励"/>
+    <text id="n4_or80" name="n4" xy="186,130" size="228,39" fontSize="28" color="#b79f7d" text="解锁特别造奖励"/>
     <image id="n5_or80" name="n5" src="wm603t" fileName="imagesNew/lm_zhuangshixian_duan.png" pkg="eg2y0ldp" xy="148,488"/>
     <list id="n6_or80" name="Rewards" xy="183,173" size="724,309" layout="flow_hz" overflow="scroll" lineGap="4" colGap="26" defaultItem="ui://eg2y0ldp9jv6tls" autoClearItems="true">
       <item/>

+ 2 - 1
GameClient/Assets/BuildSetting.asset

@@ -16,6 +16,7 @@ MonoBehaviour:
   - Assets/Res/Animation/Card
   - Assets/Res/Animation/DressUp
   - Assets/Res/Effect/DressUp
+  - Assets/Res/Effect/DressUpAni
   - Assets/Res/Effect/UI
   - Assets/ResIn/UI
   - Assets/ResIn/Dll
@@ -26,4 +27,4 @@ MonoBehaviour:
   - texture_dressup_ts_
   - texture_dressup_xz_
   - texture_dressup_zr_
-  - prefab
+  - prefab_

+ 1 - 0
GameClient/Assets/BuildSetting1.asset

@@ -16,6 +16,7 @@ MonoBehaviour:
   - Assets/Res/Animation/Card
   - Assets/Res/Animation/DressUp
   - Assets/Res/Effect/DressUp
+  - Assets/Res/Effect/DressUpAni
   - Assets/Res/Effect/UI
   - Assets/ResIn/UI
   - Assets/ResIn/Dll

+ 107 - 3
GameClient/Assets/Editor/Xasset/Builds/BuildTask.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 using GFGEditor;
+using GFGGame;
 using UnityEditor;
 using UnityEngine;
 
@@ -77,16 +78,112 @@ namespace VEngine.Editor.Builds
 
         public void BuildCustomBundles(string[] resRootDirNames, string setName)
         {
+            List<string> hideFilePathList = new List<string>();
+            List<string> hideDirPahtList = new List<string>();
+            //换装资源打包屏蔽
+            SqliteController.Instance.dirPath = Path.Combine(Environment.CurrentDirectory, ResPathUtil.CONFIG_DIR_PATH);
+            SqliteController.Instance.Init(false, null);
+            var dressUpItemList = ItemCfgArray.Instance.GetCfgsByitemType(ConstItemType.DRESS_UP);
+            foreach (var itemCfg in dressUpItemList)
+            {
+                if (itemCfg.isHide <= 0)
+                {
+                    continue;
+                }
+                if (!string.IsNullOrEmpty(itemCfg.resLayer1))
+                {
+                    HideItemRes(itemCfg, 1, hideFilePathList, hideDirPahtList);
+                }
+                if (!string.IsNullOrEmpty(itemCfg.resLayer2))
+                {
+                    HideItemRes(itemCfg, 2, hideFilePathList, hideDirPahtList);
+                }
+                if (!string.IsNullOrEmpty(itemCfg.resLayer3))
+                {
+                    HideItemRes(itemCfg, 3, hideFilePathList, hideDirPahtList);
+                }
+            }
+            //套装动作资源打包屏蔽
+            var suitCfgs = SuitCfgArray.Instance.dataArray;
+            foreach(var suitCfg in suitCfgs)
+            {
+                if (suitCfg.isHide <= 0)
+                {
+                    continue;
+                }
+                HideSuitActionRes(suitCfg, hideFilePathList, hideDirPahtList);
+            }
+            //卡牌资源打包屏蔽
+            //var cardCfgs = ItemCfgArray.Instance.GetCfgsByitemType(ConstItemType.CARD);
+            //foreach (var itemCfg in cardCfgs)
+            //{
+            //    if (itemCfg.isHide <= 0)
+            //    {
+            //        continue;
+            //    }
+            //    HideCardRes(itemCfg, hideFilePathList, hideDirPahtList);
+            //}
+
             foreach (var resRootDirName in resRootDirNames)
             {
-                CreateBundles(resRootDirName, setName);
+                CreateBundles(resRootDirName, setName, hideFilePathList, hideDirPahtList);
             }
             CheckAssets();
             EditorUtility.ClearProgressBar();
             FinishBuild();
         }
 
-        private void CreateBundles(string resRootDirName, string setName)
+        private void HideItemRes(ItemCfg itemCfg, int layerId, List<string> hideFilePathList, List<string> hideDirPahtList)
+        {
+            string res = DressUpUtil.GetDressUpItemLayerRes(itemCfg, layerId);
+            //部件图
+            var resPath = ResPathUtil.GetDressUpPath(res, ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType));
+            hideFilePathList.Add(resPath);
+            //动画
+            resPath = ResPathUtil.GetDressUpAnimationDirPath(res);
+            hideDirPahtList.Add(resPath);
+            //特效
+            resPath = ResPathUtil.GetDressUpEffectDirPath(res);
+            hideDirPahtList.Add(resPath);
+            resPath = ResPathUtil.GetDressUpEffectDirPath(res, true);
+            hideDirPahtList.Add(resPath);
+        }
+
+        private void HideSuitActionRes(SuitCfg suitCfg, List<string> hideFilePathList, List<string> hideDirPahtList)
+        {
+            string resPath;
+            //动画
+            if(!string.IsNullOrEmpty(suitCfg.aniRes))
+            {
+                resPath = ResPathUtil.GetDressUpAnimationDirPath(suitCfg.aniRes);
+                hideDirPahtList.Add(resPath);
+            }
+            //特效
+            if (!string.IsNullOrEmpty(suitCfg.effRes))
+            {
+                resPath = ResPathUtil.GetDressUpEffectDirPath(suitCfg.effRes);
+                hideDirPahtList.Add(resPath);
+                resPath = ResPathUtil.GetDressUpEffectDirPath(suitCfg.effRes, true);
+                hideDirPahtList.Add(resPath);
+            }
+        }
+
+        //private void HideCardRes(ItemCfg itemCfg, List<string> hideFilePathList, List<string> hideDirPahtList)
+        //{
+        //    //大图
+        //    var resPath = ResPathUtil.GetCardPath(itemCfg.res);
+        //    hideFilePathList.Add(resPath); 
+        //    //小图
+        //    resPath = ResPathUtil.GetCardSmallPath(itemCfg.res);
+        //    hideFilePathList.Add(resPath);
+        //    //动画
+        //    resPath = ResPathUtil.GetCardAnimationDirPath(itemCfg.res);
+        //    hideDirPahtList.Add(resPath);
+        //    //特效
+        //    //to do...暂时没有
+        //}
+
+        private void CreateBundles(string resRootDirName, string setName, List<string> hideFilePathList, List<string> hideDirPahtList)
         {
             var path = Path.Combine(Application.dataPath, resRootDirName);
             var buildSetting = GFGEditor.BuildSetting.GetBuildSetting(setName);
@@ -101,6 +198,10 @@ namespace VEngine.Editor.Builds
                     file = file.Replace('\\', '/');
                     string curDir = Environment.CurrentDirectory.Replace("\\", "/");
                     string filePath = file.Replace(curDir + "/", "");
+                    if(hideFilePathList.Contains(filePath))
+                    {
+                        return;
+                    }
                     EditorUtility.DisplayProgressBar("采集资源", filePath, 1f);
                     var bundle = filePath.Replace($"Assets/{resRootDirName}/", "");
 
@@ -140,12 +241,15 @@ namespace VEngine.Editor.Builds
                     var targetDirPath = subDirPath.Replace('\\', '/');
                     string curDirPath = Environment.CurrentDirectory.Replace("\\", "/");
                     string subDir = targetDirPath.Replace(curDirPath + "/", "");
+                    if(hideDirPahtList.Contains(subDir))
+                    {
+                        return;
+                    }
                     var bundle = subDir.Replace($"Assets/{resRootDirName}/", "");
                     bundle = bundle.Replace('/', '_');
                     bundle = bundle.ToLower();
                     GFGEditor.FileUtil.ForeachFileInDir(subDirPath, null, (string file) =>
                     {
-                        var ext = Path.GetExtension(file);
                         file = file.Replace('\\', '/');
                         string curDir = Environment.CurrentDirectory.Replace("\\", "/");
                         string filePath = file.Replace(curDir + "/", "");

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

@@ -28,7 +28,8 @@ namespace GFGGame
         {
             get
             {
-                return GlobalCfgArray.globalCfg.maxGetPowerCount + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.MonthCardFriendPowerAdd);
+                var t = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.MonthCardFriendPowerAdd);
+                return GlobalCfgArray.globalCfg.maxGetPowerCount + t * GlobalCfgArray.globalCfg.onceGivePowerCount;
             }
         }
 

+ 19 - 7
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -206,27 +206,39 @@ namespace GFGGame
             assetDisposer.resPath = resPath;
         }
 
-        private static void updateLayerRes(ItemCfg itemCfg, GameObject parentObj, int layerId, bool needSetMask, bool showAni = true)
+        public static string GetDressUpItemLayerRes(ItemCfg itemCfg, int layerId)
         {
-
-            ItemTypeCfg typeCfg = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType);
-
             string res = itemCfg.res;
-            int sortingOrder = typeCfg.defaultLayer;
             switch (layerId)
             {
                 case 1:
                     res = itemCfg.resLayer1 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer1);
                     break;
                 case 2:
-                    sortingOrder = typeCfg.specialLayer;
                     res = itemCfg.resLayer2 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer2);
                     break;
                 case 3:
-                    sortingOrder = typeCfg.thirdlLayer;
                     res = itemCfg.resLayer3 == "n" ? res : string.Format("{0}_{1}", res, itemCfg.resLayer3);
                     break;
             }
+            return res;
+        }
+
+        private static void updateLayerRes(ItemCfg itemCfg, GameObject parentObj, int layerId, bool needSetMask, bool showAni = true)
+        {
+
+            ItemTypeCfg typeCfg = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType);
+
+            string res = GetDressUpItemLayerRes(itemCfg, layerId);
+            int sortingOrder = typeCfg.defaultLayer;
+            if(layerId == 2)
+            {
+                sortingOrder = typeCfg.specialLayer;
+            }
+            else if(layerId == 3)
+            {
+                sortingOrder = typeCfg.thirdlLayer;
+            }
 
             //清理旧的
             var spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, layerId);

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuy.cs

@@ -9,9 +9,10 @@ namespace UI.EnduringGiftBox
         public GButton target;
         public GImage m_bagGrey;
         public GImage m_bagYellow;
-        public GTextField m_txtNewPrice;
         public GTextField m_txtOldPrice;
         public GLoader m_loaIcon;
+        public GTextField m_txtNewPrice;
+        public GTextField m_txtSoldOut;
         public const string URL = "ui://bdi1qe15qqhzy";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "BtnBuy";
@@ -61,17 +62,19 @@ namespace UI.EnduringGiftBox
         {
             m_bagGrey = (GImage)comp.GetChild("bagGrey");
             m_bagYellow = (GImage)comp.GetChild("bagYellow");
-            m_txtNewPrice = (GTextField)comp.GetChild("txtNewPrice");
             m_txtOldPrice = (GTextField)comp.GetChild("txtOldPrice");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+            m_txtNewPrice = (GTextField)comp.GetChild("txtNewPrice");
+            m_txtSoldOut = (GTextField)comp.GetChild("txtSoldOut");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_bagGrey = null;
             m_bagYellow = null;
-            m_txtNewPrice = null;
             m_txtOldPrice = null;
             m_loaIcon = null;
+            m_txtNewPrice = null;
+            m_txtSoldOut = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuyPink.cs

@@ -12,6 +12,7 @@ namespace UI.EnduringGiftBox
         public GTextField m_txtNewPrice;
         public GTextField m_txtOldPrice;
         public GLoader m_loaIcon;
+        public GTextField m_txtSoldOut;
         public const string URL = "ui://bdi1qe15yjmk2q";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "BtnBuyPink";
@@ -64,6 +65,7 @@ namespace UI.EnduringGiftBox
             m_txtNewPrice = (GTextField)comp.GetChild("txtNewPrice");
             m_txtOldPrice = (GTextField)comp.GetChild("txtOldPrice");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+            m_txtSoldOut = (GTextField)comp.GetChild("txtSoldOut");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -72,6 +74,7 @@ namespace UI.EnduringGiftBox
             m_txtNewPrice = null;
             m_txtOldPrice = null;
             m_loaIcon = null;
+            m_txtSoldOut = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs

@@ -68,7 +68,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    int[][] bonus = VipCfgArray.Instance.GetCfg(vipLv).bonusOnceArr;
+                    int[][] bonus = VipCfgArray.Instance.GetCfg(vipLv-1).bonusOnceArr;
                     BonusController.TryShowBonusList(bonus);
                     return true;
                 }

+ 20 - 6
GameClient/Assets/Game/HotUpdate/Utils/ResPathUtil.cs

@@ -106,9 +106,14 @@ namespace GFGGame
         {
             return $"{PREFAB_DIR_PATH}/{res}.{extName}";
         }
+        public static string GetDressUpAnimationDirPath(string res)
+        {
+            return $"{ANIMATION_DIR_PATH}/DressUp/{res}";
+        }
+
         public static string GetDressUpAnimationPath(string res, string extName = "prefab")
         {
-            return $"{ANIMATION_DIR_PATH}/DressUp/{res}/{res}.{extName}";
+            return $"{GetDressUpAnimationDirPath(res)}/{res}.{extName}";
         }
 
         public static bool CheckDressUpAnimationExist(string res, string extName = "prefab")
@@ -121,21 +126,30 @@ namespace GFGGame
             return VEngine.Versions.Contains(resPath);
         }
 
-        public static string GetDressUpEffectPath(string res, bool inAni = false, string extName = "prefab")
+        public static string GetDressUpEffectDirPath(string res, bool inAni = false)
         {
-            if(inAni)
+            if (inAni)
             {
-                return $"{EFFECT_DIR_PATH}/DressUpAni/{res}/{res}.{extName}";
+                return $"{EFFECT_DIR_PATH}/DressUpAni/{res}";
             }
-            return $"{EFFECT_DIR_PATH}/DressUp/{res}/{res}.{extName}";
+            return $"{EFFECT_DIR_PATH}/DressUp/{res}";
+        }
+
+        public static string GetDressUpEffectPath(string res, bool inAni = false, string extName = "prefab")
+        {
+            return $"{GetDressUpEffectDirPath(res, inAni)}/{res}.{extName}";
         }
         public static string GetViewEffectPath(string uiName, string resName, string extName = "prefab")
         {
             return $"{EFFECT_DIR_PATH}/UI/{uiName}/{resName}.{extName}";
         }
+        public static string GetCardAnimationDirPath(string res)
+        {
+            return $"{ANIMATION_DIR_PATH}/Card/{res}";
+        }
         public static string GetCardAnimationPath(string res, string extName = "prefab")
         {
-            return $"{ANIMATION_DIR_PATH}/Card/{res}/{res}.{extName}";
+            return $"{GetCardAnimationDirPath(res)}/{res}.{extName}";
         }
         public static string GetActivityPath(string res, string extName = "jpg")
         {

+ 43 - 21
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -26,13 +26,17 @@ namespace GFGGame
         private List<Transition> _transitionList = new List<Transition>();
 
         private GameObject _gameObject1;
+
         private GameObject _gameObject2;
+
         // private GameObject _gameObject3;
         private GameObject _gameObject4;
         private GameObject _gameObject5;
 
         private GoWrapper _wrapper1;
+
         private GoWrapper _wrapper2;
+
         // private GoWrapper _wrapper3;
         private GoWrapper _wrapper4;
         private GoWrapper _wrapper5;
@@ -94,13 +98,17 @@ namespace GFGGame
 
             Timers.inst.Add(0.8f, 1, (obj) =>
                 {
-                    string resPath4 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_discount_baofa");
-                    SceneController.AddObjectToView(null, null, _ui.m_holderZheKou, resPath4,
-                        out _gameObject4, out _wrapper4);
-
-                    string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_button");
-                    SceneController.AddObjectToView(null, null, _ui.m_holderBtnBy, resPath2,
-                        out _gameObject2, out _wrapper2);
+                    //防止手速超快关了又开开了又关导致的特效重复加载,因为这里是通过Timers延时加载的
+                    if (ViewManager.isViewOpen(nameof(RushSaleGiftBoxView)))
+                    {
+                        string resPath4 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_discount_baofa");
+                        SceneController.AddObjectToView(null, null, _ui.m_holderZheKou, resPath4,
+                            out _gameObject4, out _wrapper4);
+
+                        string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_button");
+                        SceneController.AddObjectToView(null, null, _ui.m_holderBtnBy, resPath2,
+                            out _gameObject2, out _wrapper2);
+                    }
                 }
             );
             string resPath5 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_star");
@@ -201,19 +209,6 @@ namespace GFGGame
                 mTxtUrc = $"本月限购{remainBuyNum}/{shopCfg.maxBuyNum}";
             }
 
-            if (remainBuyNum == 0)
-            {
-                //已售完
-                _ui.m_btnBuyPink.m_bagGrey.visible = true;
-                _ui.m_btnBuyPink.m_bagPink.visible = false;
-            }
-            else
-            {
-                //未售完
-                _ui.m_btnBuyPink.m_bagGrey.visible = false;
-                _ui.m_btnBuyPink.m_bagPink.visible = true;
-            }
-
             string mTxtNewPrice;
             _ui.m_txtLrc.text = string.Empty;
             _ui.m_btnBuyPink.m_loaIcon.visible = false;
@@ -243,6 +238,33 @@ namespace GFGGame
                 //_ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
                 // _ui.m_btnBuyPink.m_txtNewPrice.x = 166;
             }
+            
+            if (remainBuyNum == 0)
+            {
+                //已售完
+                _ui.m_btnBuyPink.m_bagGrey.visible = true;
+                _ui.m_btnBuyPink.m_bagPink.visible = false;
+
+                _ui.m_btnBuyPink.m_txtSoldOut.visible = true;
+                _ui.m_btnBuyPink.m_txtSoldOut.text = "已售罄";
+                _ui.m_holderBtnBy.visible = false;
+                _ui.m_btnBuyPink.m_loaIcon.visible = false;
+                _ui.m_btnBuyPink.m_txtOldPrice.visible = false;
+                _ui.m_btnBuyPink.m_txtNewPrice.visible = false;
+            }
+            else
+            {
+                //未售完
+                _ui.m_btnBuyPink.m_bagGrey.visible = false;
+                _ui.m_btnBuyPink.m_bagPink.visible = true;
+
+                _ui.m_btnBuyPink.m_txtSoldOut.visible = false;
+                _ui.m_btnBuyPink.m_txtSoldOut.text = "";
+               // _ui.m_holderBtnBy.visible = true;
+               _ui.m_btnBuyPink.m_loaIcon.visible = true;
+                _ui.m_btnBuyPink.m_txtOldPrice.visible = true;
+                _ui.m_btnBuyPink.m_txtNewPrice.visible = true;
+            }
 
             _ui.m_txtBoxItemName.text = shopCfg.itemName;
             //这个B时间需要在一个地方统一处理,然后广播事件,不然可能会存在不同步的问题,最后做
@@ -283,7 +305,7 @@ namespace GFGGame
                 _gameObjectList.Add(gameObject);
                 _wrapperList.Add(wrapper);
             }
-            
+
             uiItem.m_t1.Play();
             UI_RushSaleGiftBoxUI.ProxyEnd();
         }

+ 29 - 14
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -189,20 +189,8 @@ namespace GFGGame
             {
                 mTxtUrc = $"永久限购{remainBuyNum}/{shopCfg.maxBuyNum}";
             }
-
-            if (remainBuyNum == 0)
-            {
-                //已售完
-                uiItem.m_btnBuy.m_bagGrey.visible = true;
-                uiItem.m_btnBuy.m_bagYellow.visible = false;
-            }
-            else
-            {
-                //未售完
-                uiItem.m_btnBuy.m_bagGrey.visible = false;
-                uiItem.m_btnBuy.m_bagYellow.visible = true;
-            }
-
+            
+            uiItem.m_btnBuy.m_txtOldPrice.text = shopCfg.originalPrice.ToString();
             if (shopCfg.costType == CostType.ITEM)
             {
                 //货币
@@ -231,7 +219,34 @@ namespace GFGGame
                 uiItem.m_btnBuy.m_txtNewPrice.x = 125;
                 uiItem.m_btnBuy.m_txtOldPrice.x = 30;
             }
+            
+            if (remainBuyNum == 0)
+            {
+                //已售完
+                uiItem.m_btnBuy.m_bagGrey.visible = true;
+                uiItem.m_btnBuy.m_txtSoldOut.text = "已售罄";
+                uiItem.m_btnBuy.m_txtSoldOut.visible = true;
+                uiItem.m_btnBuy.m_bagYellow.visible = false;
+                uiItem.m_btnBuy.m_txtOldPrice.visible = false;
+                uiItem.m_btnBuy.m_txtNewPrice.visible = false;
+                uiItem.m_btnBuy.m_loaIcon.visible = false;
+                uiItem.m_holderBtn.visible = false;
+            }
+            else
+            {
+                //未售完
+                uiItem.m_btnBuy.m_txtSoldOut.text = "";
+                uiItem.m_btnBuy.m_txtSoldOut.visible = false;
+                uiItem.m_btnBuy.m_bagGrey.visible = false;
+                uiItem.m_btnBuy.m_bagYellow.visible = true;
+                uiItem.m_btnBuy.m_txtOldPrice.visible = true;
+                uiItem.m_btnBuy.m_txtNewPrice.visible = true;
+                uiItem.m_btnBuy.m_loaIcon.visible = true;
+                uiItem.m_holderBtn.visible = true;
+            }
 
+            uiItem.m_comDiscount.m_txtDiscountNum.text =
+                NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
             uiItem.target.data = shopCfg;
             uiItem.m_btnBuy.m_txtNewPrice.text = mTxtNewPrice;
             uiItem.m_txtUrc.text = mTxtUrc;

+ 29 - 3
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -154,9 +154,35 @@ namespace GFGGame
             }
             else
             {
-                _ui.m_comBagTime.m_txtGiftBagTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
-                _ui.m_comBagTime.target.visible = true;
-                _ui.m_btnGiftBag.visible = true;
+                bool isSoldOut = true;
+                foreach (var activityInfo in list)
+                {
+                    ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityInfo.ActivityId);
+                    var paramsArr = activityOpenCfg.paramsArr;
+                    foreach (var shopCfgId in paramsArr)
+                    {
+                        var shopCfg = ShopCfgArray.Instance.GetCfg(shopCfgId);
+                        var remainBuyNum = shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(shopCfgId);
+                        //只要有一个商品还能购买,就不是售罄
+                        if (remainBuyNum > 0)
+                        {
+                            isSoldOut = false;
+                            break;
+                        }
+                    }
+                }
+
+                if (isSoldOut)
+                {
+                    _ui.m_comBagTime.target.visible = false;
+                    _ui.m_btnGiftBag.visible = false;
+                }
+                else
+                {
+                    _ui.m_comBagTime.m_txtGiftBagTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
+                    _ui.m_comBagTime.target.visible = true;
+                    _ui.m_btnGiftBag.visible = true;
+                }
             }
         }
 

+ 57 - 4
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -712,6 +712,7 @@ namespace GFGGame
             }
         }
 
+        //列表样式
         private void UpGiftBox1()
         {
             var activityInfoByTypeList =
@@ -725,11 +726,37 @@ namespace GFGGame
             }
             else
             {
-                _ui.m_btnGiftBag2.m_txtTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
-                _ui.m_btnGiftBag2.target.visible = true;
+                bool isSoldOut = true;
+                foreach (var activityInfo in list)
+                {
+                    ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityInfo.ActivityId);
+                    var paramsArr = activityOpenCfg.paramsArr;
+                    foreach (var shopCfgId in paramsArr)
+                    {
+                        var shopCfg = ShopCfgArray.Instance.GetCfg(shopCfgId);
+                        var remainBuyNum = shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(shopCfgId);
+                        //只要有一个商品还能购买,就不是售罄
+                        if (remainBuyNum > 0)
+                        {
+                            isSoldOut = false;
+                            break;
+                        }
+                    }
+                }
+
+                if (isSoldOut)
+                {
+                    _ui.m_btnGiftBag2.target.visible = false;
+                }
+                else
+                {
+                    _ui.m_btnGiftBag2.m_txtTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
+                    _ui.m_btnGiftBag2.target.visible = true;
+                }
             }
         }
 
+        //圆形样式
         private void UpGiftBox2()
         {
             var activityInfoByTypeList =
@@ -743,8 +770,34 @@ namespace GFGGame
             }
             else
             {
-                _ui.m_btnGiftBag1.m_txtTime.text = TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
-                _ui.m_btnGiftBag1.target.visible = true;
+                bool isSoldOut = true;
+                foreach (var activityInfo in list)
+                {
+                    ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityInfo.ActivityId);
+                    var paramsArr = activityOpenCfg.paramsArr;
+                    foreach (var shopCfgId in paramsArr)
+                    {
+                        var shopCfg = ShopCfgArray.Instance.GetCfg(shopCfgId);
+                        var remainBuyNum = shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(shopCfgId);
+                        //只要有一个商品还能购买,就不是售罄
+                        if (remainBuyNum > 0)
+                        {
+                            isSoldOut = false;
+                            break;
+                        }
+                    }
+                }
+
+                if (isSoldOut)
+                {
+                    _ui.m_btnGiftBag1.target.visible = false;
+                }
+                else
+                {
+                    _ui.m_btnGiftBag1.m_txtTime.text =
+                        TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), list[0].EndTime);
+                    _ui.m_btnGiftBag1.target.visible = true;
+                }
             }
         }
 

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Task/Task_fui.bytes