Browse Source

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

heixaojie 2 years ago
parent
commit
4351c70adf

+ 18 - 11
FGUIProject/assets/ClothingFoster/ClothingFosterUI.xml

@@ -1,26 +1,33 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,998">
+<component size="962,940">
   <displayList>
   <displayList>
-    <component id="n11_bd1c" name="n11" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,998"/>
-    <text id="n12_bd1c" name="n12" xy="335,50" size="292,64" fontSize="48" color="#9b7853" text="属性提高比例"/>
-    <image id="n13_bd1c" name="n13" src="ehs99" fileName="images/yx_xiant_1.png" pkg="eg2y0ldp" xy="57,120"/>
-    <text id="n1_py5g" name="txtDiscribe" xy="80,179" size="254,56" fontSize="42" color="#9b7853" text="完成套装浆洗"/>
-    <list id="n4_py5g" name="listPropertyAdd" xy="17,287" size="927,126" layout="row" colGap="35" defaultItem="ui://uicwtr5bpy5gt" align="center">
+    <component id="n11_bd1c" name="n11" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,940">
+      <relation target="n15_t9yr" sidePair="height-height"/>
+    </component>
+    <text id="n12_bd1c" name="n12" xy="335,46" size="292,64" group="n16_t9yr" fontSize="48" color="#9b7853" text="属性提高比例"/>
+    <image id="n13_bd1c" name="n13" src="ehs99" fileName="images/yx_xiant_1.png" pkg="eg2y0ldp" xy="57,124" group="n16_t9yr"/>
+    <text id="n1_py5g" name="txtDiscribe" xy="80,148" size="254,56" group="n16_t9yr" fontSize="42" color="#9b7853" text="完成套装浆洗"/>
+    <group id="n16_t9yr" name="n16" xy="57,46" size="848,158" group="n15_t9yr" advanced="true" layout="vt" lineGap="14" excludeInvisibles="true"/>
+    <list id="n4_py5g" name="listPropertyAdd" xy="17,244" size="927,126" group="n17_t9yr" layout="row" colGap="35" defaultItem="ui://uicwtr5bpy5gt" align="center">
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
     </list>
-    <list id="n8_py5g" name="listMaterials" xy="70,491" size="821,289" layout="row" colGap="32" defaultItem="ui://uicwtr5bpy5gu" align="center">
+    <list id="n8_py5g" name="listMaterials" xy="70,402" size="821,198" group="n17_t9yr" layout="row" colGap="32" defaultItem="ui://uicwtr5bpy5gu" align="center">
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
     </list>
-    <component id="n9_py5g" name="btnFoster" src="wonody" fileName="components/Button19.xml" pkg="mk0fwx0x" xy="309,849">
-      <Button title="确定"/>
-    </component>
-    <component id="n10_j5a5" name="ComConsume" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="424,778" pivot="0.5,0">
+    <component id="n10_j5a5" name="ComConsume" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="424,632" pivot="0.5,0" group="n17_t9yr">
       <relation target="" sidePair="center-center"/>
       <relation target="" sidePair="center-center"/>
     </component>
     </component>
+    <text id="n14_t9yr" name="txtLock" xy="354,710" pivot="0.5,0" size="254,56" group="n17_t9yr" fontSize="42" color="#9b7853" align="center" autoClearText="true" text="完成套装浆洗"/>
+    <component id="n9_py5g" name="btnFoster" src="wonody" fileName="components/Button19.xml" pkg="mk0fwx0x" xy="309,798" group="n17_t9yr">
+      <Button title="确定"/>
+    </component>
+    <group id="n17_t9yr" name="n17" xy="17,244" size="927,651" group="n15_t9yr" advanced="true" layout="vt" lineGap="32" excludeInvisibles="true"/>
+    <group id="n15_t9yr" name="n15" xy="17,46" size="927,849" advanced="true" layout="vt" lineGap="40" excludeInvisibles="true"/>
   </displayList>
   </displayList>
