Browse Source

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

guodong 1 year ago
parent
commit
c48363107d

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -186,5 +186,8 @@ namespace GFGGame
 
         //通知七日签到数据更新
         public const string SEVENDAY_LOGIN = "SEVENDAYLOGIN";
+
+        //通知新限时累充领取成功
+        public const string NEWLIMITCHARGE_GET = "NEWLIMITCHARGEGET";
     }
 }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs

@@ -221,6 +221,8 @@ namespace GFGGame
                     return string.Format(activeRewardCfg.desc, luckyBoxCfg.name, taskCfg.GetTargetCount());
                 case ConstTaskType.UpgradeCardSkill:
                     return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0], taskCfg.GetTargetCount());
+                case ConstTaskType.CollectParts:
+                    return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0], taskCfg.GetTargetCount());
                 default: return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount());
             }
         }

+ 0 - 95
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRewardIconItem.cs

@@ -1,95 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.EnduringGiftBox
-{
-    public partial class UI_ComRewardIconItem
-    {
-        public GComponent target;
-        public Controller m_c1;
-        public GImage m_bagYellow;
-        public GImage m_bagBlue;
-        public GLoader m_loaIcon;
-        public GImage m_bagYellowEx;
-        public GImage m_bagBlueEx;
-        public GTextField m_num;
-        public GGraph m_holderItem;
-        public Transition m_t0;
-        public const string URL = "ui://bdi1qe15qqhz1g";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
-        public const string RES_NAME = "ComRewardIconItem";
-        private static UI_ComRewardIconItem _proxy;
-
-        public static UI_ComRewardIconItem Create(GObject gObject = null)
-        {
-            var ui = new UI_ComRewardIconItem();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComRewardIconItem Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComRewardIconItem();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_c1 = comp.GetController("c1");
-            m_bagYellow = (GImage)comp.GetChild("bagYellow");
-            m_bagBlue = (GImage)comp.GetChild("bagBlue");
-            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
-            m_bagYellowEx = (GImage)comp.GetChild("bagYellowEx");
-            m_bagBlueEx = (GImage)comp.GetChild("bagBlueEx");
-            m_num = (GTextField)comp.GetChild("num");
-            m_holderItem = (GGraph)comp.GetChild("holderItem");
-            m_t0 = comp.GetTransition("t0");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_c1 = null;
-            m_bagYellow = null;
-            m_bagBlue = null;
-            m_loaIcon = null;
-            m_bagYellowEx = null;
-            m_bagBlueEx = null;
-            m_num = null;
-            m_holderItem = null;
-            m_t0 = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRewardIconItem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 847d81c746104fd478d684f93e691f40
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 81
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRsGifBoxIconItem.cs

@@ -1,81 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.EnduringGiftBox
-{
-    public partial class UI_ComRsGifBoxIconItem
-    {
-        public GComponent target;
-        public UI_ComRewardIconItem m_comRewardIconItem;
-        public GTextField m_txtItemName;
-        public GGraph m_holderItem;
-        public Transition m_t1;
-        public const string URL = "ui://bdi1qe15yjmk2p";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
-        public const string RES_NAME = "ComRsGifBoxIconItem";
-        private static UI_ComRsGifBoxIconItem _proxy;
-
-        public static UI_ComRsGifBoxIconItem Create(GObject gObject = null)
-        {
-            var ui = new UI_ComRsGifBoxIconItem();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComRsGifBoxIconItem Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComRsGifBoxIconItem();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_comRewardIconItem = (UI_ComRewardIconItem)UI_ComRewardIconItem.Create(comp.GetChild("comRewardIconItem"));
-            m_txtItemName = (GTextField)comp.GetChild("txtItemName");
-            m_holderItem = (GGraph)comp.GetChild("holderItem");
-            m_t1 = comp.GetTransition("t1");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_comRewardIconItem.Dispose();
-            m_comRewardIconItem = null;
-            m_txtItemName = null;
-            m_holderItem = null;
-            m_t1 = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRsGifBoxIconItem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 7646dc5359481fd46871b46ecf90a566
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivityGlobalSProxy.cs

@@ -97,6 +97,7 @@ namespace GFGGame
             BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.itemList));
             ActivityGlobalDataManager.Instance.AddActivityRewardInfo(activityId, bonusId);
             EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+            EventAgent.DispatchEvent(ConstMessage.NEWLIMITCHARGE_GET);
             return false;
         }
     }

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -245,7 +245,6 @@ namespace GFGGame
             GoodsItemTipsController.ShowItemTips(itemId);
         }
 
-
         private void CheckGuide(object param)
         {
             if (GuideDataManager.IsGuideFinish(ConstGuideId.ARENA_OPEN) <= 0)

+ 60 - 14
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/NewLimitChargeView.cs

@@ -19,6 +19,8 @@ namespace GFGGame
         private int _activityId = 0;
         private ActivityInfo _activityInfo;
         private List<ActivityRechargeCfg> _rechargeCfgs;
+        private int previousIndex = 0;
+        private bool isGoChargeView = false;
 
         public override void Dispose()
         {
@@ -59,6 +61,7 @@ namespace GFGGame
         {
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, RefreshList);
+            EventAgent.AddEventListener(ConstMessage.NEWLIMITCHARGE_GET, OnBtnRightClick);
             //EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
         }
         protected override void OnShown()
@@ -71,17 +74,29 @@ namespace GFGGame
             _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(_activityId);
             _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(_activityId);
             //UpdateRedDot();
-            
             RefreshList();
 
             string name = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[0].suitId).name;
             _ui.m_packageName.text = name;
 
+            if (!isGoChargeView)
+            {
+                for (int i = 0; i < _rechargeCfgs.Count; i++)
+                {
+                    if (_activityInfo.CountValue >= _rechargeCfgs[i].value)
+                    {
+                        if (_activityInfo.GetRewards.IndexOf(_rechargeCfgs[i].id) < 0)
+                        {
+                            _curSelectIndex = i;
+                            break;
+                        }
+                    }
+                }
+            }
+            isGoChargeView = false;
             _ui.m_btnLeft.visible = _curSelectIndex == 0 ? false : true;
             _ui.m_btnRight.visible = _curSelectIndex < _rechargeCfgs.Count - 1 ? true : false;
-
             _ui.m_packageName.text = SuitCfgArray.Instance.GetCfg(_rechargeCfgs[_curSelectIndex].suitId).name;
-
             ItemRenderer(_curSelectIndex);
 
             Timers.inst.Add(1, 0, UpdateTime);
@@ -96,6 +111,7 @@ namespace GFGGame
         {
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, RefreshList);
+            EventAgent.RemoveEventListener(ConstMessage.NEWLIMITCHARGE_GET, OnBtnRightClick);
             //EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
         }
 
