mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
The Glitch can now Mimic
This commit is contained in:
1 parent
43388d654e
commit
7390e0b152
13 files changed
+156
-52
No files matched your search
@@ -5,18 +5,18 @@ namespace TOHE.Patches;
|
||||
[HarmonyPatch(typeof(Constants), nameof(Constants.GetBroadcastVersion))]
|
||||
class ServerUpdatePatch
|
||||
{
|
||||
public static bool Prefix(ref int __result)
|
||||
static void Postfix(ref int __result)
|
||||
{
|
||||
if (GameStates.IsLocalGame)
|
||||
{
|
||||
Logger.Info($"IsLocalGame: {__result}", "VersionServer");
|
||||
return true;
|
||||
}
|
||||
if (GameStates.IsOnlineGame)
|
||||
{
|
||||
// Changing server version for AU mods
|
||||
__result += 25;
|
||||
Logger.Info($"IsOnlineGame: {__result}", "VersionServer");
|
||||
}
|
||||
|
||||
// Changing server version for AU mods
|
||||
__result = Constants.GetVersion(2222, 0, 0, 0);
|
||||
|
||||
Logger.Info($"IsOnlineGame: {__result}", "VersionServer");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user