zhaoyang %!s(int64=2) %!d(string=hai) anos
pai
achega
f4fddb3968

+ 7 - 7
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -104,8 +104,8 @@ namespace GFGGame
                     if (isNewA) return -1;
                     if (isNewB) return 1;
                 }
-                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
-                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
                 if (scoreB > scoreA)
                 {
                     return 1;
@@ -129,8 +129,8 @@ namespace GFGGame
                     if (isNewA) return -1;
                     if (isNewB) return 1;
                 }
-                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
-                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
                 if (scoreB < scoreA)
                 {
                     return 1;
@@ -151,8 +151,8 @@ namespace GFGGame
                 int typeA = ItemUtilCS.GetItemSubType(a);
                 int typeB = ItemUtilCS.GetItemSubType(b);
 
-                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
-                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags); ;
                 if (typeB < typeA)
                 {
                     return -1;
@@ -446,7 +446,7 @@ namespace GFGGame
                         }
                         for (int k = 0; k < cfg.tagsArr.Length; k++)
                         {
-                            if (cfg.tagsArr[k] == selectTagList[j])
+                            if (cfg.tagsArr[k][0] == selectTagList[j])
                             {
                                 isTag = true;
                                 break;

+ 13 - 0
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -19,6 +19,9 @@ namespace GFGGame
         //是否结算中
         public static bool isResultFighting = false;
 
+
+        public static string[] currentFightTags;
+
         private static int _currentLevelCfgId;
         //所有副本关卡通用配置表的id
         public static int currentLevelCfgId
@@ -35,6 +38,15 @@ namespace GFGGame
                 {
                     MainStoryDataManager.currentLevelCfgId = _currentLevelCfgId;
                 }
+                if (string.IsNullOrEmpty(levelCfg.fightID))
+                {
+                    currentFightTags = null;
+                }
+                else
+                {
+                    StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+                    currentFightTags = storyFightCfg.needTagsArr;
+                }
             }
         }
 
@@ -49,6 +61,7 @@ namespace GFGGame
         }
 
 
+
         //副本通关状态,key为CalculateHelper.GenerateInstanceZonesLevelStateKey,值为通到关卡编号
         private static Dictionary<int, int> _passLevelDic = new Dictionary<int, int>();
 

+ 42 - 8
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -15,7 +15,7 @@ namespace GFGGame
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
             if (itemCfg == null)
             {
-                Debug.LogError($"添加了一个不存在的物品 {itemID}");
+                Debug.LogError($"娣诲姞浜嗕竴涓�笉瀛樺湪鐨勭墿鍝� {itemID}");
                 return;
             }
             ItemData itemData = null;
@@ -24,7 +24,7 @@ namespace GFGGame
                 itemData = _dataDic[itemID];
                 if (itemCfg.itemType == ConstItemType.CARD)
                 {
-                    return;//每张卡牌只有一张
+                    return;//姣忓紶鍗$墝鍙�湁涓€寮�
 
                 }
             }
@@ -36,7 +36,7 @@ namespace GFGGame
             itemData.num += itemNum;
             if (ItemUtilCS.IsDressUpItem(itemID) && itemID % GameConst.MAX_COUNT_EVERY_TYPE_ITEM > 0)
             {
-                //游戏角色初始数据完成后才执行
+                //娓告垙瑙掕壊鍒濆�鏁版嵁瀹屾垚鍚庢墠鎵ц�
                 bool dataInited = GameGlobal.DataInited;
                 DressUpMenuItemDataManager.Add(itemID);
                 if (!DressUpMenuItemDataManager.CheckIsSceneType(itemID))
@@ -152,7 +152,7 @@ namespace GFGGame
                 _itemExchangeDic.Add(itemId, exchangTimes);
             }
         }
-        //获取物品已兑换次数
+        //鑾峰彇鐗╁搧宸插厬鎹㈡�鏁�
         public static int GetItemExchangeTimes(int itemId)
         {
             if (_itemExchangeDic.ContainsKey(itemId) == false)
@@ -171,7 +171,7 @@ namespace GFGGame
         }
 
         /// <summary>
-        /// 获取表格配置的基础属性
+        /// 鑾峰彇琛ㄦ牸閰嶇疆鐨勫熀纭€灞炴€�
         /// </summary>
         /// <param name="itemId"></param>
         /// <param name="scoreType"></param>
@@ -199,18 +199,52 @@ namespace GFGGame
         }
 
         /// <summary>
-        /// 获取当前(养护/升级/升星后)的属性
+        /// 鑾峰彇褰撳墠锛堝吇鎶�/鍗囩骇/鍗囨槦鍚庯級鐨勫睘鎬�
         /// </summary>
         /// <param name="itemId"></param>
         /// <param name="scoreType"></param>
         /// <returns></returns>
-        public static int GetItemAdditionScore(int itemId, int scoreType)
+        public static int GetItemAdditionScore(int itemId, int scoreType, string[] tags = null)
         {
             if (_dataDic.TryGetValue(itemId, out var itemData))
             {
-                return itemData.GetScore(scoreType);
+                int scroe = 0;
+                if (tags != null)
+                {
+                    scroe += GetItemTagScore(itemId, tags);
+                }
+                scroe += itemData.GetScore(scoreType);
+                return scroe;
             }
             return 0;
         }
