Add files via upload

This commit is contained in:
Gurge44 authored and GitHub committed 2023-08-14 18:06:55 +02:00
1 parent a99a551a24
commit e329f5e6e0
45 files changed
+12128

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
using HarmonyLib;
namespace TOHE.Patches;
[HarmonyPatch(typeof(Constants), nameof(Constants.GetBroadcastVersion))]
class ServerUpdatePatch
{
public static bool Prefix(ref int __result)
{
if (GameStates.IsLocalGame)
{
Logger.Info($"IsLocalGame: {__result}", "VersionServer");
return true;
}
// Changing server version for AU mods
__result = Constants.GetVersion(2222, 0, 0, 0);
Logger.Info($"IsOnlineGame: {__result}", "VersionServer");
return false;
}
}