guodong 1 жил өмнө
parent
commit
b9f4487fcd

+ 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);