+  <relation target="n11_bd1c" sidePair="height-height"/>
 </component>
 </component>

+ 42 - 0
GameClient/Assets/Game/HotUpdate/Controller/GMController.cs

@@ -1,5 +1,6 @@
 using System;
 using System;
 using ET;
 using ET;
+using FairyGUI;
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -45,5 +46,46 @@ namespace GFGGame
             PromptController.Instance.ShowFloatTextPrompt(messageSuc, MessageType.SUCCESS);
             PromptController.Instance.ShowFloatTextPrompt(messageSuc, MessageType.SUCCESS);
             return true;
             return true;
         }
         }
+
+
+        private static int index = 0;
+        public static void AddShowGMViewEventListener()
+        {
+            GRoot.inst.onTouchBegin.Add(OnTouchBegin);
+        }
+        private static void OnTouchBegin(EventContext context)
+        {
+            if (context.inputEvent.button == 1 || Stage.inst.touchCount == 2)
+            {
+
+                if (index == 0)
+                {
+                    Timers.inst.Add(1, 1, OnTimeComplete);
+                }
+                index++;
+                if (index == 2)
+                {
+                    ShowGmView();
+                }
+            }
+
+        }
+        private static void OnTimeComplete(object param)
+        {
+            index = 0;
+        }
+
+        public static void ShowGmView()
+        {
+            if (ViewManager.isViewOpen(typeof(PhotographView).FullName)) return;
+            if (GameConfig.showGM >= 1)
+            {
+                ViewManager.Show(ViewName.GM_PANEL_VIEW);
+            }
+            else
+            {
+                ViewManager.Show(ViewName.LOG_VIEW);
+            }
+        }
     }
     }
 }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -24,7 +24,7 @@ namespace GFGGame
             SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
             SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
             //全局点击效果
             //全局点击效果
             ViewGlobal.CreatClickEffect();
             ViewGlobal.CreatClickEffect();
-            ViewGlobal.AddShowGMViewEventListener();
+            GMController.AddShowGMViewEventListener();
             //获取游戏配置
             //获取游戏配置
             GetGameCfg();
             GetGameCfg();
         }
         }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -328,6 +328,7 @@ namespace GFGGame
             if (cardData.star >= starCfgs.Count) return false;
             if (cardData.star >= starCfgs.Count) return false;
             CardStarCfg starCfg = CardStarCfgArray.Instance.GetCfgBycardIdAndstarLvl(cardId, cardData.star);
             CardStarCfg starCfg = CardStarCfgArray.Instance.GetCfgBycardIdAndstarLvl(cardId, cardData.star);
             if (ItemDataManager.GetItemNum(starCfg.costID) < starCfg.costNum) return false;
             if (ItemDataManager.GetItemNum(starCfg.costID) < starCfg.costNum) return false;
