mirror of
https://bitbucket.org/projectswg/holocore.git
synced 2026-01-16 23:04:20 -05:00
Merged in cdmpse/holocore (pull request #87)
Added Animation object controller and allow SDB with trailing blanks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user