fix(core): Removes implicit cast between Serial and uint (#728)
* Fixes spellbooks using serial ctor * Fixes misc items where someone thought they had an amount and it didn't * Fixes all `Food` types.
This commit is contained in:
parent
17521c9cd7
commit
0dc4acc164
74 changed files with 319 additions and 248 deletions
|
|
@ -114,22 +114,7 @@ namespace Server
|
|||
var loc = reader.ReadPoint3D();
|
||||
var worldLoc = reader.ReadPoint3D();
|
||||
|
||||
IEntity parent;
|
||||
|
||||
Serial serial = reader.ReadUInt();
|
||||
|
||||
if (serial.IsItem)
|
||||
{
|
||||
parent = World.FindItem(serial);
|
||||
}
|
||||
else if (serial.IsMobile)
|
||||
{
|
||||
parent = World.FindMobile(serial);
|
||||
}
|
||||
else
|
||||
{
|
||||
parent = null;
|
||||
}
|
||||
IEntity parent = reader.ReadEntity<IEntity>();
|
||||
|
||||
return new BounceInfo(map, loc, worldLoc, parent);
|
||||
}
|
||||
|
|
@ -2651,7 +2636,7 @@ namespace Server
|
|||
|
||||
if (GetSaveFlag(flags, SaveFlag.Parent))
|
||||
{
|
||||
Serial parent = reader.ReadUInt();
|
||||
Serial parent = reader.ReadSerial();
|
||||
|
||||
if (parent.IsMobile)
|
||||
{
|
||||
|
|
@ -2812,7 +2797,7 @@ namespace Server
|
|||
|
||||
if (GetSaveFlag(flags, SaveFlag.Parent))
|
||||
{
|
||||
Serial parent = reader.ReadUInt();
|
||||
Serial parent = reader.ReadSerial();
|
||||
|
||||
if (parent.IsMobile)
|
||||
{
|
||||
|
|
@ -2930,7 +2915,7 @@ namespace Server
|
|||
AcquireCompactInfo().m_Name = name;
|
||||
}
|
||||
|
||||
Serial parent = reader.ReadUInt();
|
||||
Serial parent = reader.ReadSerial();
|
||||
|
||||
if (parent.IsMobile)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue