Skip to content

Commit

Permalink
[Resonance] Add check for particle disruptor in ReadPickupInfo (#2725)
Browse files Browse the repository at this point in the history
  • Loading branch information
xNexusACS authored Jul 17, 2024
2 parents c9d9998 + cbd00ee commit 3a2e4c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Exiled.API/Features/Items/Firearm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,12 +696,14 @@ internal override void ReadPickupInfo(Pickup pickup)
{
base.ReadPickupInfo(pickup);

if (pickup is Pickups.FirearmPickup firearm)
{
Base.OnAdded(firearm.Base);
if (pickup is not Pickups.FirearmPickup firearm)
return;

Base.OnAdded(firearm.Base);
AmmoType = firearm.AmmoType;

if (Base is not ParticleDisruptor)
MaxAmmo = firearm.MaxAmmo;
AmmoType = firearm.AmmoType;
}
}
}
}

0 comments on commit 3a2e4c1

Please sign in to comment.