Skills now grant appropriate title

Added a title list to PlayerObject as well for server purposes (mainly
for /setcurrentskilltitle)
This commit is contained in:
Waverunner
2013-11-15 17:03:42 -05:00
parent cb588a3fcc
commit a5385ce4da
7 changed files with 94 additions and 23 deletions
+14 -3
View File
@@ -48,6 +48,7 @@ public class PlayerObject extends SWGObject {
private String profession;
private List<Integer> flagsList = new ArrayList<Integer>();
private List<Integer> profileList = new ArrayList<Integer>();
private List<String> titleList = new ArrayList<String>();
private int bornDate = 0;
private int totalPlayTime = 0;
@@ -135,10 +136,12 @@ public class PlayerObject extends SWGObject {
public void setTitle(String title) {
synchronized(objectMutex) {
this.title = title;
if(!getTitleList().isEmpty() && getTitleList().contains(title)) {
this.title = title;
notifyObservers(messageBuilder.buildTitleDelta(title), true);
}
}
notifyObservers(messageBuilder.buildTitleDelta(title), true);
}
public String getProfession() {
@@ -560,5 +563,13 @@ public class PlayerObject extends SWGObject {
this.lastPlayTimeUpdate = lastPlayTimeUpdate;
}
}
public List<String> getTitleList() {
return titleList;
}
public void setTitleList(List<String> titleList) {
this.titleList = titleList;
}
}