소스 검색

协议容错

guodong 1 년 전
부모
커밋
b9f4487fcd
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -7,6 +7,7 @@ namespace ET
     {
         protected override async ETTask Run(Session session, M2C_NoticeUnitNumeric message)
         {
+            if (GameGlobal.myNumericComponent == null) return;//如果为空表示角色还没有进入游戏,忽略
             var oldValue = GameGlobal.myNumericComponent.GetAsInt(message.NumericType);
             GameGlobal.myNumericComponent.Set(message.NumericType, message.NewValue);