Selaa lähdekoodia

Bugly联盟值数据推送后接收防止报错处理

huangxiaoyue 1 vuosi sitten
vanhempi
commit
b56e9c6ac6
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs

@@ -49,7 +49,10 @@ namespace GFGGame
         }
         public void SetNumeric(int type, long value)
         {
-            LeagueNumber[type] = value;
+            if(LeagueNumber.ContainsKey(type))
+                LeagueNumber[type] = value;
+            else
+                LeagueNumber.Add(type, value);
         }
 
         public long GetNumeriValue(int type)