Skip to content

Commit

Permalink
change to using EnumUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
TtroubleTT committed Aug 3, 2024
1 parent 00ed042 commit 43b6ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public virtual void AddRole(Player player)
() =>
{
Log.Debug($"{Name}: Adding Ammo to {player.Nickname} inventory.");
foreach (AmmoType type in Enum.GetValues(typeof(AmmoType)))
foreach (AmmoType type in EnumUtils<AmmoType>.Values)
{
if (type != AmmoType.None)
player.SetAmmo(type, Ammo.ContainsKey(type) ? Ammo[type] == ushort.MaxValue ? InventoryLimits.GetAmmoLimit(type.GetItemType(), player.ReferenceHub) : Ammo[type] : (ushort)0);
Expand Down

0 comments on commit 43b6ea9

Please sign in to comment.