Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Jul 5, 2023
1 parent 734b65a commit 4d75a08
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Version: 1.4.0
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.2.0
* Added a global exception handler with integration support and settings
* Added a temporary Watchdog disabler ofr v1.2.0
* Added a temporary Watchdog disabler for v1.2.0
---------------------------------------------------------------------------------------------------
Version: 1.3.10
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.2.0
Expand Down
10 changes: 1 addition & 9 deletions src/Bannerlord.BLSE.Shared/Bannerlord.BLSE.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<PackageReference Include="Bannerlord.BUTR.Shared" Version="$(BUTRSharedVersion)" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<!-- We need our own implementation of Bannerlord.ModuleManager.Source so won't load it from Bannerlord.LauncherEx that is dynamically resolved -->
<PackageReference Include="Bannerlord.ModuleManager" PrivateAssets="all" Version="$(BUTRModuleManagerVersion)" />
<PackageReference Include="Bannerlord.ModuleManager.Source" PrivateAssets="all" Version="$(BUTRModuleManagerVersion)" />
<PackageReference Include="Harmony.Extensions" Version="$(HarmonyExtensionsVersion)" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="IsExternalInit" Version="1.0.3" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />

Expand All @@ -49,14 +49,6 @@
<ProjectReference Include="..\Bannerlord.LauncherEx\Bannerlord.LauncherEx.csproj" Private="false" IncludeAssets="compile" PrivateAssets="all" />
</ItemGroup>

<Target Name="ChangeAliasesOfNugetRefs" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
<ItemGroup>
<ReferencePath Condition="'%(FileName)' == 'Bannerlord.ModuleManager'">
<Aliases>ModuleManager</Aliases>
</ReferencePath>
</ItemGroup>
</Target>

<Target Name="PostBuildFramework" AfterTargets="CopyFilesToOutputDirectory" Condition="Exists($(GameFolder))">
<ItemGroup>
<FilesDebug Include="Bannerlord.LauncherEx.dll" />
Expand Down
6 changes: 2 additions & 4 deletions src/Bannerlord.BLSE.Shared/ModuleInitializer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
extern alias ModuleManager;


using Bannerlord.BLSE.Shared.Utils;
using Bannerlord.BUTR.Shared.Helpers;

using ModuleManager::Bannerlord.ModuleManager;
using Bannerlord.ModuleManager;

using System;
using System.IO;
Expand Down
7 changes: 2 additions & 5 deletions src/Bannerlord.BLSE.Shared/Standalone.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
extern alias ModuleManager;

using Bannerlord.BLSE.Features.AssemblyResolver;
using Bannerlord.BLSE.Features.AssemblyResolver;
using Bannerlord.BLSE.Features.Commands;
using Bannerlord.BLSE.Features.ContinueSaveFile;
using Bannerlord.BLSE.Features.ExceptionInterceptor;
using Bannerlord.BLSE.Features.Interceptor;
using Bannerlord.BLSE.Features.Xbox;
using Bannerlord.BLSE.Shared.Utils;
using Bannerlord.BUTR.Shared.Helpers;
using Bannerlord.ModuleManager;

using HarmonyLib;

using ModuleManager::Bannerlord.ModuleManager;

using System;
using System.Linq;
using System.Runtime.InteropServices;
Expand Down
6 changes: 2 additions & 4 deletions src/Bannerlord.BLSE.Shared/Utils/HarmonyFinder.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
extern alias ModuleManager;

using System.IO;
using System.IO;
using System.Reflection;

#if SHARED
using ModuleManager::Bannerlord.ModuleManager;
using Bannerlord.ModuleManager;
#endif

namespace Bannerlord.BLSE.Shared.Utils;
Expand Down
8 changes: 4 additions & 4 deletions src/Bannerlord.BLSE.Shared/Utils/WatchdogHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Bannerlord.BLSE.Shared.Utils
internal static unsafe class WatchdogHandler
{
private static readonly string WatchdogLibraryName = "TaleWorlds.Native.dll";
private static readonly byte[] WatchdogOriginal = "Watchdog.exe"u8.ToArray();
private static readonly byte[] WatchdogReplacement = "Wetchdog.exe"u8.ToArray();
private static readonly byte[] WatchdogOriginal = @"Watchdog\Watchdog.exe"u8.ToArray();
private static readonly byte[] WatchdogReplacement = @"Wetchdog\Watchdog.exe"u8.ToArray();

// Disable Watchdog by renaming it, thus performing a soft delete in it's eyes
public static void DisableTWWatchdog()
Expand Down Expand Up @@ -39,8 +39,8 @@ public static void DisableTWWatchdog()
WatchdogReplacement.CopyTo(watchdogLocationSpan);
PInvoke.VirtualProtect(watchdogLocationPtr, (nuint) watchdogLocationSpan.Length, old, out _);

searchSpanOffset = idx;
searchSpan = searchSpan.Slice(searchSpanOffset);
searchSpanOffset += idx + 1;
searchSpan = searchSpan.Slice(idx + 1);
}
}
}
Expand Down

0 comments on commit 4d75a08

Please sign in to comment.