@@ -106,10 +122,10 @@ namespace GFGGame
         private void ItemRenderer(int index)
         {
 
-            ActivityRechargeCfg lastVipCfg = _rechargeCfgs[index]; 
+            ActivityRechargeCfg lastVipCfg = _rechargeCfgs[index];
             ActivityRechargeCfg vipCfg = _rechargeCfgs[index];
 
-            UI_ListShowItem item = _ui.m_showItem; 
+            UI_ListShowItem item = _ui.m_showItem;
             string name = SuitCfgArray.Instance.GetCfg(vipCfg.suitId).name;
             item.m_txtName0.text = name;
             if (vipCfg.res != "")
@@ -131,16 +147,26 @@ namespace GFGGame
             item.m_listGiftBag.data = lastVipCfg.bonusArr;
             item.m_listGiftBag.numItems = lastVipCfg.bonusArr.Length;
 
-            if (item.m_holder.data == null)
+            if (_rechargeCfgs[index].suitId != previousIndex)
             {
-                DressUpObjUI dressUpObjUI = new DressUpObjUI("SceneSuitFoster");
-                item.m_holder.data = dressUpObjUI;
-                _dressUpObjUIs.Add(dressUpObjUI);
+                int rolesScale = 80;
+                if (_rechargeCfgs[index].suitId == 200055 || _rechargeCfgs[index].suitId == 201027)
+                {   
+                    //这里由于这两个套装模型太小,特殊处理放大
+                    rolesScale = 120;
+                }
+                if (item.m_holder.data == null)
+                {
+                    DressUpObjUI dressUpObjUI = new DressUpObjUI("SceneSuitFoster");
+                    item.m_holder.data = dressUpObjUI;
+                    _dressUpObjUIs.Add(dressUpObjUI);
+                }
+                DressUpObjUI _dressUpObjUI = item.m_holder.data as DressUpObjUI;
+                _dressUpObjUI.ResetSceneObj(rolesScale, false, true, null, false);
+                    _dressUpObjUI.dressUpObj.PutOnSuitCfg(vipCfg.suitId, true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
+                _dressUpObjUI.UpdateWrapper(item.m_holder);
             }
-            DressUpObjUI _dressUpObjUI = item.m_holder.data as DressUpObjUI;
-            _dressUpObjUI.ResetSceneObj(80, false, true, null, false);
-            _dressUpObjUI.dressUpObj.PutOnSuitCfg(vipCfg.suitId, true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
-            _dressUpObjUI.UpdateWrapper(item.m_holder);
+            previousIndex = _rechargeCfgs[index].suitId;
 
             if (item.m_btnShow.data == null)
             {
@@ -154,8 +180,27 @@ namespace GFGGame
             item.m_btnGetGiftBag.data = vipCfg.id;
             bool isGet = MathUtil.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfg.id);
             long limitChargeExp = _activityInfo.CountValue;
-            item.m_btnGetGiftBag.grayed = limitChargeExp < _rechargeCfgs[index].value;
+            //item.m_btnGetGiftBag.grayed = limitChargeExp < _rechargeCfgs[index].value;
             item.m_txtGiftBag.text = string.Format("活动期间累计获得{0}会员积分({1}/{2})", _rechargeCfgs[index].value, limitChargeExp, _rechargeCfgs[index].value);
+            if (limitChargeExp >= _rechargeCfgs[index].value)
+            {
+                if(_activityInfo.GetRewards.IndexOf(_rechargeCfgs[index].id) >= 0)
+                {
+                    item.m_btnGetGiftBag.grayed = true;
+                    item.m_btnGetGiftBag.title = "已领取";
+                }
+                else
+                {
+                    item.m_btnGetGiftBag.grayed = false;
+                    item.m_btnGetGiftBag.title = "领取";
+                }
+
+            }
+            else
+            {
+                item.m_btnGetGiftBag.grayed = true;
+                item.m_btnGetGiftBag.title = "领取";
+            }
         }
 
         private void ListRewardItemRender(int index, GObject obj)
@@ -218,6 +263,7 @@ namespace GFGGame
         private void OnBtnChargeClick()
         {
             ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_CHARGE, ConstStoreSubId.STORE_CHARGE });
+            isGoChargeView = true;
         }
         private void UpdateSuitView()
         {

+ 28 - 26
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -329,6 +330,7 @@ namespace GFGGame
 
             item.m_list.data = shopCfg;
             item.m_list.itemRenderer = ChildListItemRender;
+            item.m_list.onClickItem.Add(OnListSelectorItemClick);
             item.m_list.numItems = numItems;
         }
 
