Skip to content

Commit 257f58e

Browse files
committed
Change a record to struct to avoid decompile error.
1 parent c48e518 commit 257f58e

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>3.2.9</Version>
3+
<Version>3.2.10</Version>
44
<UsePackageReferences>false</UsePackageReferences>
55
<PackageLicenseFile>LICENSE</PackageLicenseFile>
66
<PackageProjectUrl>https://github.com/Orden4/WCSharp</PackageProjectUrl>

WCSharp.Events/PlayerUnitEvents.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ namespace WCSharp.Events
1212
/// </summary>
1313
public static partial class PlayerUnitEvents
1414
{
15-
private record RegionKey(region Region, bool Enters);
16-
1715
private static int nextCustomEventId = 1_000_000;
1816

1917
private static readonly List<Action> pendingUpdates = new();
2018
private static readonly Dictionary<string, int> customEventIdsByIdentifier = new();
21-
private static readonly Dictionary<RegionKey, int> customEventIdsByRegion = new();
19+
private static readonly Dictionary<Tuple<region, bool>, int> customEventIdsByRegion = new();
2220
private static readonly Dictionary<playerunitevent, IPlayerUnitEventHandler> playerUnitEventHandlers = new();
2321
private static readonly Dictionary<int, IPlayerUnitEventHandler> customPlayerUnitEventHandlers = new()
2422
{
@@ -487,7 +485,7 @@ private static IPlayerUnitEventHandler CreateCustomHandler(int @event)
487485
private static int GetOrCreateRegionEventId(region region, int @event)
488486
{
489487
var enters = @event == (int)RegionUnitEvent.Enters || @event == (int)RegionUnitTypeEvent.Enters;
490-
var key = new RegionKey(region, enters);
488+
var key = Tuple.Create(region, enters);
491489
if (!customEventIdsByRegion.TryGetValue(key, out var id))
492490
{
493491
id = ++nextCustomEventId;

0 commit comments

Comments
 (0)