Skip to content

Commit

Permalink
fix: "OnDroppedAmmo" event does not trigger (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatulaile authored Jan 4, 2025
1 parent 7377b5e commit 4876861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EXILED/Exiled.Events/Patches/Events/Player/DroppingAmmo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// ammoPickups
new(OpCodes.Ldloc_S, ammoPickups.LocalIndex),

// Handlers::Player::OnDroppedItem(new DroppedAmmoEventArgs(ev.Player, ev.AmmoType, ev.Amount, ammoPickups))
// Handlers::Player::OnDroppedAmmo(new DroppedAmmoEventArgs(ev.Player, ev.AmmoType, ev.Amount, ammoPickups))
new(OpCodes.Newobj, GetDeclaredConstructors(typeof(DroppedAmmoEventArgs))[0]),
new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnDroppedItem))),
new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnDroppedAmmo))),
});

newInstructions[newInstructions.Count - 1].WithLabels(returnLabel);
Expand Down

0 comments on commit 4876861

Please sign in to comment.