Owner is now set for PlayerObject, Moved requestWaypointAtPosition to java, Updated SWGMap constructors,

This commit is contained in:
Waverunner
2015-02-06 08:45:15 -05:00
parent abc0bdde8d
commit 46d188718d
10 changed files with 48 additions and 30 deletions
@@ -103,7 +103,7 @@ public class WaypointObject extends IntangibleObject implements Encodable{
@Override
public byte[] encode() {
ByteBuffer bb = ByteBuffer.allocate(34 + name.length() * 2);
ByteBuffer bb = ByteBuffer.allocate(42 + name.length() * 2);
bb.putInt(cellNumber);
bb.putFloat((float) getLocation().getX());
bb.putFloat((float) getLocation().getY());
@@ -111,7 +111,8 @@ public class WaypointObject extends IntangibleObject implements Encodable{
bb.putLong(targetId); // unsure when this is anything but 0, have yet to see it change
bb.putInt(getLocation().getTerrain().getCrc());
bb.putInt(name.length());
bb.put(name.getBytes(Charset.forName("UTF-16LE")));
bb.put(name.getBytes(Charset.forName("UTF-16LE")));
bb.putLong(getObjectId());
bb.put((byte) color);
bb.put((byte) (active ? 1 : 0));
return bb.array();