diff --git a/src/resources/objects/waypoint/WaypointObject.java b/src/resources/objects/waypoint/WaypointObject.java index e30fa1a5..563ae32f 100644 --- a/src/resources/objects/waypoint/WaypointObject.java +++ b/src/resources/objects/waypoint/WaypointObject.java @@ -158,9 +158,8 @@ public class WaypointObject extends IntangibleObject implements Serializable, ID @Override public byte[] getBytes() { - IoBuffer buffer = bufferPool.allocate(50 + name.length() * 2, false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = bufferPool.allocate(42 + name.length() * 2, false).order(ByteOrder.LITTLE_ENDIAN); - buffer.putLong(getObjectID()); buffer.putInt(getCellId()); buffer.putFloat(getPosition().x); diff --git a/src/services/bazaar/BazaarService.java b/src/services/bazaar/BazaarService.java index 4680e077..32f760a2 100644 --- a/src/services/bazaar/BazaarService.java +++ b/src/services/bazaar/BazaarService.java @@ -780,6 +780,8 @@ public class BazaarService implements INetworkDispatch { } public void addAuctionItem(AuctionItem auctionItem) { + if(auctionItem == null) + return; auctionItems.add(auctionItem); int commodityNumber = 0; if(commodityLimit.get(auctionItem.getOwnerId()) != null)