@@ -393,7 +395,7 @@ namespace GFGGame
         // ReSharper disable Unity.PerformanceAnalysis
         private void ChildListItemRender(int index, GObject obj)
         {
-            UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
             var shopCfg = uiItemChild.target.parent.data as ShopCfg;
             var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
             // uiItemChild.m_showRreceives.visible = false;
@@ -402,46 +404,46 @@ namespace GFGGame
             int[][] result;
             if (shopCfg.refreshType == RefreshType.DAY)
             {
-                result = itemCfg.itemsArr;
-                uiItemChild.m_bagYellow.visible = false;
-                uiItemChild.m_bagBlue.visible = true;
-                uiItemChild.m_bagYellowEx.visible = false;
-                uiItemChild.m_bagBlueEx.visible = true;
+                    result = itemCfg.itemsArr;
+                //    uiItemChild.m_bagYellow.visible = false;
+                //    uiItemChild.m_bagBlue.visible = true;
+                //    uiItemChild.m_bagYellowEx.visible = false;
+                //    uiItemChild.m_bagBlueEx.visible = true;
             }
             else
             {
                 //周刷
                 result = itemCfg.param1Arr;
-                uiItemChild.m_bagYellow.visible = true;
-                uiItemChild.m_bagBlue.visible = false;
-                uiItemChild.m_bagYellowEx.visible = true;
-                uiItemChild.m_bagBlueEx.visible = false;
-            }
+            //    uiItemChild.m_bagYellow.visible = true;
+            //    uiItemChild.m_bagBlue.visible = false;
+            //    uiItemChild.m_bagYellowEx.visible = true;
+            //    uiItemChild.m_bagBlueEx.visible = false;
+        }
 