+            if (cardData.lv < starCfg.needLv) return false;
             for (int i = 0; i < starCfg.materiarsArr.Length; i++)
             for (int i = 0; i < starCfg.materiarsArr.Length; i++)
             {
             {
                 if (ItemDataManager.GetItemNum(starCfg.materiarsArr[i][0]) < starCfg.materiarsArr[i][1]) return false;
                 if (ItemDataManager.GetItemNum(starCfg.materiarsArr[i][0]) < starCfg.materiarsArr[i][1]) return false;

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingFosterUI.cs

@@ -10,8 +10,9 @@ namespace UI.ClothingFoster
         public GTextField m_txtDiscribe;
         public GTextField m_txtDiscribe;
         public GList m_listPropertyAdd;
         public GList m_listPropertyAdd;
         public GList m_listMaterials;
         public GList m_listMaterials;
-        public GButton m_btnFoster;
         public GComponent m_ComConsume;
         public GComponent m_ComConsume;
+        public GTextField m_txtLock;
+        public GButton m_btnFoster;
         public const string URL = "ui://uicwtr5bpy5gp";
         public const string URL = "ui://uicwtr5bpy5gp";
         public const string PACKAGE_NAME = "ClothingFoster";
         public const string PACKAGE_NAME = "ClothingFoster";
         public const string RES_NAME = "ClothingFosterUI";
         public const string RES_NAME = "ClothingFosterUI";
@@ -62,16 +63,18 @@ namespace UI.ClothingFoster
             m_txtDiscribe = (GTextField)comp.GetChild("txtDiscribe");
             m_txtDiscribe = (GTextField)comp.GetChild("txtDiscribe");
             m_listPropertyAdd = (GList)comp.GetChild("listPropertyAdd");
             m_listPropertyAdd = (GList)comp.GetChild("listPropertyAdd");
             m_listMaterials = (GList)comp.GetChild("listMaterials");
             m_listMaterials = (GList)comp.GetChild("listMaterials");
-            m_btnFoster = (GButton)comp.GetChild("btnFoster");
             m_ComConsume = (GComponent)comp.GetChild("ComConsume");
             m_ComConsume = (GComponent)comp.GetChild("ComConsume");
+            m_txtLock = (GTextField)comp.GetChild("txtLock");
+            m_btnFoster = (GButton)comp.GetChild("btnFoster");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
             m_txtDiscribe = null;
             m_txtDiscribe = null;
             m_listPropertyAdd = null;
             m_listPropertyAdd = null;
             m_listMaterials = null;
             m_listMaterials = null;
-            m_btnFoster = null;
             m_ComConsume = null;
             m_ComConsume = null;
+            m_txtLock = null;
+            m_btnFoster = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 3 - 15
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivityGlobalSProxy.cs

@@ -14,15 +14,9 @@ namespace ET
                 StartTime = message.StartTime,
                 StartTime = message.StartTime,
                 EndTime = message.EndTime
                 EndTime = message.EndTime
             };
             };
-            info.EndTime = info.ActivityId == 501 ? 1689703200000 : info.EndTime;//临时屏蔽一个限时活动,测试结束后要删掉
-            if (info.ActivityId == 501 && (TimeHelper.ServerNow() < info.StartTime || TimeHelper.ServerNow() > info.EndTime))
-            {
-                ActivityGlobalDataManager.Instance.RemoveActivityInfo(info.ActivityId);
-            }
-            else
-            {
-                ActivityGlobalDataManager.Instance.AddActivityInfo(info);
-            }
+
+            ActivityGlobalDataManager.Instance.AddActivityInfo(info);
+
             await ETTask.CompletedTask;
             await ETTask.CompletedTask;
         }
         }
     }
     }
@@ -74,13 +68,7 @@ namespace GFGGame
                     CountValue = activityInfo.CountValue
                     CountValue = activityInfo.CountValue
                 };
                 };
 
 
-                info.EndTime = info.ActivityId == 501 ? 1689703200000 : info.EndTime;//临时屏蔽一个限时活动,测试结束后要删掉
 
 
-                if (info.ActivityId == 501 && (TimeHelper.ServerNow() < info.StartTime || TimeHelper.ServerNow() > info.EndTime))
-                {
-                    ActivityGlobalDataManager.Instance.RemoveActivityInfo(info.ActivityId);
-                    return;
-                }
                 ActivityGlobalDataManager.Instance.AddActivityInfo(info);
                 ActivityGlobalDataManager.Instance.AddActivityInfo(info);
             });
             });
         }
         }

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

@@ -135,6 +135,7 @@ namespace GFGGame
                     dataManager.AddSuperReward(level);
                     dataManager.AddSuperReward(level);
                 }
                 }
             }
             }
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
             BonusController.TryShowBonusList(bonusList, onSuccess);
             BonusController.TryShowBonusList(bonusList, onSuccess);
             return true;
             return true;
         }
         }

