Limit timed zones for 5 hours.
This commit is contained in:
@@ -641,7 +641,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// 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())
|
||||
{
|
||||
player.startTimedHuntingZone(exitTime - System.currentTimeMillis());
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
if (player.getAdena() > 150000)
|
||||
{
|
||||
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.startTimedHuntingZone(18000000); // 300 minutes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user