-            // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
-            // {
-            //     uiItemChild.m_showRreceives.visible = true;
-            // }
-            // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
-            // {
-            //     uiItemChild.m_showRreceives.visible = false;
-            // }
+        // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
+        // {
+        //     uiItemChild.m_showRreceives.visible = true;
+        // }
+        // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
+        // {
+        //     uiItemChild.m_showRreceives.visible = false;
+        // }
 
             var itemArr = result[index];
             var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
-            uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
-            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
-            uiItemChild.m_num.text = itemArr[1].ToString();
             uiItemChild.target.data = itemCfgChild;
-            UI_ComRewardIconItem.ProxyEnd();
+            uiItemChild.m_txtCount.text = itemArr[1].ToString();
+            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
+
+            UI_ComItem.ProxyEnd();
         }
 
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
-            GObject sender = context.sender as GObject;
-            GObject obj = sender.parent;
-            ItemCfg itemCfg = obj.data as ItemCfg;
+            GComponent item = context.data as GComponent;
+            ItemCfg itemCfg = item.data as ItemCfg;
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }
 

+ 16 - 18
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -266,29 +267,26 @@ namespace GFGGame
 
         private void ListItemRender(int index, GObject obj)
         {
-            UI_ComRsGifBoxIconItem uiItem = UI_ComRsGifBoxIconItem.Proxy(obj);
+            UI_ComItem uiItem = UI_ComItem.Proxy(obj);
             var boxItemCfg = uiItem.target.parent.data as ItemCfg;
             var itemKv = boxItemCfg.itemsArr[index];
 
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemKv[0]);
-            uiItem.m_txtItemName.text = itemCfg.name;
+            //uiItem.m_txtName.text = itemCfg.name;
             uiItem.target.data = itemCfg;
-            uiItem.m_comRewardIconItem.m_bagBlue.visible = false;
-            uiItem.m_comRewardIconItem.m_bagBlueEx.visible = false;
-            uiItem.m_comRewardIconItem.m_num.text = itemKv[1].ToString();
-            uiItem.m_comRewardIconItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
-            uiItem.m_comRewardIconItem.target.onClick.Add(OnListSelectorItemClick);
-
-            if (!_graphList.Contains(uiItem.m_holderItem))
-            {
-                EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItem.m_holderItem, "ui_Activity", "Limite_kuang");
-
-                _graphList.Add(uiItem.m_holderItem);
-                _effectUIList.Add(_effectUI);
-            }
-
-            uiItem.m_t1.Play();
-            UI_RushSaleGiftBoxUI.ProxyEnd();
+            uiItem.m_txtCount.text = itemKv[1].ToString();
+            uiItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+            uiItem.target.onClick.Add(OnListSelectorItemClick);
+
+            //if (!_graphList.Contains(uiItem.m_holderReware))
+            //{
+            //    EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItem.m_holderReware, "ui_Activity", "Limite_kuang");
+            //    _graphList.Add(uiItem.m_holderReware);
+            //    _effectUIList.Add(_effectUI);
+            //}
+
+            //uiItem.m_t1.Play();
+            UI_ComItem.ProxyEnd();
         }
 
         private void UpViewNone()

+ 19 - 18
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -272,13 +273,14 @@ namespace GFGGame
 
             //子列表
             uiItem.m_list.itemRenderer = ChildListItemRender;