+        /// <summary>
+        /// 鑾峰彇涓€涓�崲瑁呴儴浠跺�搴旂殑鏍囩�鍒嗘暟
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <param name="tags"></param>
+        /// <returns></returns>
+        public static int GetItemTagScore(int itemId, string[] tags)
+        {
+            int score = 0;
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            if (itemCfg == null)
+            {
+                ET.Log.Error("鐗╁搧锛�" + itemId + "涓嶅瓨鍦�");
+                return score;
+            }
+            for (int i = 0; i < itemCfg.tagsArr.Length; i++)
+            {
+                for (int j = 0; j < tags.Length; j++)
+                {
+                    if (itemCfg.tagsArr[i][0] == tags[j])
+                    {
+                        score += int.Parse(itemCfg.tagsArr[i][1]);
+                    }
+                }
+
+            }
+            return score;
+        }
     }
 }

+ 15 - 15
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -68,20 +68,20 @@ namespace GFGGame
             for (int i = 0; i < equipDatas.Count; i++)
             {
 
-                partScore += ItemDataManager.GetItemAdditionScore(equipDatas[i], InstanceZonesDataManager.currentScoreType);
-
-                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(equipDatas[i]);
-                for (int j = 0; j < fightCfg.needTagsArr.Length; j++)
-                {
-                    if (tagProportion >= ConstScoreSystem.MAX_TAG_COUNT) break;
-                    for (int k = 0; k < itemCfg.tagsArr.Length; k++)
-                    {
-                        if (fightCfg.needTagsArr[j] == itemCfg.tagsArr[k])
-                        {
-                            tagProportion += ConstScoreSystem.TAG_SCORE;
-                        }
-                    }
-                }
+                partScore += ItemDataManager.GetItemAdditionScore(equipDatas[i], InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
+
+                // ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(equipDatas[i]);
+                // for (int j = 0; j < fightCfg.needTagsArr.Length; j++)
+                // {
+                //     if (tagProportion >= ConstScoreSystem.MAX_TAG_COUNT) break;
+                //     for (int k = 0; k < itemCfg.tagsArr.Length; k++)
+                //     {
+                //         if (fightCfg.needTagsArr[j] == itemCfg.tagsArr[k][0])
+                //         {
+                //             tagProportion += ConstScoreSystem.TAG_SCORE;
+                //         }
+                //     }
+                // }
             }
             int roleScore = RoleLevelCfgArray.Instance.GetCfg(GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl)).baseScore;
             int cardScore = ItemDataManager.GetItemAdditionScore(InstanceZonesDataManager.currentCardId, InstanceZonesDataManager.currentScoreType);
@@ -130,7 +130,7 @@ namespace GFGGame
 
             for (int i = 0; i < equipDicWithPartId[partId].Count; i++)
             {
-                partScore += ItemDataManager.GetItemAdditionScore(equipDicWithPartId[partId][i], InstanceZonesDataManager.currentScoreType);
+                partScore += ItemDataManager.GetItemAdditionScore(equipDicWithPartId[partId][i], InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
             return partScore;
         }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -156,7 +156,7 @@ namespace GFGGame
             {
                 _equipDatas.Add(value);
                 DressUpUtil.AddItem(value, _sceneObj, _needSetMask);
-                score += ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType);
+                score += ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
             int dressSuitId = CheckCurDressIsSuit();
             if (dressSuitId > 0) _suitId = dressSuitId;
@@ -172,7 +172,7 @@ namespace GFGGame
             {
                 _equipDatas.Remove(value);
                 DressUpUtil.RemoveItem(value, _sceneObj);
-                score -= ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType);
+                score -= ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
         }
         //检测当前穿戴是否是一件完整套装,且只穿了一件套装,返回套装id
@@ -459,7 +459,7 @@ namespace GFGGame
             score = roleLevelCfg.baseScore;
             foreach (int itemId in _equipDatas)
             {
-                score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType);
+                score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
             }
         }
 
@@ -548,7 +548,7 @@ namespace GFGGame
             _isPic = HasSuitPicRes && checkPic;
             SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_suitId);
             List<int> items = new List<int>(suitCfg.partsArr);
-            if(showOptional)
+            if (showOptional)
             {
 
                 if (suitCfg.partsOptionalArr != null && suitCfg.partsOptionalArr.Length > 0)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Utils/SuitUtil.cs

@@ -17,7 +17,7 @@ namespace GFGGame
                 int itemType = ItemUtilCS.GetItemSubType(itemId);
                 if (itemType != ConstDressUpItemType.FEN_WEI)
                 {
-                    score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType); ;
+                    score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType, InstanceZonesDataManager.currentFightTags);
                 }
             }
             return score;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -401,7 +401,7 @@ namespace GFGGame
         {
             UI_ListTagItem item = UI_ListTagItem.Proxy(obj);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_cfgSelected.itemID);
-            string tag = itemCfg.tagsArr[index];
+            string tag = itemCfg.tagsArr[index][0];
             int tagType = TagCfgArray.Instance.GetCfg(tag).type;
             item.m_txtTag.text = tag;
             item.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);

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

@@ -802,7 +802,7 @@ namespace GFGGame
                 iconRes = itemCfg.res;
                 partName = itemCfg.name;
                 listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
-                listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType);
+                listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
                 listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
                 bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
                 listItem.m_imgNew.visible = isNew;
@@ -856,7 +856,7 @@ namespace GFGGame
             // int mainValuel;
             // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
             listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + _fightCfg.scoreType);
-            listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, _fightCfg.scoreType);
+            listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, _fightCfg.scoreType, _fightCfg.needTagsArr);
 
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
             listItem.m_txtTitle.text = partName;

BIN=BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes