Fixes NPE (#312)

- [X] Fixes issue with world load where items modify mobiles before mobiles are initialized

Bumps release version
This commit is contained in:
Kamron Batman 2020-11-15 13:52:05 -08:00 committed by GitHub
parent 0ec30e22d1
commit b0d8dd42c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 13 deletions

View file

@ -1655,17 +1655,12 @@ namespace Server.Items
return true;
}
if (Layer == Layer.Pants)
return Layer switch
{
return m.FindItemOnLayer(Layer.InnerLegs) != null;
}
if (Layer == Layer.Shirt)
{
return m.FindItemOnLayer(Layer.InnerTorso) != null;
}
return false;
Layer.Pants => m.FindItemOnLayer(Layer.InnerLegs) != null,
Layer.Shirt => m.FindItemOnLayer(Layer.InnerTorso) != null,
_ => false
};
}
public override bool OnEquip(Mobile from)