+            uiItem.m_list.onClickItem.Add(OnListSelectorItemClick);
             uiItem.m_list.numItems = shopItemCfg.itemsArr.Length;
             uiItem.m_list.visible = true;
         }
 
         private void ChildListItemRender(int index, GObject obj)
         {
-            UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
             var shopCfg = uiItemChild.target.parent.parent.data as ShopCfg;
             var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
 
@@ -286,10 +288,10 @@ namespace GFGGame
             // if (shopCfg.refreshType == RefreshType.DAY)
             // {
             result = itemCfg.itemsArr;
-            uiItemChild.m_bagYellow.visible = false;
-            uiItemChild.m_bagBlue.visible = true;
-            uiItemChild.m_bagYellowEx.visible = false;
-            uiItemChild.m_bagBlueEx.visible = true;
+            //uiItemChild.m_bagYellow.visible = false;
+            //uiItemChild.m_bagBlue.visible = true;
+            //uiItemChild.m_bagYellowEx.visible = false;
+            //uiItemChild.m_bagBlueEx.visible = true;
             // }
             // else
             // {
@@ -303,29 +305,28 @@ namespace GFGGame
 
             var itemArr = result[index];
             var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
-            uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
             uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
-            uiItemChild.m_num.text = itemArr[1].ToString();
+            uiItemChild.m_txtCount.text = itemArr[1].ToString();
             uiItemChild.target.data = itemCfgChild;
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
 
-            if (!_graphList.Contains(uiItemChild.m_holderItem))
-            {
-                EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItemChild.m_holderItem, "ui_Activity", "Prefer_kuang");
-                _graphList.Add(uiItemChild.m_holderItem);
-                _effectUIList.Add(_effectUI);
-            }
+            //if (!_graphList.Contains(uiItemChild.m_holderItem))
+            //{
+            //    EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItemChild.m_holderItem, "ui_Activity", "Prefer_kuang");
+            //    _graphList.Add(uiItemChild.m_holderItem);
+            //    _effectUIList.Add(_effectUI);
+            //}
 
-            uiItemChild.m_t0.Play();
+            //uiItemChild.m_t0.Play();
 
-            UI_ComRewardIconItem.ProxyEnd();
+            UI_ComItem.ProxyEnd();
         }
 
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
-            GObject sender = context.sender as GObject;
-            GObject obj = sender.parent;
-            ItemCfg itemCfg = obj.data as ItemCfg;
+            GComponent item = context.data as GComponent;
+            ItemCfg itemCfg = item.data as ItemCfg;
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }
 

+ 53 - 67
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -5,6 +5,7 @@ using System.Collections.Generic;
 using ET;
 using System.Linq;
 using Assets.Game.HotUpdate.Data;
+using System.Collections;
 
 namespace GFGGame
 {
@@ -34,13 +35,10 @@ namespace GFGGame
         private GButton _btnStudio;
         private GButton _btnField;
         private GButton _btnBag;
-
         private GButton _btnActivityDay7;
-
         private List<EffectUI> _effectUIList = new List<EffectUI>();
-
-
         private UI_ButtonModle1[] _btns;
+        private bool firstIn;
 
         public override void Dispose()
         {
@@ -98,15 +96,9 @@ namespace GFGGame
             _btnTianGong = _ui.m_list.GetChild("btnTianGong").asButton;
             _btnTuJian = _ui.m_list.GetChild("btnTuJian").asButton;
             _btnJInShu = _ui.m_list.GetChild("btnJInShu").asButton;
-            // _btnStudio = _ui.m_list.GetChild("btnStudio").asButton;
-            // _btnField = _ui.m_list.GetChild("btnField").asButton;
             _btnBag = _ui.m_list.GetChild("btnBag").asButton;
 
             _btnActivityDay7 = _ui.m_btnActivityDay7.target;
-
-            // _btnGongGao.visible = false;
-            // _btnHaoYou.visible = false;
-            // _btnRenWu.visible = false;
             _btnPengYouQuan.visible = false;
             _btnJInShu.visible = false;
             _btnTianGong.visible = false;
@@ -115,7 +107,6 @@ namespace GFGGame
             _ui.m_btnMain.target.onClick.Add(OnClickBtnMain);
             _ui.m_btnHuanZhuang.target.onClick.Add(OnClickBtnHuanZhuang);
             _ui.m_btnZhaiXing.target.onClick.Add(OnClickBtnZhaiXing);
-            // _ui.m_btnDailyLogin.target.onClick.Add(OnClickBtnDailyLogin);
             _ui.m_btnXiuFang.target.onClick.Add(OnClickBtnXiuFang);
             _ui.m_btnCiPai.target.onClick.Add(OnClickBtnCiPai);
             _ui.m_btnStudio.target.onClick.Add(OnClickBtnStudio);
@@ -137,8 +128,6 @@ namespace GFGGame
             _ui.m_btnActivityAfuGift.target.onClick.Add(OnClickBtnAfuGift);
             _btnActivityDay7.onClick.Add(OnClickBtnDay7);
             _ui.m_btnFirstRecharge.target.onClick.Add(OnClickBtnFirstRecharge);
-            // _btnStudio.onClick.Add(OnClickBtnStudio);
-            // _btnField.onClick.Add(OnClickBtnField);
             _btnBag.onClick.Add(OnClickBtnBag);
             _ui.m_btnGiftBag1.target.onClick.Add(OnClickBtnGiftBag2);
             _ui.m_btnGiftBag2.target.onClick.Add(OnClickBtnGiftBag1);
@@ -151,20 +140,13 @@ namespace GFGGame
             _ui.m_comListAd.m_listAd.scrollPane.onScrollEnd.Add(OnListAdScrollEnd);
             _ui.m_comListAd.m_listAd.scrollPane.decelerationRate = 0.8f;
 
-            // swipeGesture = new SwipeGesture(_ui.target);
-            // swipeGesture.onAction.Add(OnSwipe);
-            // swipeGesture.onBegin.Add(OnSwipeBegin);
-            // swipeGesture.onEnd.Add(OnSwipeEnd);
-            // swipeGesture.actionDistance = swipeDistance;
             _ui.m_list.ResizeToFit();
             _ui.m_btnChange.target.onClick.Add(OnBtnChangClick);
             _ui.m_btnChange.m_c1.selectedIndex = 1;
             _ui.m_btnChange.target.selected = true;
 
-            GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.UP_CARD_STAR);
-            // StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_GUIDE + cfg.id, 0).Coroutine();
-            // StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_GUIDE + cfg.id, 1).Coroutine();
             AddEffect();
+            firstIn = true;
         }
 
         protected override void AddEventListener()
