We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 184c51f commit 76677efCopy full SHA for 76677ef
EXILED/Exiled.CustomItems/API/Features/CustomWeapon.cs
@@ -52,7 +52,7 @@ public override ItemType Type
52
/// <summary>
53
/// Gets or sets the weapon damage.
54
/// </summary>
55
- public virtual float Damage { get; set; } = float.NaN;
+ public virtual float Damage { get; set; } = -1;
56
57
58
/// Gets or sets a value indicating how big of a clip the weapon will have.
@@ -205,7 +205,7 @@ protected virtual void OnShot(ShotEventArgs ev)
205
/// <param name="ev"><see cref="HurtingEventArgs"/>.</param>
206
protected virtual void OnHurting(HurtingEventArgs ev)
207
{
208
- if (ev.IsAllowed && Damage != float.NaN)
+ if (ev.IsAllowed && Damage >= 0)
209
ev.Amount = Damage;
210
}
211
0 commit comments