+ 25 - 10
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingFosterView.cs

@@ -9,11 +9,11 @@ namespace GFGGame
     public class ClothingFosterView : BaseWindow
     public class ClothingFosterView : BaseWindow
     {
     {
         private UI_ClothingFosterUI _ui;
         private UI_ClothingFosterUI _ui;
-
+        private SuitFosterCfg cfg;
         private int _suitId;
         private int _suitId;
         private int _index;
         private int _index;
         private SortedList _propertyList;
         private SortedList _propertyList;
-        private Dictionary<int, int> _addPropertyList;
+        // private Dictionary<int, int> _addPropertyList;
         private bool _canFoster;
         private bool _canFoster;
         public override void Dispose()
         public override void Dispose()
         {
         {
@@ -54,19 +54,19 @@ namespace GFGGame
             _suitId = (int)(this.viewData as object[])[0];
             _suitId = (int)(this.viewData as object[])[0];
             _index = (int)(this.viewData as object[])[1];
             _index = (int)(this.viewData as object[])[1];
             _propertyList = (this.viewData as object[])[2] as SortedList;
             _propertyList = (this.viewData as object[])[2] as SortedList;
-            _addPropertyList = SuitFosterDataManager.Instance.GetAdditionPropertyData(_suitId, _index);
+            // _addPropertyList = SuitFosterDataManager.Instance.GetAdditionPropertyData(_suitId, _index);
             _canFoster = true;
             _canFoster = true;
 
 
-            SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgsBysuitId(_suitId)[_index];
+            cfg = SuitFosterCfgArray.Instance.GetCfgsBysuitId(_suitId)[_index];
+            ItemCfg cardItemCfg = ItemCfgArray.Instance.GetCfgBysuitId(cfg.suitId);
+            _ui.m_txtLock.text = cardItemCfg == null || cfg.cardStar == 0 ? "" : string.Format("卡牌【{0}】达到{1}星可养护", cardItemCfg.name, cfg.cardStar);
+            _ui.m_txtLock.visible = cardItemCfg != null && cfg.cardStar > 0;
             _ui.m_listMaterials.numItems = cfg.materialsArr.Length;
             _ui.m_listMaterials.numItems = cfg.materialsArr.Length;
             long has = ItemDataManager.GetItemNum(cfg.costId);
             long has = ItemDataManager.GetItemNum(cfg.costId);
             int need = cfg.costNum;
             int need = cfg.costNum;
-            // UI_ComCostCurrency comConsume = UI_ComCostCurrency.Proxy(_ui.m_ComConsume);
-            // comConsume.m_txtNeed.text = need.ToString();
-            // UI_ComCostCurrency.ProxyEnd();
             ItemUtil.UpdateItemNeedNum(_ui.m_ComConsume, cfg.costId, cfg.costNum);
             ItemUtil.UpdateItemNeedNum(_ui.m_ComConsume, cfg.costId, cfg.costNum);
             if (_canFoster && has < need) _canFoster = false;
             if (_canFoster && has < need) _canFoster = false;
-
+            _ui.m_txtDiscribe.text = string.Format("完成套装{0}", SuitFosterDataManager.Instance.stepNames[_index]);
             _ui.m_listPropertyAdd.numItems = _propertyList.Count;
             _ui.m_listPropertyAdd.numItems = _propertyList.Count;
         }
         }
 
 
@@ -112,14 +112,29 @@ namespace GFGGame
             comProperty.m_txtProperty.text = _propertyList[score].ToString();
             comProperty.m_txtProperty.text = _propertyList[score].ToString();
             comProperty.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));
             comProperty.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));
 
 