@@ -179,14 +161,15 @@ namespace GFGGame
             EventAgent.AddEventListener(ConstMessage.SEVENDAY_LOGIN, SevenDayLoginShow);
         }
 
-
-        private void ResetDailyData()
+        protected override void RemoveEventListener()
         {
-            //ViewManager.Show<MainUIView>();
-            CheckFunOpen();
-            UpdateRedDot();
-            UpdateHead();
-            UpdateBtnFirstRecharge();
+            base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, OnNumericChange);
+            EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, CheckFunOpen);
+            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
+            EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
+            EventAgent.RemoveEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
+            EventAgent.RemoveEventListener(ConstMessage.SEVENDAY_LOGIN, SevenDayLoginShow);
         }
 
         protected override void OnShown()
@@ -212,6 +195,22 @@ namespace GFGGame
             CheckProbabilityUp();
             _valueBarController.OnShown();
 
+            Log.Debug("zyq" + GameGlobal.isLogon);
+            if (GameGlobal.isLogon)
+            {
+                ET.Log.Debug("zyq" + GameGlobal.isLogon);
+                ET.Log.Debug("zyq" + ActivityDataManager.Instance.sevenDayLoginBonusStatusList.Count + ":::" + GuideDataManager.currentGuideId);
+                if (ActivityDataManager.Instance.CanGetSevenDayBonus() &&
+                    GuideDataManager.currentGuideId <= 0)
+                {
+                    ViewManager.Show<SevenDayLoginView>();
+
+                }
+                else if (RedDotDataManager.Instance.DailySignRed())
+                {
+                    ViewManager.Show<DailySignView>(new object[] { 1 });
+                }
+            }
             //long lastTime = GameGlobal.lastLoginTime; // GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
 
 
@@ -230,7 +229,16 @@ namespace GFGGame
             Timers.inst.AddUpdate(Update);
             Update(null);
 
-            _ui.m_openViewAction.Play(MainUIAnimFinished);
+            // 刚进游戏不播放主界面入场动画
+            if (firstIn)
+            {
+                firstIn = false;
+                MainUIAnimFinished();
+            }
+            else
+            {
+                _ui.m_openViewAction.Play(MainUIAnimFinished);
+            }
         }
 
         protected override void OnHide()
@@ -238,8 +246,6 @@ namespace GFGGame
             base.OnHide();
             if (_sceneObject != null)
             {
-                //MyDressUpHelper.dressUpObj.TakeOffAll();
-                //GameObject.Destroy(_sceneObject);
                 PrefabManager.Instance.Restore(_sceneObject);
                 _sceneObject = null;
             }
@@ -249,17 +255,6 @@ namespace GFGGame
             Timers.inst.Remove(UpdateAdListTime);
         }
 
