Browse Source

属性分处理

zhaoyang 2 years ago
parent
commit
097f7a6947

+ 10 - 11
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -101,8 +101,8 @@ namespace GFGGame
                     if (isNewA) return -1;
                     if (isNewA) return -1;
                     if (isNewB) return 1;
                     if (isNewB) return 1;
                 }
                 }
-                int scoreA = GetItemScore(a);
-                int scoreB = GetItemScore(b);
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
                 if (scoreB > scoreA)
                 if (scoreB > scoreA)
                 {
                 {
                     return 1;
                     return 1;
@@ -126,8 +126,8 @@ namespace GFGGame
                     if (isNewA) return -1;
                     if (isNewA) return -1;
                     if (isNewB) return 1;
                     if (isNewB) return 1;
                 }
                 }
-                int scoreA = GetItemScore(a);
-                int scoreB = GetItemScore(b);
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
                 if (scoreB < scoreA)
                 if (scoreB < scoreA)
                 {
                 {
                     return 1;
                     return 1;
@@ -148,8 +148,8 @@ namespace GFGGame
                 int typeA = ItemUtilCS.GetItemSubType(a);
                 int typeA = ItemUtilCS.GetItemSubType(a);
                 int typeB = ItemUtilCS.GetItemSubType(b);
                 int typeB = ItemUtilCS.GetItemSubType(b);
 
 
-                int scoreA = GetItemScore(a);
-                int scoreB = GetItemScore(b);
+                int scoreA = ItemDataManager.GetItemAdditionScore(a, InstanceZonesDataManager.currentScoreType); ;
+                int scoreB = ItemDataManager.GetItemAdditionScore(b, InstanceZonesDataManager.currentScoreType); ;
                 if (typeB < typeA)
                 if (typeB < typeA)
                 {
                 {
                     return -1;
                     return -1;
@@ -306,11 +306,10 @@ namespace GFGGame
             return false;
             return false;
         }
         }
 
 
-        public static int GetItemScore(int itemId)
-        {
-            return ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType);
-            // return GetItemScore(itemId, InstanceZonesDataManager.currentScoreType);
-        }
+        // public static int GetItemScore(int itemId)
+        // {
+        //     return ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType);
+        // }
 
 
         public static List<int> DressSearch(List<int> list, bool isTaoZhuang)
         public static List<int> DressSearch(List<int> list, bool isTaoZhuang)
         {
         {

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -67,7 +67,8 @@ namespace GFGGame
 
 
             for (int i = 0; i < equipDatas.Count; i++)
             for (int i = 0; i < equipDatas.Count; i++)
             {
             {
-                partScore += DressUpMenuItemDataManager.GetItemScore(equipDatas[i]);
+
+                partScore += ItemDataManager.GetItemAdditionScore(equipDatas[i], InstanceZonesDataManager.currentScoreType);
 
 
                 ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(equipDatas[i]);
                 ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(equipDatas[i]);
                 for (int j = 0; j < fightCfg.needTagsArr.Length; j++)
                 for (int j = 0; j < fightCfg.needTagsArr.Length; j++)
@@ -129,7 +130,7 @@ namespace GFGGame
 
 
             for (int i = 0; i < equipDicWithPartId[partId].Count; i++)
             for (int i = 0; i < equipDicWithPartId[partId].Count; i++)
             {
             {
-                partScore += DressUpMenuItemDataManager.GetItemScore(equipDicWithPartId[partId][i]);
+                partScore += ItemDataManager.GetItemAdditionScore(equipDicWithPartId[partId][i], InstanceZonesDataManager.currentScoreType);
             }
             }
             return partScore;
             return partScore;
         }
         }

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

@@ -156,7 +156,7 @@ namespace GFGGame
             {
             {
                 _equipDatas.Add(value);
                 _equipDatas.Add(value);
                 DressUpUtil.AddItem(value, _sceneObj, _needSetMask);
                 DressUpUtil.AddItem(value, _sceneObj, _needSetMask);
-                score += DressUpMenuItemDataManager.GetItemScore(value);
+                score += ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType);
             }
             }
             int dressSuitId = CheckCurDressIsSuit();
             int dressSuitId = CheckCurDressIsSuit();
             if (dressSuitId > 0) _suitId = dressSuitId;
             if (dressSuitId > 0) _suitId = dressSuitId;
@@ -172,7 +172,7 @@ namespace GFGGame
             {
             {
                 _equipDatas.Remove(value);
                 _equipDatas.Remove(value);
                 DressUpUtil.RemoveItem(value, _sceneObj);
                 DressUpUtil.RemoveItem(value, _sceneObj);
-                score -= DressUpMenuItemDataManager.GetItemScore(value);
+                score -= ItemDataManager.GetItemAdditionScore(value, InstanceZonesDataManager.currentScoreType);
             }
             }
         }
         }
         //检测当前穿戴是否是一件完整套装,且只穿了一件套装,返回套装id
         //检测当前穿戴是否是一件完整套装,且只穿了一件套装,返回套装id
