Limit timed zones for 5 hours.

This commit is contained in:
MobiusDevelopment
2020-01-03 17:33:21 +00:00
parent 74af3f8837
commit 9c61872268
4 changed files with 4 additions and 4 deletions

View File

@@ -641,7 +641,7 @@ public class EnterWorld implements IClientIncomingPacket
} }
// Check if in time limited hunting zone. // Check if in time limited hunting zone.
final long exitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME, 0) - 3600000; final long exitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME, 0);
if (exitTime > System.currentTimeMillis()) if (exitTime > System.currentTimeMillis())
{ {
player.startTimedHuntingZone(exitTime - System.currentTimeMillis()); player.startTimedHuntingZone(exitTime - System.currentTimeMillis());

View File

@@ -92,7 +92,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
if (player.getAdena() > 150000) if (player.getAdena() > 150000)
{ {
player.reduceAdena("TimedHuntingZone", 150000, player, true); player.reduceAdena("TimedHuntingZone", 150000, player, true);
player.getVariables().set(PlayerVariables.HUNTING_ZONE_RESET_TIME, System.currentTimeMillis() + 64800000); // 64800000 = 18 hours player.getVariables().set(PlayerVariables.HUNTING_ZONE_RESET_TIME, System.currentTimeMillis() + 18000000); // 300 minutes
player.teleToLocation(194291, 176604, -1888); // Storm Isle player.teleToLocation(194291, 176604, -1888); // Storm Isle
player.startTimedHuntingZone(18000000); // 300 minutes player.startTimedHuntingZone(18000000); // 300 minutes
} }

View File

@@ -626,7 +626,7 @@ public class EnterWorld implements IClientIncomingPacket
} }
// Check if in time limited hunting zone. // Check if in time limited hunting zone.
final long exitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME, 0) - 3600000; final long exitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME, 0);
if (exitTime > System.currentTimeMillis()) if (exitTime > System.currentTimeMillis())
{ {
player.startTimedHuntingZone(exitTime - System.currentTimeMillis()); player.startTimedHuntingZone(exitTime - System.currentTimeMillis());

View File

@@ -91,7 +91,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
if (player.getAdena() > 10000) if (player.getAdena() > 10000)
{ {
player.reduceAdena("TimedHuntingZone", 10000, player, true); player.reduceAdena("TimedHuntingZone", 10000, player, true);
player.getVariables().set(PlayerVariables.HUNTING_ZONE_RESET_TIME, System.currentTimeMillis() + 64800000); // 64800000 = 18 hours player.getVariables().set(PlayerVariables.HUNTING_ZONE_RESET_TIME, System.currentTimeMillis() + 18000000); // 300 minutes
player.teleToLocation(13181, -78651, -5977); // Ancient Pirates' Tomb player.teleToLocation(13181, -78651, -5977); // Ancient Pirates' Tomb
player.startTimedHuntingZone(18000000); // 300 minutes player.startTimedHuntingZone(18000000); // 300 minutes
} }