-        protected override void RemoveEventListener()
-        {
-            base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, OnNumericChange);
-            EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, CheckFunOpen);
-            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
-            EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
-            EventAgent.RemoveEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
-            EventAgent.RemoveEventListener(ConstMessage.SEVENDAY_LOGIN, SevenDayLoginShow);
-        }
-
         private void AddEffect()
         {
             _effectUIList.Add(EffectUIPool.CreateEffectUI(_ui.m_btnMain.m_holder, "ui_zjm", "ZJM_szl_down_3"));
@@ -382,8 +377,6 @@ namespace GFGGame
 
                 GTween.To(_ui.m_list.height, height, 0.4f).SetTarget(_ui.m_list)
                     .OnUpdate((GTweener t) => { _ui.m_list.height = t.value.x; }).SetEase(EaseType.QuintInOut);
-                // _ui.m_list.ResizeToFit();
-                // _ui.m_btnChange.m_c1.selectedIndex = 1;
             }
             else
             {
@@ -391,8 +384,6 @@ namespace GFGGame
 
                 GTween.To(_ui.m_list.height, oneItemHeight, 0.4f).SetTarget(_ui.m_list)
                     .OnUpdate((GTweener t) => { _ui.m_list.height = t.value.x; }).SetEase(EaseType.QuintInOut);
-                // _ui.m_list.height = 0;
-                // _ui.m_btnChange.m_c1.selectedIndex = 0;
             }
         }
 
@@ -522,7 +513,7 @@ namespace GFGGame
         {
             LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.TIAN_YE_DIAO_CHA, 1);
 
-            ViewManager.Show<FieldView>(null, new object[] {typeof(MainUIView).FullName, this.viewData });
+            ViewManager.Show<FieldView>(null, new object[] { typeof(MainUIView).FullName, this.viewData });
         }
 
         private void OnClickBtnPoem()
@@ -612,9 +603,6 @@ namespace GFGGame
         private void OnClickBtnRenWu()
         {
             ViewManager.Show<TaskView>(null, new[] { typeof(MainUIView).FullName, this.viewData });
-            // ViewManager.Show<ActivityDay7View>(null, new[] { typeof(MainUIView).FullName, this.viewData });
-            // LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.MEI_RI_REN_WU, 1);
-            // ViewManager.Show<DailyTaskView>();
         }
 
         private void OnClickBtnAfuGift()
@@ -772,7 +760,6 @@ namespace GFGGame
 
             int actLuckyBoxId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitLuckyBox);
             _ui.m_btnActivityLuckyBox.target.visible = actLuckyBoxId > 0;
-            //_ui.m_btnActivityLuckyBox.target.visible = false;
             if (actLuckyBoxId > 0)
             {
                 if (actLuckyBoxId != ActivityDataManager.Instance.lastActLuckyBoxId)
@@ -797,7 +784,7 @@ namespace GFGGame
                 }
             }
 
-             List<int> actListChargeIds = ActivityGlobalDataManager.Instance.GetActivityInfoIdsByType(ConstLimitTimeActivityType.ActLimitChargeId);
+            List<int> actListChargeIds = ActivityGlobalDataManager.Instance.GetActivityInfoIdsByType(ConstLimitTimeActivityType.ActLimitChargeId);
             int actLimitChargeId = actListChargeIds.Count > 0 ? actListChargeIds[0] : 0;
             if (ActivityDataManager.Instance.lastActLimitChargeId != actLimitChargeId)
             {
@@ -842,7 +829,7 @@ namespace GFGGame
             if (_ui.m_btnActivityAfuGift.target.visible)
             {
                 var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(ActivityType.AFZL);
-                if(activityInfo == null)
+                if (activityInfo == null)
                 {
                     _ui.m_btnActivityAfuGift.target.visible = false;
                 }
@@ -972,7 +959,7 @@ namespace GFGGame
                 jumpIndex = adCfg.jumpParamArr[0];
             }
 
-            if(jumpIndex != 0)
+            if (jumpIndex != 0)
                 ViewManager.Show($"GFGGame.{adCfg.jumpId}", jumpIndex);
             else
                 ViewManager.Show($"GFGGame.{adCfg.jumpId}", param);
@@ -998,13 +985,8 @@ namespace GFGGame
             _ui.m_btnTravel.m_loaLockIcon.visible = !FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(TravelView).Name, false);
             _ui.m_btnArena.m_loaLockIcon.visible = !FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(ArenaView).Name, false);
             _ui.m_btnActivityLuckyBox.target.visible = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitLuckyBox) > 0;
