소스 검색

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

huangxiaoyue 1 년 전
부모
커밋
b56e9c6ac6
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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)