From 0b71c38bfbb5121002c8b2feb1000f5dcede553e Mon Sep 17 00:00:00 2001 From: Qweqker Date: Fri, 21 Feb 2020 12:08:35 -0500 Subject: [PATCH] Added a integer to count Hardcore Iron Man deaths Added two methods to set and get the value of the HCIM death Added HCIM death to the Player's saved data Added it to buffer (if this was not done, the player would be sent back to tutorial island) --- .../node/entity/player/link/ActivityData.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Server/src/org/crandor/game/node/entity/player/link/ActivityData.java b/Server/src/org/crandor/game/node/entity/player/link/ActivityData.java index 5d481b148..d08516bac 100644 --- a/Server/src/org/crandor/game/node/entity/player/link/ActivityData.java +++ b/Server/src/org/crandor/game/node/entity/player/link/ActivityData.java @@ -105,6 +105,11 @@ public final class ActivityData implements SavingModule { */ private int fogRating; + /** + * The death status of a Hardcore Iron Man + */ + private int hardcoreDeath; + /** * Constructs a new {@code ActivityInfo} {@code Object}. */ @@ -154,6 +159,7 @@ public final class ActivityData implements SavingModule { SavedData.save(buffer, solvedMazes, 18); SavedData.save(buffer, fogRating, 19); SavedData.save(buffer, borkKills, 20); + SavedData.save(buffer, hardcoreDeath, 21); buffer.put((byte) 0); } @@ -230,6 +236,8 @@ public final class ActivityData implements SavingModule { case 20: borkKills = buffer.get(); break; + case 21: + hardcoreDeath = buffer.getInt(); } } } @@ -628,4 +636,16 @@ public final class ActivityData implements SavingModule { public void setBorkKills(byte borkKills) { this.borkKills = borkKills; } + + /** + * gets the current value of an Hardcore Iron Man's death status + * @return the value of a Hardcore Iron Man's death status + */ + public int getHardcoreDeath() { + return hardcoreDeath; + } + + public void setHardcoreDeath(int hardcoreDeath) { + this.hardcoreDeath = hardcoreDeath; + } } \ No newline at end of file