Code cleanup (#188)

This commit is contained in:
Kamron Batman 2020-08-01 08:40:06 -07:00 • committed by GitHub
parent df53c16620
commit 010fd9402a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
185 changed files with 1052 additions and 1271 deletions

View file

@ -1,3 +1,5 @@
using System;
namespace Server.Items
{
/// <summary>
@ -44,8 +46,7 @@ namespace Server.Items
--weapon.PoisonCharges;
// Infectious strike special move now uses poisoning skill to help determine potency
int maxLevel = attacker.Skills.Poisoning.Fixed / 200;
if (maxLevel < 0) maxLevel = 0;
int maxLevel = Math.Max(attacker.Skills.Poisoning.Fixed / 200, 0);
if (p.Level > maxLevel) p = Poison.GetPoison(maxLevel);
if (attacker.Skills.Poisoning.Value / 100.0 > Utility.RandomDouble())
@ -72,4 +73,4 @@ namespace Server.Items
}
}
}
}
}