-
-            // _ui.m_btnDailyLogin.target.visible = !(!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(SevenDayLoginView).Name, false)
-            // || (ActivityDataManager.Instance.sevenDayLoginLoginId >= 7 && ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.GOT));
-
             List<int> actListChargeIds = ActivityGlobalDataManager.Instance.GetActivityInfoIdsByType(ConstLimitTimeActivityType.ActLimitChargeId);
             int actLimitChargeId = actListChargeIds.Count > 0 ? actListChargeIds[0] : 0;
-            // int actLimitChargeId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitChargeId);
             _ui.m_btnDailyWelfare.target.visible = actLimitChargeId > 0 ||
             FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(DailyWelfareView).Name, false) && (
             FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(DailySignView).Name, false) ||
@@ -1031,8 +1013,6 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_btnGongGao, RedDotDataManager.Instance.GetNoticeRed(), "", -9, 12);
 
             RedDotController.Instance.SetComRedDot(_btnRenWu, RedDotDataManager.Instance.GetTaskRed(), "", -8);
-            // RedDotController.Instance.SetComRedDot(_ui.m_btnDailyLogin.target,
-            // RedDotDataManager.Instance.GetDailyLoginRed());
             RedDotController.Instance.SetComRedDot(_btnYouJian, RedDotDataManager.Instance.GetMailRed(), "", -9, 12);
             RedDotController.Instance.SetComRedDot(_btnTuJian, RedDotDataManager.Instance.GetFieldGuideRed() || RedDotDataManager.Instance.GetTravelGuideRed(), "", -8);
             RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed(), "", -8);
@@ -1044,13 +1024,13 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_btnTravel.target, RedDotDataManager.Instance.GetTravelRed(), "", -36, 32);
             RedDotController.Instance.SetComRedDot(_btnLeague, RedDotDataManager.Instance.GetLeagueRed(), "", -8);
             RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetDailyWelfareRed(), "", 9, -1);
-            RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed() 
-                || RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox) 
+            RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed()
+                || RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox)
                 || RedDotDataManager.Instance.GetActLuckyBoxTaskdRed() || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -11, 5);
             RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed(), "", -8);
             RedDotController.Instance.SetComRedDot(_ui.m_btnActivityDay7.target, RedDotDataManager.Instance.GetActivityDay7Red());
             RedDotController.Instance.SetComRedDot(_ui.m_btnWanShiLi.target, RedDotDataManager.Instance.GetActivityWanShiLiRed(), "", -25, -7);
-            
+
             RedDotController.Instance.SetComRedDot(_ui.m_btnXiuFang.target, RedDotDataManager.Instance.GetClothingFosterRed() || RedDotDataManager.Instance.GetClothingSyntheticRed(), "", -10, 20);
             RedDotController.Instance.SetComRedDot(_ui.m_btnCiPai.target, RedDotDataManager.Instance.GetCardRed(), "", -10, 20);
             RedDotController.Instance.SetComRedDot(_ui.m_btnZhaiXing.target, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy) || RedDotDataManager.Instance.GetLuckyBoxFreeTimes());
@@ -1060,7 +1040,7 @@ namespace GFGGame
             {
                 RedDotController.Instance.SetComRedDot(_ui.m_btnActivityAfuGift.target, ActivityAfuGiftDataManager.Instance.HaveCanGetReward(), "", -43, 2);
             }
-            
+
         }
 
         private void CheckProbabilityUp()
@@ -1176,13 +1156,19 @@ namespace GFGGame
             }
         }
 
-
         private void ChangeAfuActivityState()
         {
             _ui.m_btnActivityAfuGift.target.visible = ActivityAfuGiftDataManager.Instance.IsOpen;
         }
 
-      private void SevenDayLoginShow()
+        private void ResetDailyData()
+        {
+            CheckFunOpen();
+            UpdateRedDot();
+            UpdateHead();
+            UpdateBtnFirstRecharge();
+        }
+        private void SevenDayLoginShow()
         {
             //if (!TimeUtil.CheckIsSameTime(lastTime * 1000, TimeHelper.ClientNow()))
             if (GameGlobal.isLogon)

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0.png


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


BIN
GameClient/Assets/ResIn/UI/Mail/Mail_fui.bytes