Explorar o código

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

huangxiaoyue hai 1 ano
pai
achega
b56e9c6ac6
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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)