Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -26,7 +26,7 @@ namespace Server.Items
{
Mobile mob = state.Mobile;
if (mob != null && mob.AccessLevel >= AccessLevel.GameMaster) return new GMItemPacket(this);
if (mob?.AccessLevel >= AccessLevel.GameMaster) return new GMItemPacket(this);
return base.GetWorldPacketFor(state);
}
@ -59,7 +59,7 @@ namespace Server.Items
// +2 - Hue
// +1 - Flags
uint serial = (uint)item.Serial.Value;
uint serial = item.Serial.Value;
int itemID = 0x36FF;
int amount = item.Amount;
Point3D loc = item.Location;
@ -110,4 +110,4 @@ namespace Server.Items
}
}
}
}
}