Store death points on logout.
This commit is contained in:
@@ -10766,6 +10766,12 @@ public class PlayerInstance extends Playable
|
||||
LOGGER.log(Level.SEVERE, "deleteMe()", e);
|
||||
}
|
||||
|
||||
// Store death points.
|
||||
if (_isDeathKnight)
|
||||
{
|
||||
getVariables().set(PlayerVariables.DEATH_POINT_COUNT, _deathPoints);
|
||||
}
|
||||
|
||||
// Make sure player variables are stored.
|
||||
getVariables().storeMe();
|
||||
|
||||
|
@@ -63,6 +63,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String FORTUNE_TELLING_BLACK_CAT_VARIABLE = "FortuneTellingBlackCat";
|
||||
public static final String DELUSION_RETURN = "DELUSION_RETURN";
|
||||
public static final String HUNTING_ZONE_RESET_TIME = "HUNTING_ZONE_RESET_TIME_";
|
||||
public static final String DEATH_POINT_COUNT = "DEATH_POINT_COUNT";
|
||||
public static final String STAT_POINTS = "STAT_POINTS";
|
||||
public static final String STAT_STR = "STAT_STR";
|
||||
public static final String STAT_DEX = "STAT_DEX";
|
||||
|
@@ -653,7 +653,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
{
|
||||
// Send twice.
|
||||
player.setDeathPoints(500);
|
||||
player.setDeathPoints(0); // TODO: Store death point values?
|
||||
player.setDeathPoints(player.getVariables().getInt(PlayerVariables.DEATH_POINT_COUNT, 0));
|
||||
}
|
||||
|
||||
if (Config.ENABLE_ATTENDANCE_REWARDS)
|
||||
|
Reference in New Issue
Block a user