-            double addition = _addPropertyList[score] * 100 / 10000;
+            // double addition = _addPropertyList[score] * 100 / 10000;
+            double addition = cfg.addition * 100 / 10000;
             item.m_txtAdd.text = string.Format("+{0}%", addition);
             item.m_txtAdd.text = string.Format("+{0}%", addition);
             UI_ListPropertyAddItem.ProxyEnd();
             UI_ListPropertyAddItem.ProxyEnd();
             UI_ListScoreItem.ProxyEnd();
             UI_ListScoreItem.ProxyEnd();
         }
         }
         private async void OnClickBtnFoster()
         private async void OnClickBtnFoster()
         {
         {
-            SuitFosterCfg cfg = SuitFosterCfgArray.Instance.GetCfgsBysuitId(_suitId)[_index];
+            ItemCfg cardItemCfg = ItemCfgArray.Instance.GetCfgBysuitId(cfg.suitId);
+            if (cfg.cardStar > 0)
+            {
+                CardData cardData = CardDataManager.GetCardDataById(cardItemCfg.id);
+                if (cardData == null)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("暂未获得卡牌【{0}】", cardItemCfg.name));
+                    return;
+                }
+                if (cardData.star < cfg.cardStar)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("卡牌【{0}】星级不足", cardItemCfg.name));
+                    return;
+                }
+            }
 
 
             if (!ItemUtil.CheckItemEnough(cfg.costId, cfg.costNum))
             if (!ItemUtil.CheckItemEnough(cfg.costId, cfg.costNum))
             {
             {

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/SuitSyntheticView.cs

@@ -130,10 +130,10 @@ namespace GFGGame
                     isLock = true;
                     isLock = true;
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                     string str = "";
                     string str = "";
-                    if (levelCfg.type == ConstInstanceZonesType.Studio)
+                    if (levelCfg.type == ConstInstanceZonesType.Studio && levelCfg.subType == ConstInstanceZonesSubType.Hard3)
                     {
                     {
                         StoryLevelCfg cfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                         StoryLevelCfg cfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
-                        str = string.Format("通关关卡{0}", cfg.name);
+                        str = string.Format("通关查阅建档 {0}", cfg.name);
                     }
                     }
                     else
                     else
                     {
                     {

+ 1 - 8
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/RoleInfoView.cs

@@ -152,14 +152,7 @@ namespace GFGGame
 
 
         private void OnClickBtnHelp()
         private void OnClickBtnHelp()
         {
         {
-            if (GameConfig.showGM >= 1)
-            {
-                ViewManager.Show(ViewName.GM_PANEL_VIEW);
-            }
-            else
-            {
-                ViewManager.Show(ViewName.LOG_VIEW);
-            }
+            GMController.ShowGmView();
         }
         }
 
 
         private async void OnFocuseOut()
         private async void OnFocuseOut()

+ 0 - 35
GameClient/Assets/Game/HotUpdate/Views/ViewGlobal.cs

@@ -33,40 +33,5 @@ namespace GFGGame
             comHolder.target.SetPosition(pos.x, pos.y, 0);
             comHolder.target.SetPosition(pos.x, pos.y, 0);
         }
         }
 
 
-        private static int index = 0;
-        public static void AddShowGMViewEventListener()
-        {
-            if (LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL)
-            {
-                GRoot.inst.onTouchBegin.Add(OnTouchBegin);
-            }
-        }
-        private static void OnTouchBegin(EventContext context)
-        {
-            if (context.inputEvent.button == 1 || Stage.inst.touchCount == 2)
-            {
-
-                if (index == 0)
-                {
-                    Timers.inst.Add(1, 1, OnTimeComplete);
-                }
-                index++;
-                if (index == 2)
-                {
-                    ShowGmView();
-                }
-            }
-
-        }
-        private static void OnTimeComplete(object param)
-        {
-            index = 0;
-        }
-
-        public static void ShowGmView()
-        {
-            if (ViewManager.isViewOpen(typeof(PhotographView).FullName)) return;
-            ViewManager.Show(ViewName.GM_PANEL_VIEW);
-        }
     }
     }
 }
 }

BIN
GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_fui.bytes