Browse Source

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong 2 years ago
parent
commit
8fbcb8340a
20 changed files with 204 additions and 69 deletions
  1. 5 3
      FGUIProject/assets/EnduringGiftBox/components/BtnBuy.xml
  2. 1 0
      FGUIProject/assets/EnduringGiftBox/components/BtnBuyPink.xml
  3. 2 2
      FGUIProject/assets/EnduringGiftBox/components/ComSpecialOfferGiftBoxItem.xml
  4. 1 0
      FGUIProject/assets/Friend/FriendUI.xml
  5. 1 1
      FGUIProject/assets/Task/OpenBattlePassUI.xml
  6. 18 12
      GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs
  7. 6 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuy.cs
  8. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuyPink.cs
  9. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs
  10. 1 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs
  11. 2 2
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs
  12. 43 21
      GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs
  13. 29 14
      GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs
  14. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs
  15. 29 3
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs
  16. 57 4
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
  17. 1 3
      GameClient/Assets/Game/HotUpdate/Views/Task/CombTaskView.cs
  18. BIN
      GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes
  19. BIN
      GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes
  20. BIN
      GameClient/Assets/ResIn/UI/Task/Task_fui.bytes

+ 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 - 0
FGUIProject/assets/Friend/FriendUI.xml

@@ -32,5 +32,6 @@
       <relation target="" sidePair="right-right,bottom-bottom"/>
       <Button title="一键领取"/>
     </component>
+    <text id="n22_duuf" name="txtPowerCount" xy="694,1860" pivot="0.5,0" size="339,44" fontSize="32" color="#f8e7e7" align="center" letterSpacing="-2" vars="true" autoSize="none" text="今日剩余领取体力:{value=0}/{maxValue=20}"/>
   </displayList>
 </component>

+ 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/>

+ 18 - 12
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -114,16 +114,19 @@ namespace GFGGame
             return arrayList;
         }
 
-        public static List<int> SortItemListByHighScore(List<int> arrayList)
+        public static List<int> SortItemListByHighScore(List<int> arrayList, bool checkNew = false)
         {
             arrayList.Sort((int a, int b) =>
             {
-                bool isNewA = CheckIsDressUpItemNew(a);
-                bool isNewB = CheckIsDressUpItemNew(b);
-                if (isNewA != isNewB)
+                if (checkNew)
                 {
-                    if (isNewA) return -1;
-                    if (isNewB) return 1;
+                    bool isNewA = CheckIsDressUpItemNew(a);
+                    bool isNewB = CheckIsDressUpItemNew(b);
+                    if (isNewA != isNewB)
+                    {
+                        if (isNewA) return -1;
+                        if (isNewB) return 1;
+                    }
                 }
                 int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
                 int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
@@ -134,16 +137,19 @@ namespace GFGGame
             });
             return arrayList;
         }
-        public static List<int> SortItemListByLowScore(List<int> arrayList)
+        public static List<int> SortItemListByLowScore(List<int> arrayList, bool checkNew = false)
         {
             arrayList.Sort((int a, int b) =>
             {
-                bool isNewA = CheckIsDressUpItemNew(a);
-                bool isNewB = CheckIsDressUpItemNew(b);
-                if (isNewA != isNewB)
+                if (checkNew)
                 {
-                    if (isNewA) return -1;
-                    if (isNewB) return 1;
+                    bool isNewA = CheckIsDressUpItemNew(a);
+                    bool isNewB = CheckIsDressUpItemNew(b);
+                    if (isNewA != isNewB)
+                    {
+                        if (isNewA) return -1;
+                        if (isNewB) return 1;
+                    }
                 }
                 int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
                 int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;

+ 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();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs

@@ -15,6 +15,7 @@ namespace UI.Friend
         public GButton m_btnAdd;
         public GList m_list;
         public GButton m_btnSendAll;
+        public GTextField m_txtPowerCount;
         public const string URL = "ui://wez2ujnnjdju0";
         public const string PACKAGE_NAME = "Friend";
         public const string RES_NAME = "FriendUI";
@@ -70,6 +71,7 @@ namespace UI.Friend
             m_btnAdd = (GButton)comp.GetChild("btnAdd");
             m_list = (GList)comp.GetChild("list");
             m_btnSendAll = (GButton)comp.GetChild("btnSendAll");
+            m_txtPowerCount = (GTextField)comp.GetChild("txtPowerCount");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -81,6 +83,7 @@ namespace UI.Friend
             m_btnAdd = null;
             m_list = null;
             m_btnSendAll = null;
+            m_txtPowerCount = 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;
                 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -674,11 +674,11 @@ namespace GFGGame
                 _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
                 if (_scoreIndex == SORT_BY_HIGH_SCORE)
                 {
-                    _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3);
+                    _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
                 }
                 else if (_scoreIndex == SORT_BY_LOW_SCORE)
                 {
-                    _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3);
+                    _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
                 }
                 else
                 {

+ 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;

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -137,6 +137,8 @@ namespace GFGGame
             _ui.m_list.RefreshVirtualList();
             _ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
             _ui.m_btnSendAll.text = RedDotDataManager.Instance.GetFriendGiftRed() ? "一键领取并赠送" : "一键赠送";
+            _ui.m_txtPowerCount.SetVar("value", FriendDataManager.Instance.Count.ToString()).FlushVars();
+            _ui.m_txtPowerCount.SetVar("maxValue", FriendDataManager.Instance.maxGetPowerCount.ToString()).FlushVars();
         }
 
 

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

@@ -156,9 +156,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;
+                }
             }
         }
 

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/Task/CombTaskView.cs

@@ -3,7 +3,6 @@ using ET;
 using FairyGUI;
 using UI.CommonGame;
 using UI.Task;
-using UnityEngine;
 
 namespace GFGGame
 {
@@ -181,8 +180,7 @@ namespace GFGGame
 
         private void OnBtnGoClick(EventContext context)
         {
-            if (!(context.sender is GObject btnGo)) return;
-            var taskCfg = btnGo.data as TaskCfg;
+            if (!(context.sender is GObject { data: TaskCfg taskCfg })) return;
             //功能未开放
             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(taskCfg.jumpId)) return;
             Hide();

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


BIN
GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes


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