Browse Source

Merge remote-tracking branch 'origin/master' into ios

ios 1 year ago
parent
commit
30ba5afcf1

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -283,14 +283,18 @@ namespace GFGGame
         /// <returns></returns>
         public static int GetItemAdditionScore(int itemId, int scoreType, string[] tags = null)
         {
-            if (_dataDic.TryGetValue(itemId, out var itemData))
+            //这里计算应该用总的物品表,因为自己没有所有物品
+            ItemCfg itemdate = ItemCfgArray.Instance.GetCfg(itemId);
+            ItemData itemDate = new ItemData() { };
+            if (itemdate != null)
             {
+                itemDate.id = itemdate.id;
                 int scroe = 0;
                 if (tags != null)
                 {
                     scroe += GetItemTagScore(itemId, tags);
                 }
-                scroe += itemData.GetScore(scoreType);
+                scroe += itemDate.GetScore(scoreType);
                 return scroe;
             }
             return 0;

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -166,8 +166,10 @@ namespace GFGGame
                 view.viewData = viewData;
                 if (!view.isShowing)
                 {
-                    if (isHideToShow && _viewStack.Count > 0)
+                    if (isHideToShow && _viewStack.Count > 0){ 
                         view.backRefresh = _viewStack[_viewStack.Count - 1].backRefresh;
+                        _viewStack[_viewStack.Count - 1].iUIView = obj;
+                    }
                     else
                         view.backRefresh = true;
                     view.Show();