Addition of Time Limited Zones configurations.

This commit is contained in:
MobiusDevelopment
2020-01-23 16:32:46 +00:00
parent 6cd49da1fb
commit e44125f798
10 changed files with 82 additions and 24 deletions

View File

@@ -0,0 +1,15 @@
# ---------------------------------------------------------------------------
# Time Limited Zones
# ---------------------------------------------------------------------------
# Initial free time.
# Default: 3600000 (1 hour)
InitialTime = 3600000
# Reset delay.
# Default: 36000000 (10 hours)
ResetDelay = 36000000
# Teleport fee.
# Default: 150000
TeleportFee = 150000

View File

@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.StatsSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -64,9 +65,9 @@ public class AddHuntingTime extends AbstractEffect
else
{
long endTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + _zoneId, 0);
if ((endTime + 18000000) < currentTime)
if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime)
{
endTime = currentTime + 18000000;
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
}
else if (endTime < currentTime)
{