Added ability to add players to friends list

Fixed broadcasting per planet using galaxy wide broadcasting
Added ability to notify players galaxy-wide based on conditionals
Fixed tells being sent to players that are not zoned in, the sender will now receive the appropriate offline message
This commit is contained in:
Waverunner
2015-06-14 14:52:30 -04:00
parent d7ecd419ad
commit c682a64c0d
10 changed files with 292 additions and 62 deletions
+22 -2
View File
@@ -44,6 +44,8 @@ import resources.player.PlayerFlags;
import utilities.MathUtils;
import utilities.Encoder.StringType;
import java.util.List;
public class PlayerObject extends IntangibleObject {
private static final long serialVersionUID = 1L;
@@ -86,8 +88,8 @@ public class PlayerObject extends IntangibleObject {
private long nearbyCraftStation = 0;
private SWGList<String> draftSchemList = new SWGList<>(BaselineType.PLAY, 9, 3);
private int experimentPoints = 0;
private SWGList<String> friendsList = new SWGList<>(BaselineType.PLAY, 9, 7);
private SWGList<String> ignoreList = new SWGList<>(BaselineType.PLAY, 9, 8);
private SWGList<String> friendsList = new SWGList<>(BaselineType.PLAY, 9, 7, StringType.ASCII);
private SWGList<String> ignoreList = new SWGList<>(BaselineType.PLAY, 9, 8, StringType.ASCII);
private int languageId = 0;
private SWGList<Long> defenders = new SWGList<>(BaselineType.PLAY, 9, 17); // TODO: Change to set
private int killMeter = 0;
@@ -338,6 +340,24 @@ public class PlayerObject extends IntangibleObject {
sendDelta(8, 6, activeQuest);
}
public void removeFriend(String friend) {
synchronized (friendsList) {
friendsList.remove(friend);
}
friendsList.sendDeltaMessage(this);
}
public void addFriend(String friend) {
synchronized (friendsList) {
friendsList.add(friend);
}
friendsList.sendDeltaMessage(this);
}
public List<String> getFriendsList() {
return this.friendsList;
}
public String getProfWheelPosition() {
return profWheelPosition;
}