Browse Source

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

guodong 2 years ago
parent
commit
6efdc8f953

+ 2 - 2
FGUIProject/assets/Bag/GiftBoxSelectorUI.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1026,968">
+<component size="1000,968">
   <displayList>
     <image id="n0_v5no" name="n0" src="m5qxtn2" fileName="images/ty_tc_m.png" xy="0,0" size="1026,968"/>
     <group id="n11_v5no" name="n11" xy="47,-34" size="919,434"/>
@@ -23,7 +23,7 @@
     <graph id="n37_m5qx" name="holderRightDowm" xy="900,892" size="69,35" group="n27_v5no"/>
     <image id="n22_v5no" name="n22" src="wm603t" fileName="imagesNew/lm_zhuangshixian_duan.png" pkg="eg2y0ldp" xy="88,750" group="n27_v5no"/>
     <text id="n24_v5no" name="txtSelRewardStr" xy="372,767" size="247,44" group="n27_v5no" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#b58744" align="center" leading="1" autoSize="none" text="已选奖励:0/8"/>
-    <component id="n30_cu9w" name="btnSub" src="cu9wtme" fileName="components/BtnSub.xml" xy="305,827" group="n27_v5no" pkg="eg2y0ldp"/>
+    <component id="n30_cu9w" name="btnSub" src="cu9wtme" fileName="components/Button19.xml" pkg="eg2y0ldp" xy="305,827" group="n27_v5no"/>
     <group id="n27_v5no" name="n27" xy="88,750" size="881,177"/>
   </displayList>
 </component>

+ 1 - 1
FGUIProject/assets/Bag/components/ListSelectorItem.xml

@@ -2,7 +2,7 @@
 <component size="172,255" overflow="hidden">
   <displayList>
     <image id="n2_v5no" name="n2" src="v5notmc" fileName="images/db_jiajian_1.png" xy="24,203"/>
-    <text id="n21_l6ko" name="txtSelNum" xy="57,200" size="60,53" font="ui://eg2y0ldpa0cftkx" fontSize="39" color="#915e15" align="center" vAlign="middle" autoSize="shrink" text="100" input="true" maxLength="3" restrict="[0-9]"/>
+    <text id="n21_l6ko" name="txtSelNum" xy="57,200" size="60,53" font="ui://eg2y0ldpa0cftkx" fontSize="39" color="#915e15" align="center" vAlign="middle" autoSize="shrink" text="100" input="true" maxLength="3"/>
     <component id="n15_cu9w" name="btnReduce" src="cu9wtmf" fileName="components/BtnReduce.xml" xy="0,202"/>
     <component id="n16_cu9w" name="btnAdd" src="cu9wtmg" fileName="components/BtnAdd.xml" xy="122,203"/>
     <image id="n0_v5no" name="n0" src="m5qxtmy" fileName="images/wpk_db.png" xy="0,1" group="n20_yjmk"/>

+ 3 - 3
FGUIProject/assets/Mail/MailUI.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1026,1376">
+<component size="1000,1376">
   <displayList>
     <image id="n0_ehs9" name="bg" src="m5qxtop" fileName="imagesNew/ty_tc_l.png" pkg="eg2y0ldp" xy="0,0"/>
     <image id="n18_m5qx" name="n18" src="m5qxs" fileName="imagesNew/ty_tc_l_db.png" pkg="eg2y0ldp" xy="32,191"/>
@@ -8,7 +8,7 @@
     <image id="n15_m5qx" name="n15" src="m5qxr" fileName="images/xgnc_btkuang.png" xy="320,59" group="n17_m5qx"/>
     <text id="n16_m5qx" name="n16" xy="507,95" pivot="0.5,0.5" anchor="true" size="160,51" group="n17_m5qx" font="ui://eg2y0ldpa0cftkx" fontSize="38" color="#a98151" letterSpacing="2" text="系统邮箱"/>
     <group id="n17_m5qx" name="n17" xy="320,59" size="386,71"/>
-    <list id="n7_ehs9" name="list" xy="44,229" size="902,900" overflow="scroll" lineGap="17" defaultItem="ui://y44a413eehs9d">
+    <list id="n7_ehs9" name="list" xy="50,229" size="902,900" overflow="scroll" lineGap="17" defaultItem="ui://y44a413eehs9d">
       <item/>
       <item/>
       <item/>
@@ -20,7 +20,7 @@
     <text id="n11_j8b3" name="txtCount" xy="931,143" pivot="1,0" anchor="true" size="281,44" font="ui://eg2y0ldpa0cftkx" fontSize="32" color="#b08d5c" ubb="true" text="当前邮件:100/300">
       <relation target="" sidePair="right-right"/>
     </text>
