Fixes expressions that are always true, null, or flase.

This commit is contained in:
Kamron Batman 2018-09-15 10:08:25 -07:00
parent 970fd563b2
commit 7321fa1b63
6 changed files with 14 additions and 29 deletions

View file

@ -1609,16 +1609,16 @@ namespace Server.Engines.ConPVP
Item[] bombs = corpse.FindItemsByType(typeof(BRBomb), false);
for (int i = 0; i < bombs.Length; ++i)
(bombs[i] as BRBomb).DropTo(mob, killer);
(bombs[i] as BRBomb)?.DropTo(mob, killer);
hadBomb = hadBomb || bombs.Length > 0;
hadBomb = bombs.Length > 0;
if (mob.Backpack != null)
{
bombs = mob.Backpack.FindItemsByType(typeof(BRBomb), false);
for (int i = 0; i < bombs.Length; ++i)
(bombs[i] as BRBomb).DropTo(mob, killer);
(bombs[i] as BRBomb)?.DropTo(mob, killer);
hadBomb = hadBomb || bombs.Length > 0;
}