Skip to content

Commit 3d8c5d9

Browse files
committed
fixed possible nre, updated package ver
1 parent 1e07848 commit 3d8c5d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Common Utilities/Common Utilities.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="ExMod.Exiled" Version="9.6.0-beta8" />
26+
<PackageReference Include="ExMod.Exiled" Version="9.6.1" />
2727
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
2828
</ItemGroup>
2929

Common Utilities/EventHandlers/PlayerHandlers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void OnChangingRole(ChangingRoleEventArgs ev)
4040

4141
// no clue why this works while in ChangingRole instead of spawned but if it ain't broke don't fix it
4242
// answering my previous question, (obviously) it works because we're setting ev.Items which are yet to be given to the player
43-
if (config.StartingInventories.ContainsKey(ev.NewRole) && !ev.ShouldPreserveInventory)
43+
if (config.StartingInventories is not null && config.StartingInventories.ContainsKey(ev.NewRole) && !ev.ShouldPreserveInventory)
4444
{
4545
if (ev.Items == null)
4646
{
@@ -126,7 +126,7 @@ public void OnPlayerHurting(HurtingEventArgs ev)
126126

127127
public void OnEscaping(EscapingEventArgs ev)
128128
{
129-
if (ev.Player.IsCuffed && config.DisarmedEscapeSwitchRole is not null && config.DisarmedEscapeSwitchRole.TryGetValue(ev.Player.Role, out RoleTypeId newRole))
129+
if (ev.Player.IsCuffed && config.DisarmedEscapeSwitchRole is not null && config.DisarmedEscapeSwitchRole.TryGetValue(ev.Player.Role.Type, out RoleTypeId newRole))
130130
{
131131
ev.NewRole = newRole;
132132
ev.IsAllowed = newRole != RoleTypeId.None;

0 commit comments

Comments
 (0)