@@ -459,7 +459,7 @@ namespace GFGGame
             score = roleLevelCfg.baseScore;
             score = roleLevelCfg.baseScore;
             foreach (int itemId in _equipDatas)
             foreach (int itemId in _equipDatas)
             {
             {
-                score += DressUpMenuItemDataManager.GetItemScore(itemId);
+                score += ItemDataManager.GetItemAdditionScore(itemId, InstanceZonesDataManager.currentScoreType);
             }
             }
         }
         }
 
 
@@ -695,10 +695,10 @@ namespace GFGGame
 
 
                 if (shangyiIndex >= 0 && xiazhuangIndex >= 0)//同时拥有上衣、下装、连衣裙
                 if (shangyiIndex >= 0 && xiazhuangIndex >= 0)//同时拥有上衣、下装、连衣裙
                 {
                 {
-                    int lianyiqunScore = DressUpMenuItemDataManager.GetItemScore(recommendList[liangyiqunIndex]);
-                    int shangyiScore = DressUpMenuItemDataManager.GetItemScore(recommendList[shangyiIndex]);
-                    int xiazhuangScore = DressUpMenuItemDataManager.GetItemScore(recommendList[xiazhuangIndex]);
-                    int neidaScore = neidaIndex >= 0 ? DressUpMenuItemDataManager.GetItemScore(recommendList[neidaIndex]) : 0;
+                    int lianyiqunScore = ItemDataManager.GetItemAdditionScore(recommendList[liangyiqunIndex], InstanceZonesDataManager.currentScoreType);
+                    int shangyiScore = ItemDataManager.GetItemAdditionScore(recommendList[shangyiIndex], InstanceZonesDataManager.currentScoreType);
+                    int xiazhuangScore = ItemDataManager.GetItemAdditionScore(recommendList[xiazhuangIndex], InstanceZonesDataManager.currentScoreType);
+                    int neidaScore = neidaIndex >= 0 ? ItemDataManager.GetItemAdditionScore(recommendList[neidaIndex], InstanceZonesDataManager.currentScoreType) : 0;
                     int subType = ItemUtilCS.GetItemSubType(fightCfg.needItemId);
                     int subType = ItemUtilCS.GetItemSubType(fightCfg.needItemId);
                     if (fightCfg.needItemId > 0 && recommendList.IndexOf(fightCfg.needItemId) >= 0 && (subType == ConstDressUpItemType.SHANG_YI || subType == ConstDressUpItemType.XIA_ZHUANG || subType == ConstDressUpItemType.NEI_DA || subType == ConstDressUpItemType.LIAN_YI_QUN))//推荐列表里有必需品且,必需品类型为上衣或下装或连衣裙,有先穿戴必须品,其次穿戴高分服装
                     if (fightCfg.needItemId > 0 && recommendList.IndexOf(fightCfg.needItemId) >= 0 && (subType == ConstDressUpItemType.SHANG_YI || subType == ConstDressUpItemType.XIA_ZHUANG || subType == ConstDressUpItemType.NEI_DA || subType == ConstDressUpItemType.LIAN_YI_QUN))//推荐列表里有必需品且,必需品类型为上衣或下装或连衣裙,有先穿戴必须品,其次穿戴高分服装
                     {
                     {

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

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

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

@@ -789,7 +789,7 @@ namespace GFGGame
                 iconRes = itemCfg.res;
                 iconRes = itemCfg.res;
                 partName = itemCfg.name;
                 partName = itemCfg.name;
                 listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
                 listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
-                listItem.m_txtScore.text = "" + DressUpMenuItemDataManager.GetItemScore(id);
+                listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType);
                 listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
                 listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
                 bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
                 bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
                 listItem.m_imgNew.visible = isNew;
                 listItem.m_imgNew.visible = isNew;