Explorar o código

【优化】增加非空判断

meijun %!s(int64=3) %!d(string=hai) anos
pai
achega
a4441caee5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      XmdsCommonServer/Plugin/JSGModule/JSGMountainKingModule.cs

+ 1 - 1
XmdsCommonServer/Plugin/JSGModule/JSGMountainKingModule.cs

@@ -76,7 +76,7 @@ public class JSGMountainKingModule
 		foreach(KingRefreshData data in refreshList)
 		{
 			MountainKingData kingData = srvMountain.Get(data.monsterId);
-			if (data == null)
+			if (data == null || kingData == null)
 			{
 				log.Warn("OnMonsterRefreshNotify找不到对应山大王:" + gameSrvId + ", " + data.monsterId + ", " + data.nextRefreshTime);
 				return;