Addition of MaximumAddedTime configuration.

This commit is contained in:
MobiusDevelopment
2020-01-23 17:40:42 +00:00
parent e44125f798
commit 04d2ed51da
8 changed files with 37 additions and 11 deletions

View File

@@ -817,6 +817,7 @@ public class Config
public static List<String> TELNET_HOSTS;
public static int TELNET_PORT;
public static long TIME_LIMITED_ZONE_INITIAL_TIME;
public static long TIME_LIMITED_MAX_ADDED_TIME;
public static long TIME_LIMITED_ZONE_RESET_DELAY;
public static long TIME_LIMITED_ZONE_TELEPORT_FEE;
public static boolean TRAINING_CAMP_ENABLE;
@@ -1980,6 +1981,7 @@ public class Config
final PropertiesParser timeLimitedZoneSettings = new PropertiesParser(TIME_LIMITED_ZONE_CONFIG_FILE);
TIME_LIMITED_ZONE_INITIAL_TIME = timeLimitedZoneSettings.getLong("InitialTime", 3600000);
TIME_LIMITED_MAX_ADDED_TIME = timeLimitedZoneSettings.getLong("MaximumAddedTime", 18000000);
TIME_LIMITED_ZONE_RESET_DELAY = timeLimitedZoneSettings.getLong("ResetDelay", 36000000);
TIME_LIMITED_ZONE_TELEPORT_FEE = timeLimitedZoneSettings.getLong("TeleportFee", 150000);

View File

@@ -62,7 +62,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
}
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
packet.writeD(18000); // TODO: remain time max
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
packet.writeD(3600); // remain refill time
packet.writeD(3600); // refill time max
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated
@@ -82,7 +82,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
}
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
packet.writeD(18000); // TODO: remain time max
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
packet.writeD(3600); // remain refill time
packet.writeD(3600); // refill time max
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated