Skip to content

Commit

Permalink
ItemAddReason.AdminCommand has been choose
Browse files Browse the repository at this point in the history
  • Loading branch information
louis1706 committed Dec 26, 2024
1 parent f68e1b3 commit d513ff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EXILED/Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2781,7 +2781,7 @@ public void AddItem(Firearm item, IEnumerable<AttachmentIdentifier> identifiers)
/// <param name="pickup">The <see cref="Pickup"/> of the item to be added.</param>
/// <param name="addReason">The reason the item was added.</param>
/// <returns>The <see cref="Item"/> that was added.</returns>
public Item AddItem(Pickup pickup, ItemAddReason addReason = ItemAddReason.Undefined) => Item.Get(Inventory.ServerAddItem(pickup.Type, addReason, pickup.Serial, pickup.Base));
public Item AddItem(Pickup pickup, ItemAddReason addReason = ItemAddReason.AdminCommand) => Item.Get(Inventory.ServerAddItem(pickup.Type, addReason, pickup.Serial, pickup.Base));

/// <summary>
/// Adds an item to the player's inventory.
Expand All @@ -2791,7 +2791,7 @@ public void AddItem(Firearm item, IEnumerable<AttachmentIdentifier> identifiers)
/// <returns>The <see cref="Item"/> that was added.</returns>
public Item AddItem(FirearmPickup pickup, IEnumerable<AttachmentIdentifier> identifiers)
{
Firearm firearm = Item.Get<Firearm>(Inventory.ServerAddItem(pickup.Type, ItemAddReason.Undefined, pickup.Serial, pickup.Base));
Firearm firearm = Item.Get<Firearm>(Inventory.ServerAddItem(pickup.Type, ItemAddReason.AdminCommand, pickup.Serial, pickup.Base));

if (identifiers is not null)
firearm.AddAttachment(identifiers);
Expand Down

0 comments on commit d513ff1

Please sign in to comment.