-    <text id="n12_j8b3" name="txtMaxCount" xy="256,1281" pivot="0.5,0" size="442,39" font="ui://eg2y0ldpa0cftkx" fontSize="28" color="#c6a980" text="最高可储存300封邮箱,请及时查看"/>
+    <text id="n12_j8b3" name="txtMaxCount" xy="250,1281" pivot="0.5,0" size="442,39" font="ui://eg2y0ldpa0cftkx" fontSize="28" color="#c6a980" text="最高可储存300封邮箱,请及时查看"/>
     <component id="n9_ehs9" name="btnDelete" src="cu9wtme" fileName="components/Button19.xml" pkg="eg2y0ldp" xy="76,1166" controller="ColorType,1">
       <Button title="一键删除"/>
     </component>

+ 1 - 1
FGUIProject/assets/Notice/NoticeUI.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1026,1376">
+<component size="1000,1376">
   <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
     <image id="n0_kjq3" name="n0" src="m5qxtop" fileName="imagesNew/ty_tc_l.png" pkg="eg2y0ldp" xy="0,0"/>

+ 4 - 4
FGUIProject/assets/RoleInfo/ChangeNameUI.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1026,654" bgColor="#000000">
+<component size="1000,654" bgColor="#000000">
   <displayList>
     <image id="n4_xt5s" name="bg" src="m5qxtol" fileName="imagesNew/ty_tc_s.png" pkg="eg2y0ldp" xy="0,0"/>
     <graph id="n21_m5qx" name="holderLeftTop" xy="160,115" size="69,35"/>
@@ -11,9 +11,9 @@
     <component id="n5_xt5s" name="btnSure" src="m5qxtoo" fileName="components/Button18.xml" pkg="eg2y0ldp" xy="379,515">
       <Button title="确定" titleFontSize="42"/>
     </component>
-    <text id="n15_r9ri" name="txtNeed" xy="387,407" size="210,44" group="n17_v95q" fontSize="32" color="#b08d5c" text="改名消耗:0/1"/>
-    <loader id="n16_r9ri" name="loaIcon" xy="614,396" size="60,60" group="n17_v95q" url="ui://eg2y0ldpkztethq" autoSize="true"/>
-    <group id="n17_v95q" name="n17" xy="387,396" size="287,60" advanced="true" layout="hz" colGap="13" excludeInvisibles="true">
+    <text id="n15_r9ri" name="txtNeed" xy="374,407" size="210,44" group="n17_v95q" fontSize="32" color="#b08d5c" text="改名消耗:0/1"/>
+    <loader id="n16_r9ri" name="loaIcon" xy="601,396" size="60,60" group="n17_v95q" url="ui://eg2y0ldpkztethq" autoSize="true"/>
+    <group id="n17_v95q" name="n17" xy="374,396" size="287,60" advanced="true" layout="hz" colGap="13" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
     <image id="n19_m5qx" name="n19" src="wm603t" fileName="imagesNew/lm_zhuangshixian_duan.png" pkg="eg2y0ldp" xy="91,470"/>

+ 1 - 1
FGUIProject/assets/RoleInfo/SettingUI.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1026,654">
+<component size="1000,654">
   <displayList>
     <image id="n0_r9ri" name="bg" src="m5qxtol" fileName="imagesNew/ty_tc_s.png" pkg="eg2y0ldp" xy="0,0"/>
     <graph id="n19_m5qx" name="holderLeftTop" xy="160,115" size="69,35"/>

+ 37 - 0
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -21,11 +21,13 @@ namespace GFGEditor
             ItemCfg[] dataArray = ItemCfgArray.Instance.dataArray;
             GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetLeaguePrayApproach, GetLeagueAnswerApproach, CheckStoreApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckClothingFosterApproach, CheckDailyTaskApproach, GetZhaiXingApproach, GetStoryLevelApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
+            Dictionary<ItemCfg, List<int>> syntheticSuitDic = new Dictionary<ItemCfg, List<int>>();
             int suitPartTotalCount = 0;
             foreach (ItemCfg cfg in dataArray)
             {
                 HandleItemAndSuitTable(cfg, suitDic);
                 HandleItemApproch(cfg, actions);
+                HandleItemSyntheticSuit(cfg, syntheticSuitDic);
             }
             var globalCfg = GlobalCfgArray.globalCfg;
             SQLiteHelper.Instance.OpenConnection();
@@ -51,6 +53,14 @@ namespace GFGEditor
                 }
                 globalCfg.suitPartTotalCount = suitPartTotalCount;
                 UpdateGlobalCfg(globalCfg);
+
+                //材料对应的套装id
+                foreach (var a in syntheticSuitDic)
+                {
+                    var names = new string[] { nameof(a.Key.syntheticSuitArr).Replace("Arr", "") };
+                    var values = new string[] { string.Join(";", a.Value) };
+                    SQLiteHelper.Instance.UpdateValues(nameof(ItemCfgArray), names, values, nameof(a.Key.id), a.Key.id.ToString());
+                }
             }
             catch (Exception e)
             {
@@ -69,6 +79,33 @@ namespace GFGEditor
             SQLiteHelper.Instance.UpdateValues(nameof(GlobalCfgArray), names, values, nameof(globalCfg.id), globalCfg.id.ToString());
         }
 
