Changed born dates in player baseline to show actual creation date

This commit is contained in:
Waverunner
2014-12-11 23:27:55 -05:00
parent 7dc87b5720
commit 9c08b1ab54
2 changed files with 19 additions and 4 deletions
+11 -2
View File
@@ -7,16 +7,17 @@ import resources.network.BaselineBuilder;
import resources.objects.creature.CreatureObject;
import resources.objects.intangible.IntangibleObject;
import resources.player.Player;
import utilities.MathUtils;
public class PlayerObject extends IntangibleObject {
private static final long serialVersionUID = 1L;
private String profession = "";
private String biography = "";
private boolean showBackpack = true;
private boolean showHelmet = true;
private int bornDate = 0;
public PlayerObject(long objectId) {
super(objectId);
@@ -55,6 +56,14 @@ public class PlayerObject extends IntangibleObject {
this.showHelmet = showHelmet;
}
public void setBornDate(int year, int month, int day) {
this.bornDate = MathUtils.numberDaysSince(year, month, day, 2000, 12, 31);
}
public int getBornDate() {
return bornDate;
}
private int getProfessionIcon() {
switch (profession) {
case "entertainer_1a":
@@ -120,7 +129,7 @@ public class PlayerObject extends IntangibleObject {
for (int i = 0; i < 4; i++) // 4 flags
bb.addInt(0);
bb.addAscii(""); // Title
bb.addInt(0); // Born Date
bb.addInt(bornDate); // Born Date -- 4001 = 12/15/2011 || Number of days after 12/31/2000
bb.addInt(0); // Total Play Time
bb.addInt(getProfessionIcon()); // Profession Icon
bb.addAscii(profession);