mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Fixed XP Crash
This commit is contained in:
@@ -28,6 +28,7 @@ import java.util.Map.Entry;
|
||||
import org.apache.mina.core.buffer.IoBuffer;
|
||||
|
||||
import engine.resources.common.CRC;
|
||||
import resources.common.StringUtilities;
|
||||
import resources.objects.ObjectMessageBuilder;
|
||||
import resources.objects.waypoint.WaypointObject;
|
||||
|
||||
@@ -362,24 +363,19 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder {
|
||||
PlayerObject player = (PlayerObject) object;
|
||||
player.setXpListUpdateCounter(player.getXpListUpdateCounter() + 1);
|
||||
|
||||
// Some problem with createDelta()
|
||||
IoBuffer result = bufferPool.allocate(42 + type.length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
result.putShort((short) 5);
|
||||
result.putInt(CRC.StringtoCRC("DeltasMessage"));
|
||||
result.putLong(object.getContainer().getObjectID());
|
||||
result.put("YALP".getBytes());
|
||||
result.put((byte) 8);
|
||||
result.putInt(19 + type.length());
|
||||
result.putShort((short) 1);
|
||||
result.putShort((short) 0);
|
||||
result.putInt(1);
|
||||
IoBuffer result = bufferPool.allocate(15 + type.length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
result.putInt(player.getXpList().size());
|
||||
result.putInt(player.getXpListUpdateCounter());
|
||||
result.put((byte) ((alreadyExists) ? 2 : 0));
|
||||
result.putShort((short) type.length());
|
||||
result.put(type.getBytes());
|
||||
result.put(getAsciiString(type));
|
||||
result.putInt(amount);
|
||||
|
||||
return result.flip();
|
||||
int size = result.position();
|
||||
result.flip();
|
||||
//StringUtilities.printBytes(result.array());
|
||||
result = createDelta("PLAY", (byte) 8, (short) 1, (short) 0, result, size + 4);
|
||||
return result;
|
||||
}
|
||||
|
||||
public IoBuffer buildProfessionWheelPositionDelta(String professionWheelPosition) {
|
||||
|
||||
Reference in New Issue
Block a user