+        private static void HandleItemSyntheticSuit(ItemCfg itemCfg, Dictionary<ItemCfg, List<int>> syntheticSuitDic)
+        {
+            if (itemCfg.syntheticMateriarsArr.Length <= 0)
+            {
+                return;
+            }
+            if (itemCfg.itemType == ConstItemType.DRESS_UP)
+            {
+                ItemCfg materialItemCfg;
+                foreach (int[] materiars in itemCfg.syntheticMateriarsArr)
+                {
+                    int materialId = materiars[0];
+                    materialItemCfg = ItemCfgArray.Instance.GetCfg(materialId);
+                    if (materialItemCfg != null)
+                    {
+                        syntheticSuitDic.TryGetValue(materialItemCfg, out var syntheticSuitList);
+                        if (syntheticSuitList == null)
+                        {
+                            syntheticSuitList = new List<int>();
+                            syntheticSuitDic[materialItemCfg] = syntheticSuitList;
+                        }
+                        syntheticSuitList.Add(itemCfg.id);
+                    }
+                }
+            }
+        }
+
         private static void HandleItemAndSuitTable(ItemCfg itemCfg, Dictionary<SuitCfg, List<int>> suitDic)
         {
             if (itemCfg.suitId <= 0)

+ 26 - 1
GameClient/Assets/Game/HotUpdate/Data/DecomposeDataManager.cs

@@ -29,6 +29,7 @@ namespace GFGGame
                 _decomposeData[rarity].Add(itemId);
             }
         }
+
         public void Remove(int itemId)
         {
             int rarity = ItemCfgArray.Instance.GetCfg(itemId).rarity;
@@ -40,6 +41,28 @@ namespace GFGGame
             }
         }
 
+        //分解需要扣去合成需要的数量
+        public int DeductSynthesisNeedNum(int itemId)
+        {
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            if (itemCfg == null)
+                return 0;
+
+            int sum = 0;
+            foreach (int syntheticId in itemCfg.syntheticSuitArr)
+            {
+                if (ItemDataManager.GetItemNum(syntheticId) <= 0) { 
+                    ItemCfg syntheticItemCfg = ItemCfgArray.Instance.GetCfg(syntheticId);
+                    foreach (int[] MateriarsInfo in syntheticItemCfg.syntheticMateriarsArr)
+                    {
+                        if(MateriarsInfo[0] == itemId)
+                            sum += MateriarsInfo[1];
+                    }
+                }
+            }
+            return sum;
+        }
+
         public List<int> GetDecomposeDataByRarity(int rarity)
         {
             if (!_decomposeData.ContainsKey(rarity)) return null;
@@ -67,7 +90,9 @@ namespace GFGGame
         //物品可分解的数量
         public long ItemCanDecomposeCount(int itemId)
         {
-            return ItemDataManager.GetItemNum(itemId) - 1;
+            //合成需要的数量
+            int synthesisNum = DeductSynthesisNeedNum(itemId);   
+            return ItemDataManager.GetItemNum(itemId) - 1 - synthesisNum;
         }
         public void InitSuitSyntheticMaterias()
         {

+ 0 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

@@ -1,7 +1,5 @@
-using System.Collections.Generic;
 using GFGGame;
 using ET;
-using UnityEditor.VersionControl;
 
 namespace ET
 {

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/Bag/GiftBoxSelectorView.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using ET;
 using FairyGUI;
 using UI.Bag;
@@ -245,7 +246,9 @@ namespace GFGGame
             if (listItem.m_txtSelNum.text == "0")
             {
                 // 将文本设置为空字符串
-                listItem.m_txtSelNum.text = "";
+                listItem.m_txtSelNum.text = default;
+                // 延迟 0.2 秒后恢复文本
+                Timers.inst.Add(0.2f, 1, (obj) => { listItem.m_txtSelNum.text = default; });
             }
         }
 
@@ -306,7 +309,8 @@ namespace GFGGame
 
         private void UpdateSelNumSel(UI_ListSelectorItem listItem, ItemCfg itemCfg)
         {
-            if (string.IsNullOrEmpty(listItem.m_txtSelNum.text))
+            bool isNumeric = int.TryParse(listItem.m_txtSelNum.text, out var result);
+            if (!isNumeric)
             {
                 listItem.m_txtSelNum.text = "0";
             }

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

@@ -139,7 +139,7 @@ namespace GFGGame
                 }
                 if (cardData.star < cfg.cardStar)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt(string.Format("牌【{0}】星级不足", cardItemCfg.name));
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("牌【{0}】星级不足", cardItemCfg.name));
                     return;
                 }
             }

BIN
GameClient/Assets/ResIn/UI/Bag/Bag_fui.bytes


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


BIN
GameClient/Assets/ResIn/UI/Notice/Notice_fui.bytes


BIN
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes