Fixes null propogation and expression is always true/false

This commit is contained in:
Kamron Batman 2018-09-15 15:58:36 -07:00
parent a48ebb3a5f
commit 8da55d6043
6 changed files with 37 additions and 58 deletions

View file

@ -518,7 +518,7 @@ namespace Server.Network
{
EquipInfoAttribute[] attrs = info.Attributes;
EnsureCapacity(17 + (info.Crafter == null ? 0 : 6 + info.Crafter.Name == null ? 0 : info.Crafter.Name.Length) +
EnsureCapacity(17 + (info.Crafter?.Name.Length ?? 0) +
(info.Unidentified ? 4 : 0) + attrs.Length * 6);
m_Stream.Write((short)0x10);