Skip to content

Commit 9d734de

Browse files
committed
Adjust Core Plugin changes
+ Switch from SharedStatic to SharedStatic<T> to enable game launch API support (though, still not implemented on this repo) + Rename export class to Seraphim
1 parent 8e42ddc commit 9d734de

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Hi3Helper.Plugin.HBR/Exports.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
using Hi3Helper.Plugin.Core;
22
using System.Runtime.CompilerServices;
33
using System.Runtime.InteropServices;
4+
// ReSharper disable IdentifierTypo
5+
// ReSharper disable CommentTypo
46

57
namespace Hi3Helper.Plugin.HBR;
68

79
/// <summary>
8-
/// Provides necessary unmanaged API exports for the plugin to be loaded.
10+
/// Provides necessary unmanaged API exports for the plugin to be loaded.<br/><br/>
11+
///
12+
/// NOTE FOR DEVELOPERS:<br/>
13+
/// The export class name can be anything you want. In this example, we use "Seraphim" as a name to the weapon used by the characters.
914
/// </summary>
10-
public class Exports : SharedStatic
15+
public class Seraphim : SharedStatic<Seraphim> // 2025-08-18: We use generic version of SharedStatic<T> to add support for game launch API.
16+
// Though, the devs can still use the old SharedStatic without any compatibility issue.
1117
{
12-
static Exports() => Load<HBRPlugin>(!RuntimeFeature.IsDynamicCodeCompiled ? new Core.Management.GameVersion(0, 8, 1, 0) : default); // Loads the IPlugin instance as HBRPlugin.
18+
static Seraphim() => Load<HBRPlugin>(!RuntimeFeature.IsDynamicCodeCompiled ? new Core.Management.GameVersion(0, 8, 1, 1) : default); // Loads the IPlugin instance as HBRPlugin.
1319

1420
[UnmanagedCallersOnly(EntryPoint = "TryGetApiExport", CallConvs = [typeof(CallConvCdecl)])]
1521
public static unsafe int TryGetApiExport(char* exportName, void** delegateP) =>

Hi3Helper.Plugin.HBR/Hi3Helper.Plugin.HBR.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Company>Collapse Launcher Team</Company>
1919
<Authors>$(Company). neon-nyan, Cry0, bagusnl, shatyuka, gablm.</Authors>
2020
<Copyright>Copyright 2022-2025 $(Company)</Copyright>
21-
<Version>0.8.1</Version>
21+
<Version>0.8.2</Version>
2222
<ApplicationIcon>icon.ico</ApplicationIcon>
2323
<Configurations>Debug;Release;DebugNoReflection;ReleaseNoReflection</Configurations>
2424
</PropertyGroup>

0 commit comments

Comments
 (0)