Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.
This commit is contained in:
parent
8da55d6043
commit
f93c3b992e
62 changed files with 318 additions and 634 deletions
|
|
@ -142,13 +142,8 @@ namespace Server.Items
|
|||
return low + (high - low) * percent / 1000001;
|
||||
}
|
||||
|
||||
private static void ApplyAttribute(AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high)
|
||||
{
|
||||
ApplyAttribute(attrs, min, max, attr, low, high, 1);
|
||||
}
|
||||
|
||||
private static void ApplyAttribute(AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high,
|
||||
int scale)
|
||||
int scale = 1)
|
||||
{
|
||||
if (attr == AosAttribute.CastSpeed)
|
||||
attrs[attr] += Scale(min, max, low / scale, high / scale) * scale;
|
||||
|
|
@ -436,9 +431,7 @@ namespace Server.Items
|
|||
|
||||
public static void GetElementalDamages(BaseWeapon weapon, bool randomizeOrder)
|
||||
{
|
||||
int fire, phys, cold, nrgy, pois, chaos, direct;
|
||||
|
||||
weapon.GetDamageTypes(null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct);
|
||||
weapon.GetDamageTypes(null, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct);
|
||||
|
||||
int totalDamage = phys;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue