Merged in cdmpse/holocore (pull request #87)

Added Animation object controller and allow SDB with trailing blanks
This commit is contained in:
Obique PSWG
2015-10-18 14:23:47 -05:00
2 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
package network.packets.swg.zone.object_controller;
import java.nio.ByteBuffer;
public class Animation extends ObjectController {
public static final int CRC = 0x00F2;
private String animation;
public Animation(long objectId, String animation) {
super(objectId, CRC);
this.animation = animation;
}
public Animation(ByteBuffer data) {
super(CRC);
decode(data);
}
@Override
public void decode(ByteBuffer data) {
decodeHeader(data);
animation = getAscii(data);
}
@Override
public ByteBuffer encode() {
ByteBuffer data = ByteBuffer.allocate(HEADER_LENGTH + 2 + animation.length());
encodeHeader(data);
addAscii(data, animation);
return data;
}
}

View File

@@ -251,7 +251,7 @@ public class RelationalServerData extends RelationalDatabase {
try {
int lineNum = 1;
while ((line = reader.readLine()) != null) {
String [] parts = line.split("\t");
String [] parts = line.split("\t", -1);
if (columnNames == null)
columnNames = parts;
else if (columnTypes == null) {