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
|
|
@ -25,7 +25,7 @@ namespace Server.Items
|
|||
// Swing again:
|
||||
|
||||
// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
|
||||
if (defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map ||
|
||||
if (defender.Deleted || attacker.Deleted || defender.Map != attacker.Map ||
|
||||
!defender.Alive || !attacker.Alive || !attacker.CanSee(defender))
|
||||
{
|
||||
attacker.Combatant = null;
|
||||
|
|
|
|||
|
|
@ -1225,9 +1225,7 @@ namespace Server.Items
|
|||
|
||||
AddBlood(attacker, defender, damage);
|
||||
|
||||
int phys, fire, cold, pois, nrgy, chaos, direct;
|
||||
|
||||
GetDamageTypes(attacker, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct);
|
||||
GetDamageTypes(attacker, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct);
|
||||
|
||||
if (Core.ML && this is BaseRanged)
|
||||
if (attacker.FindItemOnLayer(Layer.Cloak) is BaseQuiver quiver)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue