Skip to content

Commit 43b6ea9

Browse files
committed
change to using EnumUtils
1 parent 00ed042 commit 43b6ea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EXILED/Exiled.CustomRoles/API/Features/CustomRole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ public virtual void AddRole(Player player)
546546
() =>
547547
{
548548
Log.Debug($"{Name}: Adding Ammo to {player.Nickname} inventory.");
549-
foreach (AmmoType type in Enum.GetValues(typeof(AmmoType)))
549+
foreach (AmmoType type in EnumUtils<AmmoType>.Values)
550550
{
551551
if (type != AmmoType.None)
552552
player.SetAmmo(type, Ammo.ContainsKey(type) ? Ammo[type] == ushort.MaxValue ? InventoryLimits.GetAmmoLimit(type.GetItemType(), player.ReferenceHub) : Ammo[type] : (ushort)0);

0 commit comments

Comments
 (0)