File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments