Dropped Chronos.
This commit is contained in:
@@ -24,7 +24,6 @@ import java.util.logging.Logger;
|
||||
|
||||
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.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.sql.NpcTable;
|
||||
@@ -212,7 +211,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARAS_OLD);
|
||||
final Long respawnTime = info.getLong("respawn_time");
|
||||
if ((status == DEAD) && (respawnTime <= Chronos.currentTimeMillis()))
|
||||
if ((status == DEAD) && (respawnTime <= System.currentTimeMillis()))
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||
// Also, the status needs to be changed to DORMANT.
|
||||
@@ -230,13 +229,13 @@ public class Antharas extends Quest
|
||||
_antharas = (GrandBoss) addSpawn(ANTHARAS_OLD, x, y, z, heading, false, 0);
|
||||
GrandBossManager.getInstance().addBoss(_antharas);
|
||||
_antharas.setCurrentHpMp(hp, mp);
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
// Start repeating timer to check for inactivity.
|
||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||
}
|
||||
else if (status == DEAD)
|
||||
{
|
||||
ThreadPool.schedule(new UnlockAntharas(ANTHARAS_OLD), respawnTime - Chronos.currentTimeMillis());
|
||||
ThreadPool.schedule(new UnlockAntharas(ANTHARAS_OLD), respawnTime - System.currentTimeMillis());
|
||||
}
|
||||
else if (status == DORMANT)
|
||||
{
|
||||
@@ -280,7 +279,7 @@ public class Antharas extends Quest
|
||||
_antharas = (GrandBoss) addSpawn(antharasId, loc_x, loc_y, loc_z, heading, false, 0);
|
||||
GrandBossManager.getInstance().addBoss(_antharas);
|
||||
_antharas.setCurrentHpMp(hp, mp);
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
// Start repeating timer to check for inactivity.
|
||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||
}
|
||||
@@ -288,7 +287,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(antharasId);
|
||||
final Long respawnTime = info.getLong("respawn_time");
|
||||
if (respawnTime <= Chronos.currentTimeMillis())
|
||||
if (respawnTime <= System.currentTimeMillis())
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||
// Also, the status needs to be changed to DORMANT.
|
||||
@@ -297,7 +296,7 @@ public class Antharas extends Quest
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPool.schedule(new UnlockAntharas(antharasId), respawnTime - Chronos.currentTimeMillis());
|
||||
ThreadPool.schedule(new UnlockAntharas(antharasId), respawnTime - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,7 +420,7 @@ public class Antharas extends Quest
|
||||
_antharas.setImmobilized(true);
|
||||
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
// Start repeating timer to check for inactivity.
|
||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||
// Setting 1st time of minions spawn task.
|
||||
@@ -708,7 +707,7 @@ public class Antharas extends Quest
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
final Long temp = (Chronos.currentTimeMillis() - _lastAction);
|
||||
final Long temp = (System.currentTimeMillis() - _lastAction);
|
||||
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
||||
@@ -874,7 +873,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
if ((npc.getNpcId() == ANTHARAS_OLD) || (npc.getNpcId() == ANTHARAS_WEAK) || (npc.getNpcId() == ANTHARAS_NORMAL) || (npc.getNpcId() == ANTHARAS_STRONG))
|
||||
{
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
if (!FWA_OLDANTHARAS && (_mobsSpawnTask == null))
|
||||
{
|
||||
startMinionSpawns(npc.getNpcId());
|
||||
@@ -918,7 +917,7 @@ public class Antharas extends Quest
|
||||
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(npc.getNpcId());
|
||||
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
||||
info.set("respawn_time", (System.currentTimeMillis() + respawnTime));
|
||||
GrandBossManager.getInstance().setStatSet(npc.getNpcId(), info);
|
||||
}
|
||||
else if (npc.getNpcId() == 29069)
|
||||
|
@@ -27,7 +27,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
@@ -108,7 +107,7 @@ public class Baium extends Quest
|
||||
if (status == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for baium from DB.
|
||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||
final long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
|
||||
if (temp > 0)
|
||||
{
|
||||
// The unlock time has not yet expired. Mark Baium as currently locked (dead).
|
||||
@@ -178,7 +177,7 @@ public class Baium extends Quest
|
||||
npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
|
||||
|
||||
// Start monitoring baium's inactivity.
|
||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||
_lastAttackVsBaiumTime = System.currentTimeMillis();
|
||||
startQuestTimer("baium_despawn", 60000, npc, null, true);
|
||||
if (player != null)
|
||||
{
|
||||
@@ -225,7 +224,7 @@ public class Baium extends Quest
|
||||
{
|
||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||
}
|
||||
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < Chronos.currentTimeMillis())
|
||||
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < System.currentTimeMillis())
|
||||
{
|
||||
npc.deleteMe(); // Despawn the live-baium.
|
||||
for (Npc minion : _minions)
|
||||
@@ -242,7 +241,7 @@ public class Baium extends Quest
|
||||
_zone.oustAllPlayers();
|
||||
cancelQuestTimer("baium_despawn", npc, null);
|
||||
}
|
||||
else if (((_lastAttackVsBaiumTime + 300000) < Chronos.currentTimeMillis()) && (npc.getCurrentHp() < ((npc.getMaxHp() * 3) / 4.0)))
|
||||
else if (((_lastAttackVsBaiumTime + 300000) < System.currentTimeMillis()) && (npc.getCurrentHp() < ((npc.getMaxHp() * 3) / 4.0)))
|
||||
{
|
||||
npc.setTarget(npc);
|
||||
npc.doCast(SkillTable.getInstance().getSkill(4135, 1));
|
||||
@@ -371,7 +370,7 @@ public class Baium extends Quest
|
||||
}
|
||||
}
|
||||
// Update a variable with the last action against Baium.
|
||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||
_lastAttackVsBaiumTime = System.currentTimeMillis();
|
||||
callSkillAI(npc);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
@@ -390,7 +389,7 @@ public class Baium extends Quest
|
||||
startQuestTimer("baium_unlock", respawnTime, null, null);
|
||||
// Also save the respawn time so that the info is maintained past reboots.
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
|
||||
for (Npc minion : _minions)
|
||||
{
|
||||
|
@@ -18,7 +18,6 @@ package ai.bosses;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
@@ -142,9 +141,9 @@ public class Benom extends Quest
|
||||
|
||||
final int castleOwner = CastleManager.getInstance().getCastleById(8).getOwnerId();
|
||||
final long siegeDate = CastleManager.getInstance().getCastleById(8).getSiegeDate().getTimeInMillis();
|
||||
long benomTeleporterSpawn = (siegeDate - Chronos.currentTimeMillis()) - 86400000;
|
||||
final long benomRaidRoomSpawn = (siegeDate - Chronos.currentTimeMillis()) - 86400000;
|
||||
long benomRaidSiegeSpawn = (siegeDate - Chronos.currentTimeMillis());
|
||||
long benomTeleporterSpawn = (siegeDate - System.currentTimeMillis()) - 86400000;
|
||||
final long benomRaidRoomSpawn = (siegeDate - System.currentTimeMillis()) - 86400000;
|
||||
long benomRaidSiegeSpawn = (siegeDate - System.currentTimeMillis());
|
||||
if (benomTeleporterSpawn < 0)
|
||||
{
|
||||
benomTeleporterSpawn = 1;
|
||||
@@ -159,7 +158,7 @@ public class Benom extends Quest
|
||||
{
|
||||
startQuestTimer("BenomTeleSpawn", benomTeleporterSpawn, null, null);
|
||||
}
|
||||
if ((siegeDate - Chronos.currentTimeMillis()) > 0)
|
||||
if ((siegeDate - System.currentTimeMillis()) > 0)
|
||||
{
|
||||
startQuestTimer("BenomRaidRoomSpawn", benomRaidRoomSpawn, null, null);
|
||||
}
|
||||
|
@@ -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;
|
||||
@@ -103,7 +102,7 @@ public class Core extends Quest
|
||||
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)
|
||||
{
|
||||
@@ -223,7 +222,7 @@ public class Core extends Quest
|
||||
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");
|
||||
|
@@ -20,7 +20,6 @@ import java.util.Collection;
|
||||
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.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
@@ -289,7 +288,7 @@ public class Frintezza extends Quest
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
|
||||
if (status == DEAD)
|
||||
{
|
||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||
final long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
|
||||
if (temp > 0)
|
||||
{
|
||||
startQuestTimer("frintezza_unlock", temp, null, null);
|
||||
@@ -1375,7 +1374,7 @@ public class Frintezza extends Quest
|
||||
}
|
||||
case "frintezza_despawn":
|
||||
{
|
||||
if ((Chronos.currentTimeMillis() - _lastAction) > 900000)
|
||||
if ((System.currentTimeMillis() - _lastAction) > 900000)
|
||||
{
|
||||
_zone.oustAllPlayers();
|
||||
cancelQuestTimers("waiting");
|
||||
@@ -1503,7 +1502,7 @@ public class Frintezza extends Quest
|
||||
startQuestTimer("room1_spawn", 5000, npc, null);
|
||||
startQuestTimer("room_final", 2100000, npc, null);
|
||||
startQuestTimer("frintezza_despawn", 60000, npc, null);
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
if (Config.BYPASS_FRINTEZZA_PARTIES_CHECK)
|
||||
{
|
||||
if (player.getParty() != null)
|
||||
@@ -1660,7 +1659,7 @@ public class Frintezza extends Quest
|
||||
@Override
|
||||
public String onAttack(Npc npc, Player attacker, int damage, boolean isPet)
|
||||
{
|
||||
_lastAction = Chronos.currentTimeMillis();
|
||||
_lastAction = System.currentTimeMillis();
|
||||
if (npc.getNpcId() == FRINTEZZA)
|
||||
{
|
||||
npc.setCurrentHpMp(npc.getMaxHp(), 0);
|
||||
@@ -1743,7 +1742,7 @@ public class Frintezza extends Quest
|
||||
startQuestTimer("frintezza_unlock", respawnTime, npc, null);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(FRINTEZZA);
|
||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatSet(FRINTEZZA, info);
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package ai.bosses;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
@@ -64,7 +63,7 @@ public class Orfen extends Quest
|
||||
{
|
||||
case DEAD:
|
||||
{
|
||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
if (temp > 0)
|
||||
{
|
||||
startQuestTimer("ORFEN_SPAWN", temp, null, null);
|
||||
@@ -218,7 +217,7 @@ public class Orfen extends Quest
|
||||
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
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);
|
||||
}
|
||||
return super.onKill(npc, killer, isPet);
|
||||
|
@@ -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.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
@@ -92,7 +91,7 @@ public class QueenAnt extends Quest
|
||||
{
|
||||
case DEAD:
|
||||
{
|
||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
if (temp > 0)
|
||||
{
|
||||
startQuestTimer("QUEEN_SPAWN", temp, null, null);
|
||||
@@ -352,7 +351,7 @@ public class QueenAnt extends Quest
|
||||
// cancelQuestTimer("CHECK_QA_ZONE", npc, null);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
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);
|
||||
startQuestTimer("DESPAWN_MINIONS", 10000, null, null);
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
|
||||
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.SkillTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
@@ -84,7 +83,7 @@ public class Valakas extends Quest
|
||||
i_ai3 = 0;
|
||||
i_ai4 = 0;
|
||||
i_quest0 = 0;
|
||||
lastAttackTime = Chronos.currentTimeMillis();
|
||||
lastAttackTime = System.currentTimeMillis();
|
||||
_zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||
@@ -92,7 +91,7 @@ public class Valakas extends Quest
|
||||
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 valakas is locked until a certain time, mark it so and start the unlock timer the unlock time has not yet expired.
|
||||
// Mark valakas as currently locked. Setup a timer to fire at the correct time (calculate the time between now and the unlock time, setup a timer to fire after that many msec).
|
||||
if (temp > 0)
|
||||
@@ -158,7 +157,7 @@ public class Valakas extends Quest
|
||||
}
|
||||
}
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||
if ((status == FIGHTING) && ((Chronos.currentTimeMillis() - lastAttackTime) > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default.
|
||||
if ((status == FIGHTING) && ((System.currentTimeMillis() - lastAttackTime) > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default.
|
||||
{
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
|
||||
@@ -340,7 +339,7 @@ public class Valakas extends Quest
|
||||
final GrandBoss valakas = (GrandBoss) addSpawn(VALAKAS, loc_x, loc_y, loc_z, heading, false, 0);
|
||||
GrandBossManager.getInstance().addBoss(valakas);
|
||||
|
||||
lastAttackTime = Chronos.currentTimeMillis();
|
||||
lastAttackTime = System.currentTimeMillis();
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
try
|
||||
@@ -375,7 +374,7 @@ public class Valakas extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
lastAttackTime = Chronos.currentTimeMillis();
|
||||
lastAttackTime = System.currentTimeMillis();
|
||||
// if (!Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM && GrandBossManager.getInstance().getBossStatus(VALAKAS) != FIGHTING && !npc.getSpawn().isCustomBossInstance()) { attacker.teleToLocation(150037, -57255, -2976); }
|
||||
if (attacker.getMountType() == 1)
|
||||
{
|
||||
@@ -595,7 +594,7 @@ public class Valakas extends Quest
|
||||
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
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, isPet);
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.sql.NpcTable;
|
||||
@@ -1252,13 +1251,13 @@ public class VanHalter extends Quest
|
||||
{
|
||||
final long interval = getRandom(Config.HPH_FIXINTERVALOFHALTER, Config.HPH_FIXINTERVALOFHALTER + Config.HPH_RANDOMINTERVALOFHALTER)/* * 3600000 */;
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(29062);
|
||||
info.set("respawn_time", (Chronos.currentTimeMillis() + interval));
|
||||
info.set("respawn_time", (System.currentTimeMillis() + interval));
|
||||
GrandBossManager.getInstance().setStatSet(29062, info);
|
||||
GrandBossManager.getInstance().setBossStatus(29062, INTERVAL);
|
||||
}
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(29062);
|
||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
_intervalTask = ThreadPool.schedule(new Interval(), temp);
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,6 @@ import java.util.logging.Logger;
|
||||
|
||||
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.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.xml.DoorData;
|
||||
@@ -169,7 +168,7 @@ public class Zaken extends Quest
|
||||
if (status == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for zaken from DB.
|
||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
// If Zaken is locked until a certain time, mark it so and start the unlock timer.
|
||||
// The unlock time has not yet expired.
|
||||
if (temp > 0)
|
||||
@@ -840,7 +839,7 @@ public class Zaken extends Quest
|
||||
cancelQuestTimer("1003", npc, null);
|
||||
// Also save the respawn time so that the info is maintained past reboots.
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatSet(ZAKEN, info);
|
||||
}
|
||||
else if (status == ALIVE)
|
||||
|
Reference in New Issue
Block a user