Fixed list update issues with friend and ignore list, /findfriend now destroys existing wp's, fixed string bug on updating wps

This commit is contained in:
Waverunner
2013-12-17 19:00:24 -05:00
parent c3cf8713bf
commit aea5f3a4b8
13 changed files with 218 additions and 157 deletions
+2 -6
View File
@@ -29,12 +29,8 @@ public class ChatFriendsListUpdate extends SWGMessage {
@Override
public IoBuffer serialize() {
Config config = new Config();
config.setFilePath("nge.cfg");
if (!(config.loadConfigFile())) {
config = DefaultConfig.getConfig();
}
String serverName = config.getString("GALAXY_NAME");
String serverName = NGECore.getInstance().getConfig().getString("GALAXY_NAME");
IoBuffer result = IoBuffer.allocate(50 + friendName.length()).order(ByteOrder.LITTLE_ENDIAN);
result.putShort((short) 3);
+2 -3
View File
@@ -9,6 +9,7 @@ import org.apache.mina.core.buffer.IoBuffer;
import resources.objects.player.PlayerObject;
// This is possibly unused
public class ChatOnGetFriendsList extends SWGMessage {
private List<String> friendList;
@@ -24,8 +25,7 @@ public class ChatOnGetFriendsList extends SWGMessage {
}
@Override
public void deserialize(IoBuffer data) {
// XXX Auto-generated method stub
}
@Override
@@ -51,7 +51,6 @@ public class ChatOnGetFriendsList extends SWGMessage {
int size = buffer.position();
buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size);
buffer.flip();
//System.out.println("ChatOnGetFriendsList: " + buffer.getHexDump());
return buffer;
}