Dropped Chronos.
This commit is contained in:
		| @@ -22,7 +22,6 @@ import java.util.concurrent.ConcurrentHashMap; | ||||
| import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| @@ -138,7 +137,7 @@ public class Parade extends AbstractNpcAI | ||||
| 		// final long diff = timeLeftMilli(8, 0, 0), cycle = 600000; | ||||
| 		// ThreadPoolManager.scheduleAtFixedRate(new Start(), 180000, cycle); | ||||
| 		 | ||||
| 		LOGGER.info("Fantasy Isle: Parade starting at " + new SimpleDateFormat("yyyy/MM/dd HH:mm").format(Chronos.currentTimeMillis() + diff) + " and is scheduled each next " + (cycle / 3600000) + " hours."); | ||||
| 		LOGGER.info("Fantasy Isle: Parade starting at " + new SimpleDateFormat("yyyy/MM/dd HH:mm").format(System.currentTimeMillis() + diff) + " and is scheduled each next " + (cycle / 3600000) + " hours."); | ||||
| 	} | ||||
| 	 | ||||
| 	void load() | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.text.SimpleDateFormat; | ||||
| import java.util.HashMap; | ||||
| import java.util.Map; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| @@ -305,7 +304,7 @@ public class TalentShow extends AbstractNpcAI | ||||
| 		hourDiff *= 3600000; | ||||
| 		minDiff *= 60000; | ||||
| 		diff = hourDiff + minDiff; | ||||
| 		LOGGER.info("Fantasy Isle: MC show script starting at " + (new SimpleDateFormat("dd/MM/yyyy HH:mm:ss")).format(Chronos.currentTimeMillis() + diff) + " and is scheduled each next 4 hours."); | ||||
| 		LOGGER.info("Fantasy Isle: MC show script starting at " + (new SimpleDateFormat("dd/MM/yyyy HH:mm:ss")).format(System.currentTimeMillis() + diff) + " and is scheduled each next 4 hours."); | ||||
| 		startQuestTimer("Start", diff, null, null); // first start | ||||
| 	} | ||||
| 	 | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package ai.areas.GainakUnderground.Lailly; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| @@ -65,7 +64,7 @@ public class Lailly extends AbstractNpcAI | ||||
| 			case "okay": | ||||
| 			{ | ||||
| 				final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false); | ||||
| 				if ((instance != null) && (instance.getEndTime() > Chronos.currentTimeMillis())) | ||||
| 				if ((instance != null) && (instance.getEndTime() > System.currentTimeMillis())) | ||||
| 				{ | ||||
| 					switch (instance.getTemplateId()) | ||||
| 					{ | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package ai.areas.KeucereusAllianceBase; | ||||
| import java.util.Calendar; | ||||
| import java.util.GregorianCalendar; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.SpawnTable; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| @@ -124,7 +123,7 @@ public class LindviorScene extends AbstractNpcAI | ||||
| 		final GregorianCalendar date = new GregorianCalendar(); | ||||
| 		date.set(Calendar.MINUTE, RESET_MIN); | ||||
| 		date.set(Calendar.HOUR_OF_DAY, RESET_HOUR); | ||||
| 		if (Chronos.currentTimeMillis() >= date.getTimeInMillis()) | ||||
| 		if (System.currentTimeMillis() >= date.getTimeInMillis()) | ||||
| 		{ | ||||
| 			date.add(Calendar.DAY_OF_WEEK, 1); | ||||
| 		} | ||||
| @@ -150,7 +149,7 @@ public class LindviorScene extends AbstractNpcAI | ||||
| 		{ | ||||
| 			date.add(Calendar.DAY_OF_WEEK, 1 + RESET_DAY_1); | ||||
| 		} | ||||
| 		return date.getTimeInMillis() - Chronos.currentTimeMillis(); | ||||
| 		return date.getTimeInMillis() - System.currentTimeMillis(); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package ai.areas.Rune.RuneCastle.Venom; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.enums.TeleportWhereType; | ||||
| @@ -112,7 +111,7 @@ public class Venom extends AbstractNpcAI | ||||
| 		setCastleSiegeStartId(this::onSiegeStart, CASTLE); | ||||
| 		setCastleSiegeFinishId(this::onSiegeFinish, CASTLE); | ||||
| 		 | ||||
| 		final long currentTime = Chronos.currentTimeMillis(); | ||||
| 		final long currentTime = System.currentTimeMillis(); | ||||
| 		final long startSiegeDate = CastleManager.getInstance().getCastleById(CASTLE).getSiegeDate().getTimeInMillis(); | ||||
| 		final long openingDungeonDate = startSiegeDate - (HOURS_BEFORE * 360000); | ||||
| 		if ((currentTime > openingDungeonDate) && (currentTime < startSiegeDate)) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.Calendar; | ||||
| import java.util.HashMap; | ||||
| import java.util.Map; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| @@ -230,7 +229,7 @@ public class SeedOfAnnihilation extends AbstractNpcAI | ||||
| 		 | ||||
| 		int buffsNow = 0; | ||||
| 		final Long var = GlobalVariablesManager.getInstance().getLong("SeedNextStatusChange", 0); | ||||
| 		if (var < Chronos.currentTimeMillis()) | ||||
| 		if (var < System.currentTimeMillis()) | ||||
| 		{ | ||||
| 			buffsNow = getRandom(ZONE_BUFFS_LIST.length); | ||||
| 			GlobalVariablesManager.getInstance().set("SeedBuffsList", String.valueOf(buffsNow)); | ||||
| @@ -255,7 +254,7 @@ public class SeedOfAnnihilation extends AbstractNpcAI | ||||
| 		reenter.set(Calendar.MINUTE, 0); | ||||
| 		reenter.set(Calendar.HOUR_OF_DAY, 13); | ||||
| 		reenter.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); | ||||
| 		if (reenter.getTimeInMillis() <= Chronos.currentTimeMillis()) | ||||
| 		if (reenter.getTimeInMillis() <= System.currentTimeMillis()) | ||||
| 		{ | ||||
| 			reenter.add(Calendar.DAY_OF_MONTH, 7); | ||||
| 		} | ||||
| @@ -273,7 +272,7 @@ public class SeedOfAnnihilation extends AbstractNpcAI | ||||
| 			} | ||||
| 			ZoneManager.getInstance().getZoneById(a_regionsData.buff_zone, EffectZone.class).addSkill(ZONE_BUFFS[a_regionsData.activeBuff], 1); | ||||
| 		} | ||||
| 		startQuestTimer("ChangeSeedsStatus", _seedsNextStatusChange - Chronos.currentTimeMillis(), null, null); | ||||
| 		startQuestTimer("ChangeSeedsStatus", _seedsNextStatusChange - System.currentTimeMillis(), null, null); | ||||
| 	} | ||||
| 	 | ||||
| 	private void spawnGroupOfMinion(Monster npc, int[] mobIds) | ||||
| @@ -318,7 +317,7 @@ public class SeedOfAnnihilation extends AbstractNpcAI | ||||
| 				zone.clearSkills(); | ||||
| 				zone.addSkill(ZONE_BUFFS[_regionsData[i].activeBuff], 1); | ||||
| 			} | ||||
| 			startQuestTimer("ChangeSeedsStatus", _seedsNextStatusChange - Chronos.currentTimeMillis(), null, null); | ||||
| 			startQuestTimer("ChangeSeedsStatus", _seedsNextStatusChange - System.currentTimeMillis(), null, null); | ||||
| 		} | ||||
| 		else if (event.equalsIgnoreCase("transform")) | ||||
| 		{ | ||||
|   | ||||
| @@ -17,7 +17,6 @@ | ||||
| package ai.bosses.Baium; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.enums.CategoryType; | ||||
| @@ -135,7 +134,7 @@ public class Baium extends AbstractNpcAI | ||||
| 				final int heading = info.getInt("heading"); | ||||
| 				_baium = (GrandBoss) addSpawn(BAIUM, loc_x, loc_y, loc_z, heading, false, 0); | ||||
| 				_baium.setCurrentHpMp(curr_hp, curr_mp); | ||||
| 				_lastAttack = Chronos.currentTimeMillis(); | ||||
| 				_lastAttack = System.currentTimeMillis(); | ||||
| 				addBoss(_baium); | ||||
| 				 | ||||
| 				for (Location loc : ARCHANGEL_LOC) | ||||
| @@ -148,7 +147,7 @@ public class Baium extends AbstractNpcAI | ||||
| 			} | ||||
| 			case DEAD: | ||||
| 			{ | ||||
| 				final long remain = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 				final long remain = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 				if (remain > 0) | ||||
| 				{ | ||||
| 					startQuestTimer("CLEAR_STATUS", remain, null, null); | ||||
| @@ -203,7 +202,7 @@ public class Baium extends AbstractNpcAI | ||||
| 					_baium.disableCoreAI(true); | ||||
| 					_baium.setRandomWalking(false); | ||||
| 					addBoss(_baium); | ||||
| 					_lastAttack = Chronos.currentTimeMillis(); | ||||
| 					_lastAttack = System.currentTimeMillis(); | ||||
| 					startQuestTimer("WAKEUP_ACTION", 50, _baium, null); | ||||
| 					startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player); | ||||
| 					startQuestTimer("CHECK_ATTACK", 60000, _baium, null); | ||||
| @@ -369,7 +368,7 @@ public class Baium extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "CHECK_ATTACK": | ||||
| 			{ | ||||
| 				if ((npc != null) && ((_lastAttack + 1800000) < Chronos.currentTimeMillis())) | ||||
| 				if ((npc != null) && ((_lastAttack + 1800000) < System.currentTimeMillis())) | ||||
| 				{ | ||||
| 					notifyEvent("CLEAR_ZONE", null, null); | ||||
| 					addSpawn(BAIUM_STONE, BAIUM_LOC, false, 0); | ||||
| @@ -377,7 +376,7 @@ public class Baium extends AbstractNpcAI | ||||
| 				} | ||||
| 				else if (npc != null) | ||||
| 				{ | ||||
| 					if (((_lastAttack + 300000) < Chronos.currentTimeMillis()) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.75))) | ||||
| 					if (((_lastAttack + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.75))) | ||||
| 					{ | ||||
| 						npc.setTarget(npc); | ||||
| 						npc.doCast(HEAL_OF_BAIUM.getSkill()); | ||||
| @@ -478,7 +477,7 @@ public class Baium extends AbstractNpcAI | ||||
| 	@Override | ||||
| 	public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon, Skill skill) | ||||
| 	{ | ||||
| 		_lastAttack = Chronos.currentTimeMillis(); | ||||
| 		_lastAttack = System.currentTimeMillis(); | ||||
| 		if (npc.getId() == BAIUM) | ||||
| 		{ | ||||
| 			if ((attacker.getMountType() == MountType.STRIDER) && !attacker.isAffectedBySkill(ANTI_STRIDER.getSkillId()) && !npc.isSkillDisabled(ANTI_STRIDER.getSkill())) | ||||
| @@ -658,7 +657,7 @@ public class Baium extends AbstractNpcAI | ||||
| 	 | ||||
| 	private void setRespawn(long respawnTime) | ||||
| 	{ | ||||
| 		GrandBossManager.getInstance().getStatSet(BAIUM).set("respawn_time", (Chronos.currentTimeMillis() + respawnTime)); | ||||
| 		GrandBossManager.getInstance().getStatSet(BAIUM).set("respawn_time", (System.currentTimeMillis() + respawnTime)); | ||||
| 	} | ||||
| 	 | ||||
| 	private void manageSkills(Npc npc) | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package ai.bosses.Baylor; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.Party; | ||||
| @@ -94,7 +93,7 @@ public class BaylorWarzone extends AbstractInstance | ||||
| 					return null; | ||||
| 				} | ||||
| 				 | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				final List<Player> members = party.getMembers(); | ||||
| 				for (Player member : members) | ||||
| 				{ | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.List; | ||||
| import java.util.concurrent.CopyOnWriteArrayList; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.cache.HtmCache; | ||||
| import org.l2jmobius.gameserver.data.xml.DoorData; | ||||
| @@ -109,7 +108,7 @@ public class Beleth extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(REAL_BELETH); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("BELETH_UNLOCK", time, null, null); | ||||
| @@ -350,7 +349,7 @@ public class Beleth extends AbstractNpcAI | ||||
| 					c.setImmobilized(false); | ||||
| 				} | ||||
| 				 | ||||
| 				_lastAttack = Chronos.currentTimeMillis(); | ||||
| 				_lastAttack = System.currentTimeMillis(); | ||||
| 				startQuestTimer("CHECK_ATTACK", 60000, null, null); | ||||
| 				startQuestTimer("SPAWN25", 60000, null, null); | ||||
| 				break; | ||||
| @@ -508,7 +507,7 @@ public class Beleth extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "CHECK_ATTACK": | ||||
| 			{ | ||||
| 				if ((_lastAttack + 900000) < Chronos.currentTimeMillis()) | ||||
| 				if ((_lastAttack + 900000) < System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					GrandBossManager.getInstance().setBossStatus(REAL_BELETH, ALIVE); | ||||
| 					for (Creature creature : ZONE.getCharactersInside()) | ||||
| @@ -709,7 +708,7 @@ public class Beleth extends AbstractNpcAI | ||||
| 			GrandBossManager.getInstance().setBossStatus(REAL_BELETH, DEAD); | ||||
| 			final long respawnTime = (Config.BELETH_SPAWN_INTERVAL + getRandom(-Config.BELETH_SPAWN_RANDOM, Config.BELETH_SPAWN_RANDOM)) * 3600000; | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(REAL_BELETH); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(REAL_BELETH, info); | ||||
| 			startQuestTimer("BELETH_UNLOCK", respawnTime, null, null); | ||||
| 			deleteAll(); | ||||
|   | ||||
| @@ -23,7 +23,6 @@ import java.util.Map.Entry; | ||||
| import java.util.concurrent.ConcurrentHashMap; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| @@ -88,7 +87,7 @@ public class Core extends AbstractNpcAI | ||||
| 		if (GrandBossManager.getInstance().getBossStatus(CORE) == DEAD) | ||||
| 		{ | ||||
| 			// Load the unlock date and time for Core from DB. | ||||
| 			final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long temp = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			// If Core is locked until a certain time, mark it so and start the unlock timer the unlock time has not yet expired. | ||||
| 			if (temp > 0) | ||||
| 			{ | ||||
| @@ -205,7 +204,7 @@ public class Core extends AbstractNpcAI | ||||
| 			startQuestTimer("core_unlock", respawnTime, null, null); | ||||
| 			// Also save the respawn time so that the info is maintained past reboots. | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(CORE); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(CORE, info); | ||||
| 			startQuestTimer("despawn_minions", 20000, null, null); | ||||
| 			cancelQuestTimers("spawn_minion"); | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.TeleportWhereType; | ||||
| @@ -332,7 +331,7 @@ public class EtisVanEtina extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(ETIS_VAN_ETINA1); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_etina", time, null, null); | ||||
| @@ -360,7 +359,7 @@ public class EtisVanEtina extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "check_activity_task": | ||||
| 			{ | ||||
| 				if ((_lastAction + 900000) < Chronos.currentTimeMillis()) | ||||
| 				if ((_lastAction + 900000) < System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					if (GrandBossManager.getInstance().getBossStatus(ETIS_VAN_ETINA1) != ALIVE) | ||||
| 					{ | ||||
| @@ -515,7 +514,7 @@ public class EtisVanEtina extends AbstractNpcAI | ||||
| 	@Override | ||||
| 	public String onAttack(Npc npc, Player attacker, int damage, boolean isSummon) | ||||
| 	{ | ||||
| 		_lastAction = Chronos.currentTimeMillis(); | ||||
| 		_lastAction = System.currentTimeMillis(); | ||||
| 		// Anti BUGGERS | ||||
| 		if (!BOSS_ZONE.isInsideZone(attacker)) | ||||
| 		{ | ||||
| @@ -698,7 +697,7 @@ public class EtisVanEtina extends AbstractNpcAI | ||||
| 				_paragon.setInvul(true); | ||||
| 				BOSS_ZONE.getPlayersInside().forEach(player -> player.sendPacket(new ExShowScreenMessage(NpcStringId.YOU_CAN_T_DEFEAT_PARAGON_WHILE_PARAGON_S_MINIONS_ARE_ALIVE, ExShowScreenMessage.TOP_CENTER, 7000, true))); | ||||
| 				GrandBossManager.getInstance().setBossStatus(ETIS_VAN_ETINA1, FIGHTING); | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				startQuestTimer("check_activity_task", 60000, null, null); | ||||
| 			} | ||||
| 		} | ||||
| @@ -730,7 +729,7 @@ public class EtisVanEtina extends AbstractNpcAI | ||||
| 			GrandBossManager.getInstance().setBossStatus(ETIS_VAN_ETINA1, DEAD); | ||||
| 			final long respawnTime = (Config.ETINA_SPAWN_INTERVAL + getRandom(-Config.ETINA_SPAWN_RANDOM, Config.ETINA_SPAWN_RANDOM)) * 3600000; | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(ETIS_VAN_ETINA1); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(ETIS_VAN_ETINA1, info); | ||||
| 			startQuestTimer("unlock_etina", respawnTime, null, null); | ||||
| 			startQuestTimer("end_etina", 900000, null, null); | ||||
|   | ||||
| @@ -20,7 +20,6 @@ package ai.bosses.Fafurion; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| @@ -85,7 +84,7 @@ public class Fafurion extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(FAFURION_GRANDBOSS_ID); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_fafurion", time, null, null); | ||||
| @@ -450,7 +449,7 @@ public class Fafurion extends AbstractNpcAI | ||||
| 			GrandBossManager.getInstance().setBossStatus(FAFURION_GRANDBOSS_ID, DEAD); | ||||
| 			final long respawnTime = (Config.FAFURION_SPAWN_INTERVAL + getRandom(-Config.FAFURION_SPAWN_RANDOM, Config.FAFURION_SPAWN_RANDOM)) * 3600000; | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(FAFURION_GRANDBOSS_ID); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(FAFURION_GRANDBOSS_ID, info); | ||||
| 			startQuestTimer("unlock_fafurion", respawnTime, null, null); | ||||
| 			if (_stage < 7) | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.Collections; | ||||
| import java.util.List; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.enums.MountType; | ||||
| @@ -273,7 +272,7 @@ public class IceQueensCastleBattle extends AbstractInstance | ||||
| 						{ | ||||
| 							startQuestTimer("STAGE_2_FAILED", 360000, controller, null); | ||||
| 							manageTimer(world, 360, NpcStringId.BATTLE_END_LIMIT_TIME); | ||||
| 							controller.getVariables().set("TIMER_END", Chronos.currentTimeMillis() + 360000); | ||||
| 							controller.getVariables().set("TIMER_END", System.currentTimeMillis() + 360000); | ||||
| 						} | ||||
| 						break; | ||||
| 					} | ||||
| @@ -666,7 +665,7 @@ public class IceQueensCastleBattle extends AbstractInstance | ||||
| 					} | ||||
| 					case "SHOW_GLAKIAS_TIMER": | ||||
| 					{ | ||||
| 						final int time = (int) ((controller.getVariables().getLong("TIMER_END", 0) - Chronos.currentTimeMillis()) / 1000); | ||||
| 						final int time = (int) ((controller.getVariables().getLong("TIMER_END", 0) - System.currentTimeMillis()) / 1000); | ||||
| 						manageTimer(world, time, NpcStringId.BATTLE_END_LIMIT_TIME); | ||||
| 						break; | ||||
| 					} | ||||
|   | ||||
| @@ -23,7 +23,6 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| import org.l2jmobius.gameserver.geoengine.GeoEngine; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| @@ -144,11 +143,11 @@ public class ScarletVanHalisha extends AbstractNpcAI | ||||
| 				{ | ||||
| 					return SkillData.getInstance().getSkill(FRINTEZZA_DAEMON_CHARGE, 2); | ||||
| 				} | ||||
| 				else if (((_lastRangedSkillTime + RANGED_SKILL_MIN_COOLTIME) < Chronos.currentTimeMillis()) && (getRandom(100) < 10)) | ||||
| 				else if (((_lastRangedSkillTime + RANGED_SKILL_MIN_COOLTIME) < System.currentTimeMillis()) && (getRandom(100) < 10)) | ||||
| 				{ | ||||
| 					return SkillData.getInstance().getSkill(FRINTEZZA_DAEMON_FIELD, 1); | ||||
| 				} | ||||
| 				else if (((_lastRangedSkillTime + RANGED_SKILL_MIN_COOLTIME) < Chronos.currentTimeMillis()) && (getRandom(100) < 10)) | ||||
| 				else if (((_lastRangedSkillTime + RANGED_SKILL_MIN_COOLTIME) < System.currentTimeMillis()) && (getRandom(100) < 10)) | ||||
| 				{ | ||||
| 					return SkillData.getInstance().getSkill(FRINTEZZA_DAEMON_MORPH, 1); | ||||
| 				} | ||||
| @@ -249,7 +248,7 @@ public class ScarletVanHalisha extends AbstractNpcAI | ||||
| 					case FRINTEZZA_DAEMON_MORPH: | ||||
| 					case FRINTEZZA_DAEMON_FIELD: | ||||
| 					{ | ||||
| 						_lastRangedSkillTime = Chronos.currentTimeMillis(); | ||||
| 						_lastRangedSkillTime = System.currentTimeMillis(); | ||||
| 						skillRange = 550; | ||||
| 						break; | ||||
| 					} | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.ZoneManager; | ||||
| @@ -151,7 +150,7 @@ public class Helios extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(HELIOS3); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_helios", time, null, null); | ||||
| @@ -485,7 +484,7 @@ public class Helios extends AbstractNpcAI | ||||
| 				GrandBossManager.getInstance().setBossStatus(HELIOS3, DEAD); | ||||
| 				final long respawnTime = (Config.HELIOS_SPAWN_INTERVAL + getRandom(-Config.HELIOS_SPAWN_RANDOM, Config.HELIOS_SPAWN_RANDOM)) * 3600000; | ||||
| 				final StatSet info = GrandBossManager.getInstance().getStatSet(HELIOS3); | ||||
| 				info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 				info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 				GrandBossManager.getInstance().setStatSet(HELIOS3, info); | ||||
| 				startQuestTimer("unlock_helios", respawnTime, null, null); | ||||
| 				break; | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.TeleportWhereType; | ||||
| @@ -121,7 +120,7 @@ public class Kelbim extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(KELBIM); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_kelbim", time, null, null); | ||||
| @@ -156,7 +155,7 @@ public class Kelbim extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "check_activity_task": | ||||
| 			{ | ||||
| 				if ((_lastAction + 900000) < Chronos.currentTimeMillis()) | ||||
| 				if ((_lastAction + 900000) < System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					GrandBossManager.getInstance().setBossStatus(KELBIM, ALIVE); | ||||
| 					for (Creature creature : ZONE.getCharactersInside()) | ||||
| @@ -193,7 +192,7 @@ public class Kelbim extends AbstractNpcAI | ||||
| 			{ | ||||
| 				_kelbimBoss = (GrandBoss) addSpawn(KELBIM, -56340, 60801, -269, 54262, false, 0); | ||||
| 				GrandBossManager.getInstance().addBoss(_kelbimBoss); | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				startQuestTimer("check_activity_task", 60000, null, null); | ||||
| 				startQuestTimer("stage_all_random_area_attack", getRandom(2, 3) * 60000, null, null); | ||||
| 				break; | ||||
| @@ -369,7 +368,7 @@ public class Kelbim extends AbstractNpcAI | ||||
| 	{ | ||||
| 		if (npc.getId() == KELBIM) | ||||
| 		{ | ||||
| 			_lastAction = Chronos.currentTimeMillis(); | ||||
| 			_lastAction = System.currentTimeMillis(); | ||||
| 			 | ||||
| 			switch (_bossStage) | ||||
| 			{ | ||||
| @@ -434,7 +433,7 @@ public class Kelbim extends AbstractNpcAI | ||||
| 		GrandBossManager.getInstance().setBossStatus(KELBIM, DEAD); | ||||
| 		final long respawnTime = (Config.KELBIM_SPAWN_INTERVAL + getRandom(-Config.KELBIM_SPAWN_RANDOM, Config.KELBIM_SPAWN_RANDOM)) * 3600000; | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(KELBIM); | ||||
| 		info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 		info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 		GrandBossManager.getInstance().setStatSet(KELBIM, info); | ||||
| 		startQuestTimer("unlock_kelbim", respawnTime, null, null); | ||||
| 		startQuestTimer("end_kelbim", 1800000, null, null); | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.data.SpawnTable; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| @@ -227,7 +226,7 @@ public class Lindvior extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(LINDVIOR_RAID); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_lindvior", time, null, null); | ||||
| @@ -855,7 +854,7 @@ public class Lindvior extends AbstractNpcAI | ||||
| 			GrandBossManager.getInstance().setBossStatus(LINDVIOR_RAID, DEAD); | ||||
| 			final long respawnTime = (Config.LINDVIOR_SPAWN_INTERVAL + getRandom(-Config.LINDVIOR_SPAWN_RANDOM, Config.LINDVIOR_SPAWN_RANDOM)) * 3600000; | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(LINDVIOR_RAID); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(LINDVIOR_RAID, info); | ||||
| 			startQuestTimer("unlock_lindvior", respawnTime, null, null); | ||||
| 		} | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.Set; | ||||
| import java.util.concurrent.ConcurrentHashMap; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| @@ -89,7 +88,7 @@ public class Orfen extends AbstractNpcAI | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			// load the unlock date and time for Orfen from DB | ||||
| 			final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long temp = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			// if Orfen is locked until a certain time, mark it so and start the unlock timer | ||||
| 			// the unlock time has not yet expired. | ||||
| 			if (temp > 0) | ||||
| @@ -310,7 +309,7 @@ public class Orfen extends AbstractNpcAI | ||||
| 			startQuestTimer("orfen_unlock", respawnTime, null, null); | ||||
| 			// also save the respawn time so that the info is maintained past reboots | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(ORFEN, info); | ||||
| 			cancelQuestTimer("check_minion_loc", npc, null); | ||||
| 			startQuestTimer("despawn_minions", 20000, null, null); | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.Set; | ||||
| import java.util.concurrent.ConcurrentHashMap; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.ZoneManager; | ||||
| @@ -97,7 +96,7 @@ public class QueenAnt extends AbstractNpcAI | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			// load the unlock date and time for queen ant from DB | ||||
| 			final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long temp = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			// if queen ant is locked until a certain time, mark it so and start the unlock timer | ||||
| 			// the unlock time has not yet expired. | ||||
| 			if (temp > 0) | ||||
| @@ -368,7 +367,7 @@ public class QueenAnt extends AbstractNpcAI | ||||
| 			cancelQuestTimer("heal", null, null); | ||||
| 			// also save the respawn time so that the info is maintained past reboots | ||||
| 			final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN); | ||||
| 			info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 			info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 			GrandBossManager.getInstance().setStatSet(QUEEN, info); | ||||
| 			_nurses.clear(); | ||||
| 			if (_larva != null) | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package ai.bosses.QueenShyeed; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.ZoneManager; | ||||
| @@ -88,7 +87,7 @@ public class QueenShyeed extends AbstractNpcAI | ||||
| 	private void spawnShyeed() | ||||
| 	{ | ||||
| 		final long respawn = GlobalVariablesManager.getInstance().getLong("QueenShyeedRespawn", 0); | ||||
| 		final long remain = respawn != 0 ? respawn - Chronos.currentTimeMillis() : 0; | ||||
| 		final long remain = respawn != 0 ? respawn - System.currentTimeMillis() : 0; | ||||
| 		if (remain > 0) | ||||
| 		{ | ||||
| 			startQuestTimer("respawn", remain, null, null); | ||||
| @@ -104,7 +103,7 @@ public class QueenShyeed extends AbstractNpcAI | ||||
| 	private void startRespawn() | ||||
| 	{ | ||||
| 		final int respawnTime = RESPAWN - getRandom(RANDOM_RESPAWN); | ||||
| 		GlobalVariablesManager.getInstance().set("QueenShyeedRespawn", Long.toString(Chronos.currentTimeMillis() + respawnTime)); | ||||
| 		GlobalVariablesManager.getInstance().set("QueenShyeedRespawn", Long.toString(System.currentTimeMillis() + respawnTime)); | ||||
| 		startQuestTimer("respawn", respawnTime, null, null); | ||||
| 		// MOB_BUFF_ZONE.setEnabled(false); | ||||
| 		MOB_BUFF_DISPLAY_ZONE.setEnabled(false); | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.List; | ||||
| import java.util.concurrent.CopyOnWriteArrayList; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| @@ -137,7 +136,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 		addSpawnId(RAMONA_1, RAMONA_2, RAMONA_3); | ||||
| 		addCreatureSeeId(MP_CONTROL); | ||||
| 		 | ||||
| 		final long temp = GlobalVariablesManager.getInstance().getLong(RAMONA_RESPAWN_VAR, 0) - Chronos.currentTimeMillis(); | ||||
| 		final long temp = GlobalVariablesManager.getInstance().getLong(RAMONA_RESPAWN_VAR, 0) - System.currentTimeMillis(); | ||||
| 		if (temp > 0) | ||||
| 		{ | ||||
| 			_boss = Status.DEAD; | ||||
| @@ -167,7 +166,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 					npc.setInvul(false); | ||||
| 					cancelQuestTimers("SPAWN_MS"); | ||||
| 					startQuestTimer("CHECK_ACTIVITY_TASK", 5000, null, null); | ||||
| 					_lastAction = Chronos.currentTimeMillis(); | ||||
| 					_lastAction = System.currentTimeMillis(); | ||||
| 				} | ||||
| 				break; | ||||
| 			} | ||||
| @@ -186,7 +185,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 				startQuestTimer("GENERATOR_2", getRandom(900000, 1200000), null, null); | ||||
| 				startQuestTimer("GENERATOR_3", getRandom(1500000, 1800000), null, null); | ||||
| 				startQuestTimer("GENERATOR_4", getRandom(2100000, 2400000), null, null); | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				startQuestTimer("RAMONA1_SKILL", 6000, _ramona1, null); | ||||
| 				break; | ||||
| 			} | ||||
| @@ -300,7 +299,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "CHECK_ACTIVITY_TASK": | ||||
| 			{ | ||||
| 				if ((_lastAction + 900000) < Chronos.currentTimeMillis()) | ||||
| 				if ((_lastAction + 900000) < System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					for (Creature creature : ZONE.getCharactersInside()) | ||||
| 					{ | ||||
| @@ -402,7 +401,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 					startQuestTimer("SPAWN_RAMONA2", 1000, null, null); | ||||
| 					startQuestTimer("SPAWN_RAMONA_MINIONS", 6000, _ramona2, null); | ||||
| 				} | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				break; | ||||
| 			} | ||||
| 			case RAMONA_2: | ||||
| @@ -413,12 +412,12 @@ public class Ramona extends AbstractNpcAI | ||||
| 					startQuestTimer("SPAWN_RAMONA3", 1000, null, null); | ||||
| 					startQuestTimer("SPAWN_RAMONA_MINIONS_1", 6000, _ramona3, null); | ||||
| 				} | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				break; | ||||
| 			} | ||||
| 			case RAMONA_3: | ||||
| 			{ | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
| @@ -540,7 +539,7 @@ public class Ramona extends AbstractNpcAI | ||||
| 			{ | ||||
| 				_boss = Status.DEAD; | ||||
| 				final long respawnTime = (Config.RAMONA_SPAWN_INTERVAL + getRandom(-Config.RAMONA_SPAWN_RANDOM, Config.RAMONA_SPAWN_RANDOM)) * 3600000; | ||||
| 				GlobalVariablesManager.getInstance().set(RAMONA_RESPAWN_VAR, Chronos.currentTimeMillis() + respawnTime); | ||||
| 				GlobalVariablesManager.getInstance().set(RAMONA_RESPAWN_VAR, System.currentTimeMillis() + respawnTime); | ||||
| 				startQuestTimer("RAMONA_UNLOCK", respawnTime, null, null); | ||||
| 				startQuestTimer("END_RAMONA", 90000, null, null); | ||||
| 				break; | ||||
| @@ -568,13 +567,13 @@ public class Ramona extends AbstractNpcAI | ||||
| 			case RAMONA_1: | ||||
| 			{ | ||||
| 				_boss = Status.IN_FIGHT; | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				break; | ||||
| 			} | ||||
| 			case RAMONA_2: | ||||
| 			case RAMONA_3: | ||||
| 			{ | ||||
| 				_lastAction = Chronos.currentTimeMillis(); | ||||
| 				_lastAction = System.currentTimeMillis(); | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package ai.bosses.Sailren; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.TeleportWhereType; | ||||
| import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.ZoneManager; | ||||
| @@ -72,7 +71,7 @@ public class Sailren extends AbstractNpcAI | ||||
| 		addKillId(VELOCIRAPTOR, PTEROSAUR, TREX, SAILREN); | ||||
| 		addAttackId(VELOCIRAPTOR, PTEROSAUR, TREX, SAILREN); | ||||
| 		 | ||||
| 		final long remain = GlobalVariablesManager.getInstance().getLong("SailrenRespawn", 0) - Chronos.currentTimeMillis(); | ||||
| 		final long remain = GlobalVariablesManager.getInstance().getLong("SailrenRespawn", 0) - System.currentTimeMillis(); | ||||
| 		if (remain > 0) | ||||
| 		{ | ||||
| 			STATUS = Status.DEAD; | ||||
| @@ -119,7 +118,7 @@ public class Sailren extends AbstractNpcAI | ||||
| 				{ | ||||
| 					takeItems(player, GAZKH, 1); | ||||
| 					STATUS = Status.IN_FIGHT; | ||||
| 					_lastAttack = Chronos.currentTimeMillis(); | ||||
| 					_lastAttack = System.currentTimeMillis(); | ||||
| 					for (Player member : player.getParty().getMembers()) | ||||
| 					{ | ||||
| 						if (member.isInsideRadius3D(npc, 1000)) | ||||
| @@ -238,7 +237,7 @@ public class Sailren extends AbstractNpcAI | ||||
| 			} | ||||
| 			case "CHECK_ATTACK": | ||||
| 			{ | ||||
| 				if (!zone.getPlayersInside().isEmpty() && ((_lastAttack + 600000) < Chronos.currentTimeMillis())) | ||||
| 				if (!zone.getPlayersInside().isEmpty() && ((_lastAttack + 600000) < System.currentTimeMillis())) | ||||
| 				{ | ||||
| 					cancelQuestTimer("TIME_OUT", null, null); | ||||
| 					notifyEvent("TIME_OUT", null, null); | ||||
| @@ -258,7 +257,7 @@ public class Sailren extends AbstractNpcAI | ||||
| 	{ | ||||
| 		if (zone.isCharacterInZone(attacker)) | ||||
| 		{ | ||||
| 			_lastAttack = Chronos.currentTimeMillis(); | ||||
| 			_lastAttack = System.currentTimeMillis(); | ||||
| 		} | ||||
| 		return super.onAttack(npc, attacker, damage, isSummon); | ||||
| 	} | ||||
| @@ -275,7 +274,7 @@ public class Sailren extends AbstractNpcAI | ||||
| 					STATUS = Status.DEAD; | ||||
| 					addSpawn(CUBIC, 27644, -6638, -2008, 0, false, 300000); | ||||
| 					final long respawnTime = RESPAWN * 3600000; | ||||
| 					GlobalVariablesManager.getInstance().set("SailrenRespawn", Chronos.currentTimeMillis() + respawnTime); | ||||
| 					GlobalVariablesManager.getInstance().set("SailrenRespawn", System.currentTimeMillis() + respawnTime); | ||||
| 					cancelQuestTimer("CHECK_ATTACK", null, null); | ||||
| 					cancelQuestTimer("TIME_OUT", null, null); | ||||
| 					startQuestTimer("CLEAR_STATUS", respawnTime, null, null); | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.SpawnTable; | ||||
| import org.l2jmobius.gameserver.data.xml.DoorData; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| @@ -328,7 +327,7 @@ public class Trasken extends AbstractNpcAI | ||||
| 		final int status = GrandBossManager.getInstance().getBossStatus(TRASKEN); | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			final long time = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long time = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (time > 0) | ||||
| 			{ | ||||
| 				startQuestTimer("unlock_trasken", time, null, null); | ||||
| @@ -608,7 +607,7 @@ public class Trasken extends AbstractNpcAI | ||||
| 				GrandBossManager.getInstance().setBossStatus(TRASKEN, DEAD); | ||||
| 				final long respawnTime = (Config.TRASKEN_SPAWN_INTERVAL + getRandom(-Config.TRASKEN_SPAWN_RANDOM, Config.TRASKEN_SPAWN_RANDOM)) * 3600000; | ||||
| 				final StatSet info = GrandBossManager.getInstance().getStatSet(TRASKEN); | ||||
| 				info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 				info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 				GrandBossManager.getInstance().setStatSet(TRASKEN, info); | ||||
| 				startQuestTimer("unlock_trasken", respawnTime, null, null); | ||||
| 				break; | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| import org.l2jmobius.gameserver.enums.MountType; | ||||
| @@ -130,7 +129,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 		if (status == DEAD) | ||||
| 		{ | ||||
| 			// load the unlock date and time for valakas from DB | ||||
| 			final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis(); | ||||
| 			final long temp = info.getLong("respawn_time") - System.currentTimeMillis(); | ||||
| 			if (temp > 0) | ||||
| 			{ | ||||
| 				// The time has not yet expired. Mark Valakas as currently locked (dead). | ||||
| @@ -169,7 +168,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 			if (status == FIGHTING) | ||||
| 			{ | ||||
| 				// stores current time for inactivity task. | ||||
| 				_timeTracker = Chronos.currentTimeMillis(); | ||||
| 				_timeTracker = System.currentTimeMillis(); | ||||
| 				 | ||||
| 				startQuestTimer("regen_task", 60000, valakas, null, true); | ||||
| 				startQuestTimer("skill_task", 2000, valakas, null, true); | ||||
| @@ -197,7 +196,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 			if (event.equalsIgnoreCase("beginning")) | ||||
| 			{ | ||||
| 				// Stores current time | ||||
| 				_timeTracker = Chronos.currentTimeMillis(); | ||||
| 				_timeTracker = System.currentTimeMillis(); | ||||
| 				 | ||||
| 				// Teleport Valakas to his lair. | ||||
| 				npc.teleToLocation(VALAKAS_LAIR); | ||||
| @@ -221,7 +220,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 			else if (event.equalsIgnoreCase("regen_task")) | ||||
| 			{ | ||||
| 				// Inactivity task - 15min | ||||
| 				if ((GrandBossManager.getInstance().getBossStatus(VALAKAS) == FIGHTING) && ((_timeTracker + 900000) < Chronos.currentTimeMillis())) | ||||
| 				if ((GrandBossManager.getInstance().getBossStatus(VALAKAS) == FIGHTING) && ((_timeTracker + 900000) < System.currentTimeMillis())) | ||||
| 				{ | ||||
| 					npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); | ||||
| 					npc.teleToLocation(VALAKAS_REGENERATION_LOC); | ||||
| @@ -417,7 +416,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 			npc.setTarget(attacker); | ||||
| 			npc.doCast(SkillData.getInstance().getSkill(4258, 1)); | ||||
| 		} | ||||
| 		_timeTracker = Chronos.currentTimeMillis(); | ||||
| 		_timeTracker = System.currentTimeMillis(); | ||||
| 		 | ||||
| 		return super.onAttack(npc, attacker, damage, isSummon); | ||||
| 	} | ||||
| @@ -448,7 +447,7 @@ public class Valakas extends AbstractNpcAI | ||||
| 		startQuestTimer("valakas_unlock", respawnTime, null, null); | ||||
| 		// also save the respawn time so that the info is maintained past reboots | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS); | ||||
| 		info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime); | ||||
| 		info.set("respawn_time", System.currentTimeMillis() + respawnTime); | ||||
| 		GrandBossManager.getInstance().setStatSet(VALAKAS, info); | ||||
| 		 | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.Calendar; | ||||
| import java.util.logging.Level; | ||||
|  | ||||
| import org.l2jmobius.commons.database.DatabaseFactory; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -98,13 +97,13 @@ public class AetherDrops extends AbstractNpcAI | ||||
| 			final Calendar calendar = Calendar.getInstance(); | ||||
| 			calendar.set(Calendar.HOUR_OF_DAY, 6); | ||||
| 			calendar.set(Calendar.MINUTE, 30); | ||||
| 			if (calendar.getTimeInMillis() < Chronos.currentTimeMillis()) | ||||
| 			if (calendar.getTimeInMillis() < System.currentTimeMillis()) | ||||
| 			{ | ||||
| 				calendar.add(Calendar.DAY_OF_YEAR, 1); | ||||
| 			} | ||||
| 			 | ||||
| 			cancelQuestTimers("reset"); | ||||
| 			startQuestTimer("reset", calendar.getTimeInMillis() - Chronos.currentTimeMillis(), null, null); | ||||
| 			startQuestTimer("reset", calendar.getTimeInMillis() - System.currentTimeMillis(), null, null); | ||||
| 		} | ||||
| 		else if (event.equals("reset")) | ||||
| 		{ | ||||
|   | ||||
| @@ -26,7 +26,6 @@ import java.util.Optional; | ||||
| import java.util.concurrent.TimeUnit; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.ClanHallData; | ||||
| import org.l2jmobius.gameserver.instancemanager.ClanHallAuctionManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| @@ -155,7 +154,7 @@ public class ClanHallAuctioneer extends AbstractNpcAI | ||||
| 						htmltext = htmltext.replace("%id%", String.valueOf(clanHallAuction.getClanHallId())); | ||||
| 						htmltext = htmltext.replace("%minBid%", String.valueOf(clanHallAuction.getHighestBid())); | ||||
| 						htmltext = htmltext.replace("%myBid%", String.valueOf(clanHallAuction.getClanBid(clan))); | ||||
| 						htmltext = htmltext.replace("%auctionEnd%", builder.appendPattern("dd/MM/yyyy HH").appendLiteral(" hour ").appendPattern("mm").appendLiteral(" minutes").toFormatter().format(Instant.ofEpochMilli(Chronos.currentTimeMillis() + ClanHallAuctionManager.getInstance().getRemainingTime()).atZone(ZoneId.systemDefault()))); | ||||
| 						htmltext = htmltext.replace("%auctionEnd%", builder.appendPattern("dd/MM/yyyy HH").appendLiteral(" hour ").appendPattern("mm").appendLiteral(" minutes").toFormatter().format(Instant.ofEpochMilli(System.currentTimeMillis() + ClanHallAuctionManager.getInstance().getRemainingTime()).atZone(ZoneId.systemDefault()))); | ||||
| 					} | ||||
| 				} | ||||
| 				else | ||||
| @@ -191,7 +190,7 @@ public class ClanHallAuctioneer extends AbstractNpcAI | ||||
| 				final ClanHall clanHall = ClanHallData.getInstance().getClanHallById(clanHallAuction.getClanHallId()); | ||||
| 				final Clan owner = clanHall.getOwner(); | ||||
| 				final long remainingTime = ClanHallAuctionManager.getInstance().getRemainingTime(); | ||||
| 				final Instant endTime = Instant.ofEpochMilli(Chronos.currentTimeMillis() + remainingTime); | ||||
| 				final Instant endTime = Instant.ofEpochMilli(System.currentTimeMillis() + remainingTime); | ||||
| 				 | ||||
| 				final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); | ||||
| 				htmltext = getHtm(player, "ClanHallAuctioneer-bidInfo.html"); | ||||
| @@ -249,7 +248,7 @@ public class ClanHallAuctioneer extends AbstractNpcAI | ||||
| 				final ClanHallAuction clanHallAuction = ClanHallAuctionManager.getInstance().getClanHallAuctionById(clanHallId); | ||||
| 				final Clan owner = clanHall.getOwner(); | ||||
| 				final long remainingTime = ClanHallAuctionManager.getInstance().getRemainingTime(); | ||||
| 				final Instant endTime = Instant.ofEpochMilli(Chronos.currentTimeMillis() + remainingTime); | ||||
| 				final Instant endTime = Instant.ofEpochMilli(System.currentTimeMillis() + remainingTime); | ||||
| 				final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); | ||||
| 				final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); | ||||
| 				html.setHtml(getHtm(player, "ClanHallAuctioneer-info.html")); | ||||
| @@ -298,7 +297,7 @@ public class ClanHallAuctioneer extends AbstractNpcAI | ||||
| 					sb.append("\"><font color=\"ffffaa\">&%"); | ||||
| 					sb.append(clanHall.getResidenceId()); | ||||
| 					sb.append(";[0]</font></a></td><td width=50>"); | ||||
| 					sb.append(DateTimeFormatter.ofPattern("dd/MM/yyyy").format(Instant.ofEpochMilli(Chronos.currentTimeMillis() + ClanHallAuctionManager.getInstance().getRemainingTime()).atZone(ZoneId.systemDefault()))); | ||||
| 					sb.append(DateTimeFormatter.ofPattern("dd/MM/yyyy").format(Instant.ofEpochMilli(System.currentTimeMillis() + ClanHallAuctionManager.getInstance().getRemainingTime()).atZone(ZoneId.systemDefault()))); | ||||
| 					sb.append("</td><td width=70 align=right><font color=\"aaffff\">"); | ||||
| 					sb.append(auction.getHighestBid()); | ||||
| 					sb.append("</font></td></tr>"); | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.LinkedHashMap; | ||||
| import java.util.Map; | ||||
| import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.ClanHallData; | ||||
| import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| @@ -74,7 +73,7 @@ public class ProvisionalHalls extends AbstractNpcAI | ||||
| 			if (resetTime > 0) | ||||
| 			{ | ||||
| 				cancelQuestTimers(HALL_RESET_VAR + id); | ||||
| 				startQuestTimer(HALL_RESET_VAR + id, Math.max(1000, (TWO_WEEKS - (Chronos.currentTimeMillis() - resetTime) - 30000)), null, null); | ||||
| 				startQuestTimer(HALL_RESET_VAR + id, Math.max(1000, (TWO_WEEKS - (System.currentTimeMillis() - resetTime) - 30000)), null, null); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| @@ -127,7 +126,7 @@ public class ProvisionalHalls extends AbstractNpcAI | ||||
| 					 | ||||
| 					for (int id : CLAN_HALLS.keySet()) | ||||
| 					{ | ||||
| 						if ((GlobalVariablesManager.getInstance().getInt(HALL_OWNER_VAR + id, 0) == 0) && ((GlobalVariablesManager.getInstance().getLong(HALL_TIME_VAR + id, 0) + TWO_WEEKS) < Chronos.currentTimeMillis())) | ||||
| 						if ((GlobalVariablesManager.getInstance().getInt(HALL_OWNER_VAR + id, 0) == 0) && ((GlobalVariablesManager.getInstance().getLong(HALL_TIME_VAR + id, 0) + TWO_WEEKS) < System.currentTimeMillis())) | ||||
| 						{ | ||||
| 							player.reduceAdena("ProvisionalHall", HALL_PRICE, player, true); | ||||
| 							GlobalVariablesManager.getInstance().set(HALL_OWNER_VAR + id, player.getClanId()); | ||||
| @@ -138,7 +137,7 @@ public class ProvisionalHalls extends AbstractNpcAI | ||||
| 								clanHall.setOwner(player.getClan()); | ||||
| 							} | ||||
| 							player.sendMessage("Congratulations! You now own a provisional clan hall!"); | ||||
| 							startQuestTimer("RESET_ORCHID_HALL", TWO_WEEKS - (Chronos.currentTimeMillis() - calendar.getTimeInMillis()), null, null); | ||||
| 							startQuestTimer("RESET_ORCHID_HALL", TWO_WEEKS - (System.currentTimeMillis() - calendar.getTimeInMillis()), null, null); | ||||
| 							return null; | ||||
| 						} | ||||
| 					} | ||||
| @@ -178,7 +177,7 @@ public class ProvisionalHalls extends AbstractNpcAI | ||||
| 		else if (event.startsWith(HALL_RESET_VAR)) | ||||
| 		{ | ||||
| 			final String id = event.replace(HALL_RESET_VAR, ""); | ||||
| 			if (((GlobalVariablesManager.getInstance().getLong(HALL_TIME_VAR + id, 0) + TWO_WEEKS) - 60000) <= Chronos.currentTimeMillis()) | ||||
| 			if (((GlobalVariablesManager.getInstance().getLong(HALL_TIME_VAR + id, 0) + TWO_WEEKS) - 60000) <= System.currentTimeMillis()) | ||||
| 			{ | ||||
| 				final int clanId = GlobalVariablesManager.getInstance().getInt(HALL_OWNER_VAR + id, 0); | ||||
| 				if (clanId > 0) | ||||
|   | ||||
| @@ -134,7 +134,7 @@ public class TvT extends Event | ||||
| 		// calendar.set(Calendar.HOUR_OF_DAY, 20); | ||||
| 		// calendar.set(Calendar.MINUTE, 0); | ||||
| 		// calendar.set(Calendar.SECOND, 0); | ||||
| 		// ThreadPool.scheduleAtFixedRate(() -> eventStart(null), calendar.getTimeInMillis() - Chronos.currentTimeMillis(), 86400000); // 86400000 = 1 day | ||||
| 		// ThreadPool.scheduleAtFixedRate(() -> eventStart(null), calendar.getTimeInMillis() - System.currentTimeMillis(), 86400000); // 86400000 = 1 day | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package events.FreyaCelebration; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.WorldObject; | ||||
| @@ -80,7 +79,7 @@ public class FreyaCelebration extends LongTimeEvent | ||||
| 		{ | ||||
| 			if (getQuestItemsCount(player, Inventory.ADENA_ID) > 1) | ||||
| 			{ | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				final long reuseTime = player.getVariables().getLong(RESET_VAR, 0); | ||||
| 				if (currentTime > reuseTime) | ||||
| 				{ | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package events.GiftOfVitality; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| @@ -95,9 +94,9 @@ public class GiftOfVitality extends LongTimeEvent | ||||
| 			case "vitality": | ||||
| 			{ | ||||
| 				final long reuse = player.getVariables().getLong(REUSE, 0); | ||||
| 				if (reuse > Chronos.currentTimeMillis()) | ||||
| 				if (reuse > System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					final long remainingTime = (reuse - Chronos.currentTimeMillis()) / 1000; | ||||
| 					final long remainingTime = (reuse - System.currentTimeMillis()) / 1000; | ||||
| 					final int hours = (int) (remainingTime / 3600); | ||||
| 					final int minutes = (int) ((remainingTime % 3600) / 60); | ||||
| 					final SystemMessage sm = new SystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S); | ||||
| @@ -111,7 +110,7 @@ public class GiftOfVitality extends LongTimeEvent | ||||
| 				{ | ||||
| 					SkillCaster.triggerCast(player, player, GIFT_OF_VITALITY.getSkill()); | ||||
| 					SkillCaster.triggerCast(player, player, JOY_OF_VITALITY.getSkill()); | ||||
| 					player.getVariables().set(REUSE, Chronos.currentTimeMillis() + (HOURS * 3600000)); | ||||
| 					player.getVariables().set(REUSE, System.currentTimeMillis() + (HOURS * 3600000)); | ||||
| 					htmltext = "4306-okvitality.htm"; | ||||
| 				} | ||||
| 				break; | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package events.HappyHours; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -40,7 +39,7 @@ public class HappyHours extends LongTimeEvent | ||||
| 	// Other | ||||
| 	private static final int MIN_LEVEL = 20; | ||||
| 	private static final int REWARD_INTERVAL = 60 * 60 * 1000; // 1 hour | ||||
| 	private static long _lastRewardTime = Chronos.currentTimeMillis(); | ||||
| 	private static long _lastRewardTime = System.currentTimeMillis(); | ||||
| 	 | ||||
| 	private HappyHours() | ||||
| 	{ | ||||
| @@ -77,9 +76,9 @@ public class HappyHours extends LongTimeEvent | ||||
| 			{ | ||||
| 				if (isEventPeriod()) | ||||
| 				{ | ||||
| 					if ((Chronos.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case. | ||||
| 					if ((System.currentTimeMillis() - (_lastRewardTime + REWARD_INTERVAL)) > 0) // Exploit check - Just in case. | ||||
| 					{ | ||||
| 						_lastRewardTime = Chronos.currentTimeMillis(); | ||||
| 						_lastRewardTime = System.currentTimeMillis(); | ||||
| 						final ExShowScreenMessage screenMsg = new ExShowScreenMessage("You obtained 20 Sibi's coins.", ExShowScreenMessage.TOP_CENTER, 7000, 0, true, true); | ||||
| 						final SystemMessage systemMsg = new SystemMessage(SystemMessageId.YOU_VE_OBTAINED_S1_LUCKY_COINS); | ||||
| 						systemMsg.addInt(20); | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package events.LoveYourGatekeeper; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| @@ -59,9 +58,9 @@ public class LoveYourGatekeeper extends LongTimeEvent | ||||
| 				if (player.getAdena() >= PRICE) | ||||
| 				{ | ||||
| 					final long reuse = player.getVariables().getLong(REUSE, 0); | ||||
| 					if (reuse > Chronos.currentTimeMillis()) | ||||
| 					if (reuse > System.currentTimeMillis()) | ||||
| 					{ | ||||
| 						final long remainingTime = (reuse - Chronos.currentTimeMillis()) / 1000; | ||||
| 						final long remainingTime = (reuse - System.currentTimeMillis()) / 1000; | ||||
| 						final int hours = (int) (remainingTime / 3600); | ||||
| 						final int minutes = (int) ((remainingTime % 3600) / 60); | ||||
| 						final SystemMessage sm = new SystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S); | ||||
| @@ -74,7 +73,7 @@ public class LoveYourGatekeeper extends LongTimeEvent | ||||
| 					{ | ||||
| 						takeItems(player, Inventory.ADENA_ID, PRICE); | ||||
| 						giveItems(player, GATEKEEPER_TRANSFORMATION_STICK, 1); | ||||
| 						player.getVariables().set(REUSE, Chronos.currentTimeMillis() + (HOURS * 3600000)); | ||||
| 						player.getVariables().set(REUSE, System.currentTimeMillis() + (HOURS * 3600000)); | ||||
| 					} | ||||
| 				} | ||||
| 				else | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package events.MasterOfEnchanting; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.itemcontainer.Inventory; | ||||
| @@ -87,7 +86,7 @@ public class MasterOfEnchanting extends LongTimeEvent | ||||
| 		} | ||||
| 		else if (event.equalsIgnoreCase("buy_scroll_24")) | ||||
| 		{ | ||||
| 			final long curTime = Chronos.currentTimeMillis(); | ||||
| 			final long curTime = System.currentTimeMillis(); | ||||
| 			final String value = player.getVariables().getString("MasterOfEnchanting", ""); | ||||
| 			final long reuse = value.equals("") ? 0 : Long.parseLong(value); | ||||
| 			if (player.getCreateDate().after(getEventPeriod().getStartDate())) | ||||
| @@ -101,7 +100,7 @@ public class MasterOfEnchanting extends LongTimeEvent | ||||
| 				{ | ||||
| 					takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE); | ||||
| 					giveItems(player, MASTER_YOGI_SCROLL, 24); | ||||
| 					player.getVariables().set("MasterOfEnchanting", Long.toString(Chronos.currentTimeMillis() + (SCROLL_24_TIME * 3600000))); | ||||
| 					player.getVariables().set("MasterOfEnchanting", Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000))); | ||||
| 					htmltext = "32599-scroll24.htm"; | ||||
| 				} | ||||
| 				else | ||||
| @@ -135,7 +134,7 @@ public class MasterOfEnchanting extends LongTimeEvent | ||||
| 				{ | ||||
| 					takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE); | ||||
| 					giveItems(player, MASTER_YOGI_SCROLL, 24); | ||||
| 					player.getVariables().set("MasterOfEnchanting", Long.toString(Chronos.currentTimeMillis() + (SCROLL_24_TIME * 3600000))); | ||||
| 					player.getVariables().set("MasterOfEnchanting", Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000))); | ||||
| 					htmltext = "32599-scroll24.htm"; | ||||
| 				} | ||||
| 				else | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.Map; | ||||
| import java.util.concurrent.ConcurrentHashMap; | ||||
|  | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.data.ItemTable; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| @@ -326,7 +325,7 @@ public class SavingSanta extends LongTimeEvent | ||||
| 					{ | ||||
| 						if (_rewardedPlayers.containsKey(pl.getAccountName())) | ||||
| 						{ | ||||
| 							final long elapsedTimeSinceLastRewarded = Chronos.currentTimeMillis() - _rewardedPlayers.get(pl.getAccountName()); | ||||
| 							final long elapsedTimeSinceLastRewarded = System.currentTimeMillis() - _rewardedPlayers.get(pl.getAccountName()); | ||||
| 							if (elapsedTimeSinceLastRewarded < MIN_TIME_BETWEEN_2_REWARDS) | ||||
| 							{ | ||||
| 								continue; | ||||
| @@ -335,7 +334,7 @@ public class SavingSanta extends LongTimeEvent | ||||
| 						else | ||||
| 						{ | ||||
| 							final long time = player.getVariables().getLong("LAST_SANTA_REWARD", 0); | ||||
| 							if ((Chronos.currentTimeMillis() - time) < MIN_TIME_BETWEEN_2_REWARDS) | ||||
| 							if ((System.currentTimeMillis() - time) < MIN_TIME_BETWEEN_2_REWARDS) | ||||
| 							{ | ||||
| 								_rewardedPlayers.put(pl.getAccountName(), time); | ||||
| 								continue; | ||||
| @@ -345,8 +344,8 @@ public class SavingSanta extends LongTimeEvent | ||||
| 						final int locy = (int) (pl.getY() + (Math.pow(-1, getRandom(1, 2)) * 50)); | ||||
| 						final int heading = Util.calculateHeadingFrom(locx, locy, pl.getX(), pl.getY()); | ||||
| 						final Npc santa = addSpawn(HOLIDAY_SANTA_ID, locx, locy, pl.getZ(), heading, false, 30000); | ||||
| 						_rewardedPlayers.put(pl.getAccountName(), Chronos.currentTimeMillis()); | ||||
| 						player.getVariables().set("LAST_SANTA_REWARD", Chronos.currentTimeMillis()); | ||||
| 						_rewardedPlayers.put(pl.getAccountName(), System.currentTimeMillis()); | ||||
| 						player.getVariables().set("LAST_SANTA_REWARD", System.currentTimeMillis()); | ||||
| 						startQuestTimer("SantaRewarding0", 500, santa, pl); | ||||
| 					} | ||||
| 				} | ||||
| @@ -439,7 +438,7 @@ public class SavingSanta extends LongTimeEvent | ||||
| 		else if (event.equalsIgnoreCase("SantaBlessings") && SANTAS_HELPER_AUTOBUFF) | ||||
| 		{ | ||||
| 			startQuestTimer("SantaBlessings", 15000, null, null); | ||||
| 			final long currentTime = Chronos.currentTimeMillis(); | ||||
| 			final long currentTime = System.currentTimeMillis(); | ||||
| 			for (Npc santaHelper1 : _santaHelpers) | ||||
| 			{ | ||||
| 				for (Player plb : World.getInstance().getVisibleObjects(santaHelper1, Player.class)) | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package events.TrainingWithDandy; | ||||
|  | ||||
| import java.util.Calendar; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| @@ -67,7 +66,7 @@ public class TrainingWithDandy extends LongTimeEvent | ||||
| 				{ | ||||
| 					npc.setTarget(player); | ||||
| 					npc.doCast(DANDY_CH.getSkill()); | ||||
| 					player.getVariables().set(GIVE_DANDI_BUFF_VAR, Chronos.currentTimeMillis()); | ||||
| 					player.getVariables().set(GIVE_DANDI_BUFF_VAR, System.currentTimeMillis()); | ||||
| 					player.broadcastStatusUpdate(); | ||||
| 					htmltext = "33894-2.htm"; | ||||
| 					break; | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package handlers.admincommandhandlers; | ||||
| import java.util.Collection; | ||||
| import java.util.StringTokenizer; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; | ||||
| import org.l2jmobius.gameserver.model.CursedWeapon; | ||||
| @@ -210,7 +209,7 @@ public class AdminCursedWeapons implements IAdminCommandHandler | ||||
| 					{ | ||||
| 						activeChar.addItem("AdminCursedWeaponAdd", id, 1, activeChar, true); | ||||
| 					} | ||||
| 					cw.setEndTime(Chronos.currentTimeMillis() + (cw.getDuration() * 60000)); | ||||
| 					cw.setEndTime(System.currentTimeMillis() + (cw.getDuration() * 60000)); | ||||
| 					cw.reActivate(); | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package handlers.admincommandhandlers; | ||||
| import java.util.Calendar; | ||||
| import java.util.StringTokenizer; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import org.l2jmobius.gameserver.instancemanager.GraciaSeedsManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -67,7 +66,7 @@ public class AdminGraciaSeeds implements IAdminCommandHandler | ||||
| 		if (GraciaSeedsManager.getInstance().getSoDTimeForNextStateChange() > 0) | ||||
| 		{ | ||||
| 			final Calendar nextChangeDate = Calendar.getInstance(); | ||||
| 			nextChangeDate.setTimeInMillis(Chronos.currentTimeMillis() + GraciaSeedsManager.getInstance().getSoDTimeForNextStateChange()); | ||||
| 			nextChangeDate.setTimeInMillis(System.currentTimeMillis() + GraciaSeedsManager.getInstance().getSoDTimeForNextStateChange()); | ||||
| 			html.replace("%sodtime%", nextChangeDate.getTime().toString()); | ||||
| 		} | ||||
| 		else | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.Map; | ||||
| import java.util.Map.Entry; | ||||
| import java.util.StringTokenizer; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| @@ -118,7 +117,7 @@ public class AdminInstanceZone implements IAdminCommandHandler | ||||
| 			int hours = 0; | ||||
| 			int minutes = 0; | ||||
| 			final int id = entry.getKey(); | ||||
| 			final long remainingTime = (entry.getValue() - Chronos.currentTimeMillis()) / 1000; | ||||
| 			final long remainingTime = (entry.getValue() - System.currentTimeMillis()) / 1000; | ||||
| 			if (remainingTime > 0) | ||||
| 			{ | ||||
| 				hours = (int) (remainingTime / 3600); | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import java.util.StringTokenizer; | ||||
| import java.util.logging.Logger; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.cache.HtmCache; | ||||
| import org.l2jmobius.gameserver.data.sql.CharNameTable; | ||||
| @@ -237,7 +236,7 @@ public class AdminPunishment implements IAdminCommandHandler | ||||
| 				long expirationTime = Integer.parseInt(exp); | ||||
| 				if (expirationTime > 0) | ||||
| 				{ | ||||
| 					expirationTime = Chronos.currentTimeMillis() + (expirationTime * 60 * 1000); | ||||
| 					expirationTime = System.currentTimeMillis() + (expirationTime * 60 * 1000); | ||||
| 				} | ||||
| 				 | ||||
| 				final PunishmentAffect affect = PunishmentAffect.getByName(af); | ||||
|   | ||||
| @@ -29,7 +29,6 @@ import java.util.Set; | ||||
| import java.util.concurrent.TimeUnit; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.GameServer; | ||||
| import org.l2jmobius.gameserver.cache.HtmCache; | ||||
| import org.l2jmobius.gameserver.data.xml.AdminData; | ||||
| @@ -74,7 +73,7 @@ public class AdminServerInfo implements IAdminCommandHandler | ||||
| 			html.replace("%gameTime%", GameTimeTaskManager.getInstance().getGameHour() + ":" + GameTimeTaskManager.getInstance().getGameMinute()); | ||||
| 			html.replace("%dayNight%", GameTimeTaskManager.getInstance().isNight() ? "Night" : "Day"); | ||||
| 			html.replace("%geodata%", Config.PATHFINDING ? "Enabled" : "Disabled"); | ||||
| 			html.replace("%serverTime%", SDF.format(new Date(Chronos.currentTimeMillis()))); | ||||
| 			html.replace("%serverTime%", SDF.format(new Date(System.currentTimeMillis()))); | ||||
| 			html.replace("%serverUpTime%", getServerUpTime()); | ||||
| 			html.replace("%onlineAll%", getPlayersCount("ALL")); | ||||
| 			html.replace("%offlineTrade%", getPlayersCount("OFF_TRADE")); | ||||
| @@ -101,7 +100,7 @@ public class AdminServerInfo implements IAdminCommandHandler | ||||
| 	 | ||||
| 	private String getServerUpTime() | ||||
| 	{ | ||||
| 		long time = Chronos.currentTimeMillis() - GameServer.dateTimeServerStarted.getTimeInMillis(); | ||||
| 		long time = System.currentTimeMillis() - GameServer.dateTimeServerStarted.getTimeInMillis(); | ||||
| 		 | ||||
| 		final long days = TimeUnit.MILLISECONDS.toDays(time); | ||||
| 		time -= TimeUnit.DAYS.toMillis(days); | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map; | ||||
| import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.Rnd; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.handler.IBypassHandler; | ||||
| @@ -134,7 +133,7 @@ public class FindPvP implements IBypassHandler | ||||
| 			player.setSpawnProtection(true); | ||||
| 			if (!player.isGM()) | ||||
| 			{ | ||||
| 				player.setPvpFlagLasts(Chronos.currentTimeMillis() + Config.PVP_PVP_TIME); | ||||
| 				player.setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_PVP_TIME); | ||||
| 				player.startPvPFlag(); | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.dailymissionhandlers; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.DailyMissionStatus; | ||||
| import org.l2jmobius.gameserver.handler.AbstractDailyMissionHandler; | ||||
| import org.l2jmobius.gameserver.model.DailyMissionDataHolder; | ||||
| @@ -62,9 +61,9 @@ public class LoginMonthDailyMissionHandler extends AbstractDailyMissionHandler | ||||
| 		final long lastCompleted = entry.getLastCompleted(); | ||||
| 		if (lastCompleted == 0) // Initial entry. | ||||
| 		{ | ||||
| 			entry.setLastCompleted(Chronos.currentTimeMillis()); | ||||
| 			entry.setLastCompleted(System.currentTimeMillis()); | ||||
| 		} | ||||
| 		else if ((Chronos.currentTimeMillis() - lastCompleted) > 2506000000L) // 2506000000L (29 day) delay. | ||||
| 		else if ((System.currentTimeMillis() - lastCompleted) > 2506000000L) // 2506000000L (29 day) delay. | ||||
| 		{ | ||||
| 			entry.setProgress(1); | ||||
| 			entry.setStatus(DailyMissionStatus.AVAILABLE); | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package handlers.dailymissionhandlers; | ||||
|  | ||||
| import java.util.Calendar; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.DailyMissionStatus; | ||||
| import org.l2jmobius.gameserver.handler.AbstractDailyMissionHandler; | ||||
| import org.l2jmobius.gameserver.model.DailyMissionDataHolder; | ||||
| @@ -64,7 +63,7 @@ public class LoginWeekendDailyMissionHandler extends AbstractDailyMissionHandler | ||||
| 		final int currentDay = Calendar.getInstance().get(Calendar.DAY_OF_WEEK); | ||||
| 		final long lastCompleted = entry.getLastCompleted(); | ||||
| 		if (((currentDay == Calendar.SATURDAY) || (currentDay == Calendar.SUNDAY)) // Reward only on weekend. | ||||
| 			&& ((lastCompleted == 0) || ((Chronos.currentTimeMillis() - lastCompleted) > 172800000))) // Initial entry or 172800000 (2 day) delay. | ||||
| 			&& ((lastCompleted == 0) || ((System.currentTimeMillis() - lastCompleted) > 172800000))) // Initial entry or 172800000 (2 day) delay. | ||||
| 		{ | ||||
| 			entry.setProgress(1); | ||||
| 			entry.setStatus(DailyMissionStatus.AVAILABLE); | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.effecthandlers; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData; | ||||
| import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| @@ -64,7 +63,7 @@ public class AddHuntingTime extends AbstractEffect | ||||
| 			return; | ||||
| 		} | ||||
| 		 | ||||
| 		final long currentTime = Chronos.currentTimeMillis(); | ||||
| 		final long currentTime = System.currentTimeMillis(); | ||||
| 		final long endTime = currentTime + player.getTimedHuntingZoneRemainingTime(_zoneId); | ||||
| 		if ((endTime > currentTime) && (((endTime - currentTime) + _time) >= holder.getMaximumAddedTime())) | ||||
| 		{ | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.effecthandlers; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -53,7 +52,7 @@ public class DecreaseWaitingTime extends AbstractEffect | ||||
| 			return; | ||||
| 		} | ||||
| 		 | ||||
| 		final long currentTime = Chronos.currentTimeMillis(); | ||||
| 		final long currentTime = System.currentTimeMillis(); | ||||
| 		long creationTime = player.getVariables().getLong(PlayerVariables.HOMUNCULUS_CREATION_TIME, 0); | ||||
| 		final long waitTime = 0; // 86400 = 24 Hours | ||||
| 		if (creationTime == 0) | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.punishmenthandlers; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.LoginServerThread; | ||||
| import org.l2jmobius.gameserver.handler.IPunishmentHandler; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| @@ -153,7 +152,7 @@ public class ChatBanHandler implements IPunishmentHandler | ||||
| 	 */ | ||||
| 	private void applyToPlayer(PunishmentTask task, Player player) | ||||
| 	{ | ||||
| 		final long delay = (task.getExpirationTime() - Chronos.currentTimeMillis()) / 1000; | ||||
| 		final long delay = (task.getExpirationTime() - System.currentTimeMillis()) / 1000; | ||||
| 		if (delay > 0) | ||||
| 		{ | ||||
| 			player.sendMessage("You've been chat banned for " + (delay > 60 ? ((delay / 60) + " minutes.") : delay + " seconds.")); | ||||
|   | ||||
| @@ -17,7 +17,6 @@ | ||||
| package handlers.punishmenthandlers; | ||||
|  | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.LoginServerThread; | ||||
| import org.l2jmobius.gameserver.cache.HtmCache; | ||||
| import org.l2jmobius.gameserver.handler.IPunishmentHandler; | ||||
| @@ -207,7 +206,7 @@ public class JailHandler implements IPunishmentHandler | ||||
| 		player.sendPacket(msg); | ||||
| 		if (task != null) | ||||
| 		{ | ||||
| 			final long delay = (task.getExpirationTime() - Chronos.currentTimeMillis()) / 1000; | ||||
| 			final long delay = (task.getExpirationTime() - System.currentTimeMillis()) / 1000; | ||||
| 			if (delay > 0) | ||||
| 			{ | ||||
| 				player.sendMessage("You've been jailed for " + (delay > 60 ? ((delay / 60) + " minutes.") : delay + " seconds.")); | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.telnethandlers.player; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.sql.CharNameTable; | ||||
| import org.l2jmobius.gameserver.instancemanager.PunishmentManager; | ||||
| import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; | ||||
| @@ -66,7 +65,7 @@ public class Ban implements ITelnetCommand | ||||
| 				if (Util.isDigit(token)) | ||||
| 				{ | ||||
| 					time = Integer.parseInt(token) * 60 * 1000; | ||||
| 					time += Chronos.currentTimeMillis(); | ||||
| 					time += System.currentTimeMillis(); | ||||
| 				} | ||||
| 				if (args.length > 2) | ||||
| 				{ | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.telnethandlers.player; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.sql.CharNameTable; | ||||
| import org.l2jmobius.gameserver.instancemanager.PunishmentManager; | ||||
| import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; | ||||
| @@ -66,7 +65,7 @@ public class BanChat implements ITelnetCommand | ||||
| 				if (Util.isDigit(token)) | ||||
| 				{ | ||||
| 					time = Integer.parseInt(token) * 60 * 1000; | ||||
| 					time += Chronos.currentTimeMillis(); | ||||
| 					time += System.currentTimeMillis(); | ||||
| 				} | ||||
| 				if (args.length > 2) | ||||
| 				{ | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package handlers.telnethandlers.player; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.sql.CharNameTable; | ||||
| import org.l2jmobius.gameserver.instancemanager.PunishmentManager; | ||||
| import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; | ||||
| @@ -66,7 +65,7 @@ public class Jail implements ITelnetCommand | ||||
| 				if (Util.isDigit(token)) | ||||
| 				{ | ||||
| 					time = Integer.parseInt(token) * 60 * 1000; | ||||
| 					time += Chronos.currentTimeMillis(); | ||||
| 					time += System.currentTimeMillis(); | ||||
| 				} | ||||
| 				if (args.length > 2) | ||||
| 				{ | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package handlers.usercommandhandlers; | ||||
|  | ||||
| import java.text.SimpleDateFormat; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IUserCommandHandler; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; | ||||
| @@ -47,7 +46,7 @@ public class ClanPenalty implements IUserCommandHandler | ||||
| 		final StringBuilder htmlContent = new StringBuilder(500); | ||||
| 		htmlContent.append("<html><body><center><table width=270 border=0 bgcolor=111111><tr><td width=170>Penalty</td><td width=100 align=center>Expiration Date</td></tr></table><table width=270 border=0><tr>"); | ||||
| 		 | ||||
| 		if (player.getClanJoinExpiryTime() > Chronos.currentTimeMillis()) | ||||
| 		if (player.getClanJoinExpiryTime() > System.currentTimeMillis()) | ||||
| 		{ | ||||
| 			htmlContent.append("<td width=170>Unable to join a clan.</td><td width=100 align=center>"); | ||||
| 			htmlContent.append(format.format(player.getClanJoinExpiryTime())); | ||||
| @@ -55,7 +54,7 @@ public class ClanPenalty implements IUserCommandHandler | ||||
| 			penalty = true; | ||||
| 		} | ||||
| 		 | ||||
| 		if (player.getClanCreateExpiryTime() > Chronos.currentTimeMillis()) | ||||
| 		if (player.getClanCreateExpiryTime() > System.currentTimeMillis()) | ||||
| 		{ | ||||
| 			htmlContent.append("<td width=170>Unable to create a clan.</td><td width=100 align=center>"); | ||||
| 			htmlContent.append(format.format(player.getClanCreateExpiryTime())); | ||||
| @@ -63,7 +62,7 @@ public class ClanPenalty implements IUserCommandHandler | ||||
| 			penalty = true; | ||||
| 		} | ||||
| 		 | ||||
| 		if ((player.getClan() != null) && (player.getClan().getCharPenaltyExpiryTime() > Chronos.currentTimeMillis())) | ||||
| 		if ((player.getClan() != null) && (player.getClan().getCharPenaltyExpiryTime() > System.currentTimeMillis())) | ||||
| 		{ | ||||
| 			htmlContent.append("<td width=170>Unable to invite a clan member.</td><td width=100 align=center>"); | ||||
| 			htmlContent.append(format.format(player.getClan().getCharPenaltyExpiryTime())); | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.text.SimpleDateFormat; | ||||
| import java.util.Date; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IUserCommandHandler; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -75,7 +74,7 @@ public class Time implements IUserCommandHandler | ||||
| 		player.sendPacket(sm); | ||||
| 		if (Config.DISPLAY_SERVER_TIME) | ||||
| 		{ | ||||
| 			player.sendMessage("Server time is " + SDF.format(new Date(Chronos.currentTimeMillis()))); | ||||
| 			player.sendMessage("Server time is " + SDF.format(new Date(System.currentTimeMillis()))); | ||||
| 		} | ||||
| 		return true; | ||||
| 	} | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package handlers.voicedcommandhandlers; | ||||
|  | ||||
| import java.util.StringTokenizer; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.sql.CharNameTable; | ||||
| import org.l2jmobius.gameserver.data.xml.AdminData; | ||||
| import org.l2jmobius.gameserver.handler.IVoicedCommandHandler; | ||||
| @@ -104,7 +103,7 @@ public class ChatAdmin implements IVoicedCommandHandler | ||||
| 							return false; | ||||
| 						} | ||||
| 						 | ||||
| 						PunishmentManager.getInstance().startPunishment(new PunishmentTask(objId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN, Chronos.currentTimeMillis() + (expirationTime * 1000 * 60), "Chat banned by moderator", activeChar.getName())); | ||||
| 						PunishmentManager.getInstance().startPunishment(new PunishmentTask(objId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN, System.currentTimeMillis() + (expirationTime * 1000 * 60), "Chat banned by moderator", activeChar.getName())); | ||||
| 						if (expirationTime > 0) | ||||
| 						{ | ||||
| 							BuilderUtil.sendSysMessage(activeChar, "Player " + player.getName() + " chat banned for " + expirationTime + " minutes."); | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package handlers.voicedcommandhandlers; | ||||
| import java.text.SimpleDateFormat; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.handler.IVoicedCommandHandler; | ||||
| import org.l2jmobius.gameserver.instancemanager.PremiumManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -75,7 +74,7 @@ public class Premium implements IVoicedCommandHandler | ||||
| 				html.append("<tr><td>Spoil Chance: <font color=\"LEVEL\">x" + (Config.RATE_SPOIL_DROP_CHANCE_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_CHANCE) + " <br1></font></td></tr>"); | ||||
| 				html.append("<tr><td>Spoil Amount: <font color=\"LEVEL\">x" + (Config.RATE_SPOIL_DROP_AMOUNT_MULTIPLIER * Config.PREMIUM_RATE_SPOIL_AMOUNT) + " <br1></font></td></tr>"); | ||||
| 				html.append("<tr><td>Expires: <font color=\"00A5FF\">" + format.format(endDate) + "</font></td></tr>"); | ||||
| 				html.append("<tr><td>Current Date: <font color=\"70FFCA\">" + format.format(Chronos.currentTimeMillis()) + "<br><br></font></td></tr>"); | ||||
| 				html.append("<tr><td>Current Date: <font color=\"70FFCA\">" + format.format(System.currentTimeMillis()) + "<br><br></font></td></tr>"); | ||||
| 				html.append("<tr><td><center>Premium Info & Rules<br></center></td></tr>"); | ||||
| 				html.append("<tr><td><font color=\"70FFCA\">1. Premium accounts CAN NOT BE TRANSFERED.<br1></font></td></tr>"); | ||||
| 				html.append("<tr><td><font color=\"70FFCA\">2. Premium does not effect party members.<br1></font></td></tr>"); | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package instances.AshenShadowRevolutionaries; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| @@ -179,7 +178,7 @@ public class AshenShadowRevolutionaries extends AbstractInstance | ||||
| 						return null; | ||||
| 					} | ||||
| 					 | ||||
| 					final long currentTime = Chronos.currentTimeMillis(); | ||||
| 					final long currentTime = System.currentTimeMillis(); | ||||
| 					final List<Player> members = party.getMembers(); | ||||
| 					for (Player member : members) | ||||
| 					{ | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import java.util.concurrent.ConcurrentHashMap; | ||||
| import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.QuestSound; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| @@ -157,7 +156,7 @@ public class CastleDungeon extends AbstractInstance | ||||
| 	public void onInstanceCreated(Instance instance, Player player) | ||||
| 	{ | ||||
| 		// Put re-enter for instance | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), Chronos.currentTimeMillis() + REENTER); | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), System.currentTimeMillis() + REENTER); | ||||
| 		// Schedule spawn of first raid | ||||
| 		spawnRaid(instance); | ||||
| 	} | ||||
| @@ -175,7 +174,7 @@ public class CastleDungeon extends AbstractInstance | ||||
| 		else if (REENETER_HOLDER.containsKey(template.getId())) | ||||
| 		{ | ||||
| 			final long time = REENETER_HOLDER.get(template.getId()); | ||||
| 			if (time > Chronos.currentTimeMillis()) | ||||
| 			if (time > System.currentTimeMillis()) | ||||
| 			{ | ||||
| 				showHtmlFile(groupLeader, "enterRestricted.html"); | ||||
| 				return false; | ||||
|   | ||||
| @@ -28,7 +28,6 @@ import java.util.stream.Collectors; | ||||
|  | ||||
| import org.l2jmobius.commons.database.DatabaseFactory; | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.enums.CategoryType; | ||||
| import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult; | ||||
| import org.l2jmobius.gameserver.enums.PartyMessageType; | ||||
| @@ -118,7 +117,7 @@ public class CeremonyOfChaos extends AbstractNpcAI | ||||
| 	 | ||||
| 	private CeremonyOfChaos() | ||||
| 	{ | ||||
| 		final long currentTime = Chronos.currentTimeMillis(); | ||||
| 		final long currentTime = System.currentTimeMillis(); | ||||
| 		 | ||||
| 		// Schedule event period end, 1st of next month 00:01. | ||||
| 		final Calendar periodEnd = Calendar.getInstance(); | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package instances.CommandPost; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.instancemanager.ZoneManager; | ||||
| @@ -115,7 +114,7 @@ public class CommandPost extends AbstractInstance | ||||
| 				final Party party = player.getParty(); | ||||
| 				if (player.isInParty()) | ||||
| 				{ | ||||
| 					final long currentTime = Chronos.currentTimeMillis(); | ||||
| 					final long currentTime = System.currentTimeMillis(); | ||||
| 					 | ||||
| 					if (!party.isLeader(player)) | ||||
| 					{ | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import java.util.concurrent.ConcurrentHashMap; | ||||
| import java.util.concurrent.ScheduledFuture; | ||||
|  | ||||
| import org.l2jmobius.commons.threads.ThreadPool; | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.QuestSound; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| @@ -170,7 +169,7 @@ public class FortressDungeon extends AbstractInstance | ||||
| 	public void onInstanceCreated(Instance instance, Player player) | ||||
| 	{ | ||||
| 		// Put re-enter for instance | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), Chronos.currentTimeMillis() + REENTER); | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), System.currentTimeMillis() + REENTER); | ||||
| 		// Schedule spawn of first raid | ||||
| 		spawnRaid(instance); | ||||
| 	} | ||||
| @@ -198,7 +197,7 @@ public class FortressDungeon extends AbstractInstance | ||||
| 		else if (REENETER_HOLDER.containsKey(template.getId())) | ||||
| 		{ | ||||
| 			final long time = REENETER_HOLDER.get(template.getId()); | ||||
| 			if (time > Chronos.currentTimeMillis()) | ||||
| 			if (time > System.currentTimeMillis()) | ||||
| 			{ | ||||
| 				showHtmlFile(groupLeader, "enterRestricted.html"); | ||||
| 				return false; | ||||
|   | ||||
| @@ -24,7 +24,6 @@ import java.util.Map; | ||||
| import java.util.Map.Entry; | ||||
| import java.util.logging.Level; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.data.xml.SkillData; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| @@ -470,7 +469,7 @@ public class Kamaloka extends AbstractInstance | ||||
| 						continue; | ||||
| 					} | ||||
| 					// if found instance still can't be reentered - exit | ||||
| 					if (Chronos.currentTimeMillis() < entry.getValue().longValue()) | ||||
| 					if (System.currentTimeMillis() < entry.getValue().longValue()) | ||||
| 					{ | ||||
| 						final SystemMessage sm = new SystemMessage(SystemMessageId.C1_MAY_NOT_RE_ENTER_YET); | ||||
| 						sm.addPcName(partyMember); | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.KastiaExceptional; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -65,7 +64,7 @@ public class KastiaExceptional extends AbstractInstance | ||||
| 			case "enterInstance": | ||||
| 			{ | ||||
| 				// Cannot enter if player finished another Kastia instance. | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 298)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 299)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 300)) // | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.KastiaExtreme; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -65,7 +64,7 @@ public class KastiaExtreme extends AbstractInstance | ||||
| 			case "enterInstance": | ||||
| 			{ | ||||
| 				// Cannot enter if player finished another Kastia instance. | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 298)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 299)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 300)) // | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.KastiaHard; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -65,7 +64,7 @@ public class KastiaHard extends AbstractInstance | ||||
| 			case "enterInstance": | ||||
| 			{ | ||||
| 				// Cannot enter if player finished another Kastia instance. | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 298)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 299)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 305)) // | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.KastiaLow; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -65,7 +64,7 @@ public class KastiaLow extends AbstractInstance | ||||
| 			case "enterInstance": | ||||
| 			{ | ||||
| 				// Cannot enter if player finished another Kastia instance. | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 299)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 300)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 305)) // | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.KastiaMedium; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| @@ -65,7 +64,7 @@ public class KastiaMedium extends AbstractInstance | ||||
| 			case "enterInstance": | ||||
| 			{ | ||||
| 				// Cannot enter if player finished another Kastia instance. | ||||
| 				final long currentTime = Chronos.currentTimeMillis(); | ||||
| 				final long currentTime = System.currentTimeMillis(); | ||||
| 				if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 298)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 300)) // | ||||
| 					|| (currentTime < InstanceManager.getInstance().getInstanceTime(player, 305)) // | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package instances.KrofinNest; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.Party; | ||||
| @@ -123,7 +122,7 @@ public class KrofinNest extends AbstractInstance | ||||
| 						return null; | ||||
| 					} | ||||
| 					 | ||||
| 					final long currentTime = Chronos.currentTimeMillis(); | ||||
| 					final long currentTime = System.currentTimeMillis(); | ||||
| 					final List<Player> members = party.getMembers(); | ||||
| 					for (Player member : members) | ||||
| 					{ | ||||
|   | ||||
| @@ -20,7 +20,6 @@ import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.instancemanager.InstanceManager; | ||||
| import org.l2jmobius.gameserver.model.Party; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| @@ -92,7 +91,7 @@ public class NightmareKamaloka extends AbstractInstance | ||||
| 						return null; | ||||
| 					} | ||||
| 					 | ||||
| 					final long currentTime = Chronos.currentTimeMillis(); | ||||
| 					final long currentTime = System.currentTimeMillis(); | ||||
| 					final List<Player> members = party.getMembers(); | ||||
| 					for (Player member : members) | ||||
| 					{ | ||||
|   | ||||
| @@ -22,7 +22,6 @@ import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.concurrent.ConcurrentHashMap; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpc; | ||||
| @@ -261,7 +260,7 @@ public class PailakaRuneCastle extends AbstractInstance | ||||
| 	public void onInstanceCreated(Instance instance, Player player) | ||||
| 	{ | ||||
| 		// Put re-enter for instance | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), Chronos.currentTimeMillis() + REENTER); | ||||
| 		REENETER_HOLDER.put(instance.getTemplateId(), System.currentTimeMillis() + REENTER); | ||||
| 		// Schedule spawn of first wave | ||||
| 		startQuestTimer("SPAWN_NEXT_WAVE", 120000, null, player, false); // 2 minutes | ||||
| 	} | ||||
| @@ -281,7 +280,7 @@ public class PailakaRuneCastle extends AbstractInstance | ||||
| 			else if (REENETER_HOLDER.containsKey(template.getId())) | ||||
| 			{ | ||||
| 				final long time = REENETER_HOLDER.get(template.getId()); | ||||
| 				if (time > Chronos.currentTimeMillis()) | ||||
| 				if (time > System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					showHtmlFile(groupLeader, "enterRestricted.html"); | ||||
| 					return false; | ||||
| @@ -310,7 +309,7 @@ public class PailakaRuneCastle extends AbstractInstance | ||||
| 			else if (REENETER_HOLDER.containsKey(template.getId())) | ||||
| 			{ | ||||
| 				final long time = REENETER_HOLDER.get(template.getId()); | ||||
| 				if (time > Chronos.currentTimeMillis()) | ||||
| 				if (time > System.currentTimeMillis()) | ||||
| 				{ | ||||
| 					showHtmlFile(groupLeader, "enterRestricted.html"); | ||||
| 					return false; | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.ThroneOfHeroes; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -229,7 +228,7 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance | ||||
| 				if (!killer.isGM()) | ||||
| 				{ | ||||
| 					// Set clan variable | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", System.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().storeMe(); | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.ThroneOfHeroes; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -245,7 +244,7 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance | ||||
| 				if (!killer.isGM()) | ||||
| 				{ | ||||
| 					// Set clan variable | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", System.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().storeMe(); | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  */ | ||||
| package instances.ThroneOfHeroes; | ||||
|  | ||||
| import org.l2jmobius.commons.util.Chronos; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -213,7 +212,7 @@ public class ThroneOfHeroesTauti extends AbstractInstance | ||||
| 				if (!killer.isGM()) | ||||
| 				{ | ||||
| 					// Set clan variable | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", Chronos.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().set("TOH_DONE", System.currentTimeMillis()); | ||||
| 					killer.getClan().getVariables().storeMe(); | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment