From 3ffd813109e8a9ac169f089e6f4789f4b7271d2c Mon Sep 17 00:00:00 2001
From: Li
Date: Sun, 20 Nov 2022 15:55:20 +1300
Subject: [PATCH] Fix crashing
---
HorseIsleServer/LibHISP/Server/Entry.cs | 14 ++++++--------
HorseIsleServer/LibHISP/Server/GameDataJson.cs | 5 ++---
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/HorseIsleServer/LibHISP/Server/Entry.cs b/HorseIsleServer/LibHISP/Server/Entry.cs
index 394d4c1..5f1e530 100755
--- a/HorseIsleServer/LibHISP/Server/Entry.cs
+++ b/HorseIsleServer/LibHISP/Server/Entry.cs
@@ -29,7 +29,7 @@ namespace HISP.Server
public static void RegisterCrashHandler()
{
-#if (!DEBUG)
+#if (!OS_DEBUG)
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(HispCrashHandler);
#endif
}
@@ -77,16 +77,14 @@ namespace HISP.Server
Exception execpt = (Exception)e.ExceptionObject;
- string crashMsg = becauseRustWont[execpt.GetHashCode() % becauseRustWont.Length] + "\r\n";
- crashMsg += "HISP HAS CRASHED" + "\r\n";
- crashMsg += "Build: " + ServerVersion.GetBuildString() + "\r\n";
- crashMsg += "Unhandled Exception: " + execpt.Message + "\r\n";
- crashMsg += execpt.StackTrace + "\r\n";
+ string crashMsg = becauseRustWont[execpt.GetHashCode() % becauseRustWont.Length] + "\n";
+ crashMsg += "HISP HAS CRASHED" + "\n";
+ crashMsg += "Build: " + ServerVersion.GetBuildString() + "\n";
+ crashMsg += "Unhandled Exception: " + execpt.Message + "\n";
+ crashMsg += execpt.StackTrace + "\n";
Logger.CrashPrint(crashMsg);
-
-
}
}
}
diff --git a/HorseIsleServer/LibHISP/Server/GameDataJson.cs b/HorseIsleServer/LibHISP/Server/GameDataJson.cs
index 6ee8f0a..934efbc 100755
--- a/HorseIsleServer/LibHISP/Server/GameDataJson.cs
+++ b/HorseIsleServer/LibHISP/Server/GameDataJson.cs
@@ -416,9 +416,8 @@ namespace HISP.Server
if (gameData.quest_list[i].chained_questid != null)
quest.ChainedQuestId = gameData.quest_list[i].chained_questid;
quest.Minigame = gameData.quest_list[i].minigame;
-
- if(quest.Title.Trim() != "")
- Logger.DebugPrint("Registered Quest: " + quest.Id + " - " + quest.Title);
+
+ Logger.DebugPrint("Registered Quest: " + quest.Id);
Quest.AddQuestEntry(quest);
}