Removed unnecessary Long literals.
This commit is contained in:
@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
protected final Map<L2PcInstance, Long> _cachedWh = new ConcurrentHashMap<>();
|
||||
protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000L;
|
||||
protected final long _cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
|
@ -237,9 +237,9 @@ public final class FourSepulchersManager
|
||||
}
|
||||
tmp.set(Calendar.MINUTE, _newCycleMin);
|
||||
_coolDownTimeEnd = tmp.getTimeInMillis();
|
||||
_entryTimeEnd = _coolDownTimeEnd + (Config.FS_TIME_ENTRY * 60000L);
|
||||
_warmUpTimeEnd = _entryTimeEnd + (Config.FS_TIME_WARMUP * 60000L);
|
||||
_attackTimeEnd = _warmUpTimeEnd + (Config.FS_TIME_ATTACK * 60000L);
|
||||
_entryTimeEnd = _coolDownTimeEnd + (Config.FS_TIME_ENTRY * 60000);
|
||||
_warmUpTimeEnd = _entryTimeEnd + (Config.FS_TIME_WARMUP * 60000);
|
||||
_attackTimeEnd = _warmUpTimeEnd + (Config.FS_TIME_ATTACK * 60000);
|
||||
}
|
||||
|
||||
public void clean()
|
||||
|
@ -141,7 +141,7 @@ public class RaidBossSpawnManager
|
||||
final StatsSet info = new StatsSet();
|
||||
info.set("currentHP", raidboss.getCurrentHp());
|
||||
info.set("currentMP", raidboss.getCurrentMp());
|
||||
info.set("respawnTime", 0L);
|
||||
info.set("respawnTime", 0);
|
||||
|
||||
_storedInfo.put(bossId, info);
|
||||
|
||||
@ -196,7 +196,7 @@ public class RaidBossSpawnManager
|
||||
|
||||
info.set("currentHP", boss.getCurrentHp());
|
||||
info.set("currentMP", boss.getCurrentMp());
|
||||
info.set("respawnTime", 0L);
|
||||
info.set("respawnTime", 0);
|
||||
}
|
||||
_storedInfo.put(boss.getId(), info);
|
||||
}
|
||||
@ -221,7 +221,7 @@ public class RaidBossSpawnManager
|
||||
|
||||
SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
||||
|
||||
if ((respawnTime == 0L) || (time > respawnTime))
|
||||
if ((respawnTime == 0) || (time > respawnTime))
|
||||
{
|
||||
final L2RaidBossInstance raidboss = bossId == 25328 ? DayNightSpawnManager.getInstance().handleBoss(spawnDat) : (L2RaidBossInstance) spawnDat.doSpawn();
|
||||
if (raidboss != null)
|
||||
@ -235,7 +235,7 @@ public class RaidBossSpawnManager
|
||||
final StatsSet info = new StatsSet();
|
||||
info.set("currentHP", currentHP);
|
||||
info.set("currentMP", currentMP);
|
||||
info.set("respawnTime", 0L);
|
||||
info.set("respawnTime", 0);
|
||||
|
||||
_storedInfo.put(bossId, info);
|
||||
}
|
||||
@ -459,7 +459,7 @@ public class RaidBossSpawnManager
|
||||
final StatsSet info = new StatsSet();
|
||||
info.set("currentHP", raidboss.getCurrentHp());
|
||||
info.set("currentMP", raidboss.getCurrentMp());
|
||||
info.set("respawnTime", 0L);
|
||||
info.set("respawnTime", 0);
|
||||
|
||||
raidboss.setRaidStatus(StatusEnum.ALIVE);
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class SoIManager
|
||||
{
|
||||
protected static final Logger LOGGER = Logger.getLogger(SoIManager.class.getName());
|
||||
|
||||
private static final long SOI_OPEN_TIME = 24 * 60 * 60 * 1000L;
|
||||
private static final long SOI_OPEN_TIME = 24 * 60 * 60 * 1000;
|
||||
|
||||
private static final Location[] openSeedTeleportLocs =
|
||||
{
|
||||
@ -75,7 +75,7 @@ public class SoIManager
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return (GlobalVariablesManager.getInstance().getLong("SoI_opened", 0) * 1000L) - System.currentTimeMillis();
|
||||
return (GlobalVariablesManager.getInstance().getLong("SoI_opened", 0) * 1000) - System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static void setCurrentStage(int stage)
|
||||
@ -111,7 +111,7 @@ public class SoIManager
|
||||
{
|
||||
return;
|
||||
}
|
||||
GlobalVariablesManager.getInstance().set("SoI_opened", (System.currentTimeMillis() + time) / 1000L);
|
||||
GlobalVariablesManager.getInstance().set("SoI_opened", (System.currentTimeMillis() + time) / 1000);
|
||||
LOGGER.info("Seed of Infinity Manager: Opening the seed for " + Util.formatTime((int) time / 1000));
|
||||
spawnOpenedSeed();
|
||||
DoorData.getInstance().getDoor(14240102).openMe();
|
||||
|
@ -412,7 +412,7 @@ public final class WalkingManager implements IGameXmlReader
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
|
||||
}
|
||||
|
||||
ThreadPool.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
|
||||
ThreadPool.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ public final class FourSepulchersChangeAttackTimeTask implements Runnable
|
||||
}
|
||||
else
|
||||
{
|
||||
interval = Config.FS_TIME_ATTACK * 60000L;
|
||||
interval = Config.FS_TIME_ATTACK * 60000;
|
||||
}
|
||||
|
||||
manager.setChangeCoolDownTimeTask(ThreadPool.schedule(new FourSepulchersChangeCoolDownTimeTask(), interval));
|
||||
|
@ -38,7 +38,7 @@ public final class FourSepulchersChangeEntryTimeTask implements Runnable
|
||||
manager.setIsAttackTime(false);
|
||||
manager.setIsCoolDownTime(false);
|
||||
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getEntrytTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_ENTRY * 60000L;
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getEntrytTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_ENTRY * 60000;
|
||||
// launching saying process...
|
||||
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 0);
|
||||
manager.setChangeWarmUpTimeTask(ThreadPool.schedule(new FourSepulchersChangeWarmUpTimeTask(), interval));
|
||||
|
@ -38,7 +38,7 @@ public final class FourSepulchersChangeWarmUpTimeTask implements Runnable
|
||||
manager.setIsAttackTime(false);
|
||||
manager.setIsCoolDownTime(false);
|
||||
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getWarmUpTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_WARMUP * 60000L;
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getWarmUpTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_WARMUP * 60000;
|
||||
manager.setChangeAttackTimeTask(ThreadPool.schedule(new FourSepulchersChangeAttackTimeTask(), interval));
|
||||
final ScheduledFuture<?> changeWarmUpTimeTask = manager.getChangeWarmUpTimeTask();
|
||||
|
||||
|
@ -34,8 +34,8 @@ public class CharSelectInfoPackage
|
||||
private int _race = 0;
|
||||
private int _classId = 0;
|
||||
private int _baseClassId = 0;
|
||||
private long _deleteTimer = 0L;
|
||||
private long _lastAccess = 0L;
|
||||
private long _deleteTimer = 0;
|
||||
private long _lastAccess = 0;
|
||||
private int _face = 0;
|
||||
private int _hairStyle = 0;
|
||||
private int _hairColor = 0;
|
||||
|
@ -378,7 +378,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
else
|
||||
{
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000, _durationLost * 12000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -390,8 +390,8 @@ public class CursedWeapon implements INamable
|
||||
dropIt(attackable, player);
|
||||
|
||||
// Start the Life Task
|
||||
_endTime = System.currentTimeMillis() + (_duration * 60000L);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
_endTime = System.currentTimeMillis() + (_duration * 60000);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000, _durationLost * 12000);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -538,7 +538,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
}
|
||||
// Reduce time-to-live
|
||||
_endTime -= _durationLost * 60000L;
|
||||
_endTime -= _durationLost * 60000;
|
||||
saveData();
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
setAllyPenaltyExpiryTime(0, 0);
|
||||
}
|
||||
setCharPenaltyExpiryTime(clanData.getLong("char_penalty_expiry_time"));
|
||||
if ((getCharPenaltyExpiryTime() + (Config.ALT_CLAN_JOIN_DAYS * 86400000L)) < System.currentTimeMillis()) // 24*60*60*1000 = 86400000
|
||||
if ((getCharPenaltyExpiryTime() + (Config.ALT_CLAN_JOIN_DAYS * 86400000)) < System.currentTimeMillis()) // 24*60*60*1000 = 86400000
|
||||
{
|
||||
setCharPenaltyExpiryTime(0);
|
||||
}
|
||||
@ -2476,7 +2476,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
setAllyId(0);
|
||||
setAllyName(null);
|
||||
changeAllyCrest(0, false);
|
||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000L), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||
setAllyPenaltyExpiryTime(currentTime + (Config.ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED * 86400000), PENALTY_TYPE_DISSOLVE_ALLY); // 24*60*60*1000 = 86400000
|
||||
updateClanInDB();
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public enum PcCondOverride
|
||||
|
||||
public static long getAllExceptionsMask()
|
||||
{
|
||||
long result = 0L;
|
||||
long result = 0;
|
||||
for (PcCondOverride ex : values())
|
||||
{
|
||||
result |= ex.getMask();
|
||||
|
@ -231,7 +231,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
private Team _team = Team.NONE;
|
||||
|
||||
protected long _exceptions = 0L;
|
||||
protected long _exceptions = 0;
|
||||
|
||||
private boolean _lethalable = true;
|
||||
|
||||
|
@ -100,7 +100,7 @@ public final class L2AuctioneerInstance extends L2Npc
|
||||
bid = Math.min(Long.parseLong(st.nextToken()), MAX_ADENA);
|
||||
}
|
||||
|
||||
final Auction a = new Auction(player.getClan().getHideoutId(), player.getClan(), days * 86400000L, bid, ClanHallManager.getInstance().getClanHallByOwner(player.getClan()).getName());
|
||||
final Auction a = new Auction(player.getClan().getHideoutId(), player.getClan(), days * 86400000, bid, ClanHallManager.getInstance().getClanHallByOwner(player.getClan()).getName());
|
||||
if (_pendingAuctions.get(a.getId()) != null)
|
||||
{
|
||||
_pendingAuctions.remove(a.getId());
|
||||
|
@ -10473,7 +10473,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskRentPet == null)
|
||||
{
|
||||
_taskRentPet = ThreadPool.scheduleAtFixedRate(new RentPetTask(this), seconds * 1000L, seconds * 1000L);
|
||||
_taskRentPet = ThreadPool.scheduleAtFixedRate(new RentPetTask(this), seconds * 1000, seconds * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -961,7 +961,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
return;
|
||||
}
|
||||
|
||||
clan.setDissolvingExpiryTime(System.currentTimeMillis() + (Config.ALT_CLAN_DISSOLVE_DAYS * 86400000L)); // 24*60*60*1000 = 86400000
|
||||
clan.setDissolvingExpiryTime(System.currentTimeMillis() + (Config.ALT_CLAN_DISSOLVE_DAYS * 86400000)); // 24*60*60*1000 = 86400000
|
||||
clan.updateClanInDB();
|
||||
|
||||
// The clan leader should take the XP penalty of a full death.
|
||||
|
@ -44,7 +44,7 @@ public class DimensionalRift
|
||||
protected byte _type;
|
||||
protected L2Party _party;
|
||||
protected List<Byte> _completedRooms = new ArrayList<>();
|
||||
private static final long seconds_5 = 5000L;
|
||||
private static final long seconds_5 = 5000;
|
||||
// private static final int MILLISECONDS_IN_MINUTE = 60000;
|
||||
protected byte jumps_current = 0;
|
||||
|
||||
|
@ -578,14 +578,14 @@ public final class Fort extends AbstractResidence
|
||||
setOwnerClan(clan);
|
||||
final int runCount = getOwnedTime() / (Config.FS_UPDATE_FRQ * 60);
|
||||
long initial = System.currentTimeMillis() - _lastOwnedTime.getTimeInMillis();
|
||||
while (initial > (Config.FS_UPDATE_FRQ * 60000L))
|
||||
while (initial > (Config.FS_UPDATE_FRQ * 60000))
|
||||
{
|
||||
initial -= Config.FS_UPDATE_FRQ * 60000L;
|
||||
initial -= Config.FS_UPDATE_FRQ * 60000;
|
||||
}
|
||||
initial = (Config.FS_UPDATE_FRQ * 60000L) - initial;
|
||||
initial = (Config.FS_UPDATE_FRQ * 60000) - initial;
|
||||
if ((Config.FS_MAX_OWN_TIME <= 0) || (getOwnedTime() < (Config.FS_MAX_OWN_TIME * 3600)))
|
||||
{
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.PERIODIC_UPDATE), initial, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.PERIODIC_UPDATE), initial, Config.FS_UPDATE_FRQ * 60000); // Schedule owner tasks to start running
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
{
|
||||
_FortUpdater[1] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
@ -818,7 +818,7 @@ public final class Fort extends AbstractResidence
|
||||
{
|
||||
_FortUpdater[1].cancel(false);
|
||||
}
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.PERIODIC_UPDATE), Config.FS_UPDATE_FRQ * 60000L, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.PERIODIC_UPDATE), Config.FS_UPDATE_FRQ * 60000, Config.FS_UPDATE_FRQ * 60000); // Schedule owner tasks to start running
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
{
|
||||
_FortUpdater[1] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
@ -914,7 +914,7 @@ public final class Fort extends AbstractResidence
|
||||
|
||||
public final int getTimeTillRebelArmy()
|
||||
{
|
||||
return _lastOwnedTime.getTimeInMillis() == 0 ? 0 : (int) (((_lastOwnedTime.getTimeInMillis() + (Config.FS_MAX_OWN_TIME * 3600000L)) - System.currentTimeMillis()) / 1000L);
|
||||
return _lastOwnedTime.getTimeInMillis() == 0 ? 0 : (int) (((_lastOwnedTime.getTimeInMillis() + (Config.FS_MAX_OWN_TIME * 3600000)) - System.currentTimeMillis()) / 1000);
|
||||
}
|
||||
|
||||
public final long getTimeTillNextFortUpdate()
|
||||
|
@ -274,7 +274,7 @@ public class FortSiege implements Siegable
|
||||
getSiegeGuardManager().unspawnSiegeGuard(); // Remove all spawned siege guard from this fort
|
||||
getFort().resetDoors(); // Respawn door to fort
|
||||
|
||||
ThreadPool.schedule(new ScheduleSuspiciousMerchantSpawn(), FortSiegeManager.getInstance().getSuspiciousMerchantRespawnDelay() * 60 * 1000L); // Prepare 3hr task for suspicious merchant respawn
|
||||
ThreadPool.schedule(new ScheduleSuspiciousMerchantSpawn(), FortSiegeManager.getInstance().getSuspiciousMerchantRespawnDelay() * 60 * 1000); // Prepare 3hr task for suspicious merchant respawn
|
||||
setSiegeDateTime(true); // store suspicious merchant spawn in DB
|
||||
|
||||
if (_siegeEnd != null)
|
||||
@ -338,7 +338,7 @@ public class FortSiege implements Siegable
|
||||
getFort().getZone().updateZoneStatusForCharactersInside();
|
||||
|
||||
// Schedule a task to prepare auto siege end
|
||||
_siegeEnd = ThreadPool.schedule(new ScheduleEndSiegeTask(), FortSiegeManager.getInstance().getSiegeLength() * 60 * 1000L); // Prepare auto end task
|
||||
_siegeEnd = ThreadPool.schedule(new ScheduleEndSiegeTask(), FortSiegeManager.getInstance().getSiegeLength() * 60 * 1000); // Prepare auto end task
|
||||
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_FORTRESS_BATTLE_S1_HAS_BEGUN);
|
||||
sm.addCastleId(getFort().getResidenceId());
|
||||
@ -664,7 +664,7 @@ public class FortSiege implements Siegable
|
||||
getFort().getSiege().announceToPlayer(SystemMessage.getSystemMessage(SystemMessageId.THE_BARRACKS_HAVE_BEEN_SEIZED));
|
||||
if (_siegeRestore == null)
|
||||
{
|
||||
_siegeRestore = ThreadPool.schedule(new ScheduleSiegeRestore(), FortSiegeManager.getInstance().getCountDownLength() * 60 * 1000L);
|
||||
_siegeRestore = ThreadPool.schedule(new ScheduleSiegeRestore(), FortSiegeManager.getInstance().getCountDownLength() * 60 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class NevitSystem implements IUniqueId
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
// Reset Nevit's Blessing
|
||||
if ((_player.getLastAccess() < (cal.getTimeInMillis() / 1000L)) && (System.currentTimeMillis() > cal.getTimeInMillis()))
|
||||
if ((_player.getLastAccess() < (cal.getTimeInMillis() / 1000)) && (System.currentTimeMillis() > cal.getTimeInMillis()))
|
||||
{
|
||||
_player.getVariables().set("hunting_time", 0);
|
||||
}
|
||||
@ -206,7 +206,7 @@ public class NevitSystem implements IUniqueId
|
||||
getPlayer().sendPacket(new ExNevitAdventEffect(time));
|
||||
getPlayer().sendPacket(SystemMessageId.THE_ANGEL_NEVIT_HAS_BLESSED_YOU_FROM_ABOVE_YOU_ARE_IMBUED_WITH_FULL_VITALITY_AS_WELL_AS_A_VITALITY_REPLENISHING_EFFECT_AND_SHOULD_YOU_DIE_YOU_WILL_NOT_LOSE_EXP);
|
||||
getPlayer().startAbnormalVisualEffect(true, AbnormalVisualEffect.NAVIT_ADVENT);
|
||||
_nevitEffectTask = ThreadPool.schedule(new NevitEffectEnd(), time * 1000L);
|
||||
_nevitEffectTask = ThreadPool.schedule(new NevitEffectEnd(), time * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ public class TvTEvent
|
||||
_TvTEventInstance = InstanceManager.getInstance().createDynamicInstance(Config.TVT_EVENT_INSTANCE_ID).getId();
|
||||
InstanceManager.getInstance().getInstance(_TvTEventInstance).setAllowSummon(false);
|
||||
InstanceManager.getInstance().getInstance(_TvTEventInstance).setIsPvP(true);
|
||||
InstanceManager.getInstance().getInstance(_TvTEventInstance).setEmptyDestroyTime((Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY * 1000) + 60000L);
|
||||
InstanceManager.getInstance().getInstance(_TvTEventInstance).setEmptyDestroyTime((Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY * 1000) + 60000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ public class TvTManager
|
||||
Broadcast.toAllOnlinePlayers("TvT Event: Registration opened for " + Config.TVT_EVENT_PARTICIPATION_TIME + " minute(s).");
|
||||
|
||||
// schedule registration end
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000L * Config.TVT_EVENT_PARTICIPATION_TIME));
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000 * Config.TVT_EVENT_PARTICIPATION_TIME));
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class TvTManager
|
||||
else
|
||||
{
|
||||
TvTEvent.sysMsgToAllParticipants("TvT Event: Teleporting participants to an arena in " + Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY + " second(s).");
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000L * Config.TVT_EVENT_RUNNING_TIME));
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000 * Config.TVT_EVENT_RUNNING_TIME));
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
|
@ -182,12 +182,12 @@ public final class ItemAuction
|
||||
|
||||
public final long getStartingTimeRemaining()
|
||||
{
|
||||
return Math.max(getEndingTime() - System.currentTimeMillis(), 0L);
|
||||
return Math.max(getEndingTime() - System.currentTimeMillis(), 0);
|
||||
}
|
||||
|
||||
public final long getFinishingTimeRemaining()
|
||||
{
|
||||
return Math.max(getEndingTime() - System.currentTimeMillis(), 0L);
|
||||
return Math.max(getEndingTime() - System.currentTimeMillis(), 0);
|
||||
}
|
||||
|
||||
public final void storeMe()
|
||||
|
@ -323,17 +323,17 @@ public final class ItemAuctionInstance
|
||||
{
|
||||
if (currentAuction.getAuctionState() == ItemAuctionState.STARTED)
|
||||
{
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getEndingTime() - System.currentTimeMillis(), 0)));
|
||||
}
|
||||
else
|
||||
{
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getStartingTime() - System.currentTimeMillis(), 0)));
|
||||
}
|
||||
LOGGER.log(Level.INFO, getClass().getSimpleName() + ": Schedule current auction " + currentAuction.getAuctionId() + " for instance " + _instanceId);
|
||||
}
|
||||
else
|
||||
{
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(nextAuction), Math.max(nextAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(nextAuction), Math.max(nextAuction.getStartingTime() - System.currentTimeMillis(), 0)));
|
||||
LOGGER.log(Level.INFO, getClass().getSimpleName() + ": Schedule next auction " + nextAuction.getAuctionId() + " on " + DATE_FORMAT.format(new Date(nextAuction.getStartingTime())) + " for instance " + _instanceId);
|
||||
}
|
||||
}
|
||||
@ -416,7 +416,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() == ItemAuctionExtendState.INITIAL)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_5_MIN);
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -426,7 +426,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_3_MIN)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_3_MIN);
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -436,7 +436,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_B)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_B);
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -446,7 +446,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_A)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_A);
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ public class Olympiad extends ListenersContainer
|
||||
{
|
||||
// if (_olympiadEnd > Calendar.getInstance().getTimeInMillis())
|
||||
return _olympiadEnd - Calendar.getInstance().getTimeInMillis();
|
||||
// return 10L;
|
||||
// return 10;
|
||||
}
|
||||
|
||||
public void manualSelectHeroes()
|
||||
@ -598,7 +598,7 @@ public class Olympiad extends ListenersContainer
|
||||
{
|
||||
return _validationEnd - Calendar.getInstance().getTimeInMillis();
|
||||
}
|
||||
return 10L;
|
||||
return 10;
|
||||
}
|
||||
|
||||
public boolean isOlympiadEnd()
|
||||
@ -696,7 +696,7 @@ public class Olympiad extends ListenersContainer
|
||||
{
|
||||
if ((_compStart.getTimeInMillis() < Calendar.getInstance().getTimeInMillis()) && (_compEnd > Calendar.getInstance().getTimeInMillis()))
|
||||
{
|
||||
return 10L;
|
||||
return 10;
|
||||
}
|
||||
|
||||
if (_compStart.getTimeInMillis() > Calendar.getInstance().getTimeInMillis())
|
||||
@ -754,7 +754,7 @@ public class Olympiad extends ListenersContainer
|
||||
{
|
||||
// if (_compEnd > Calendar.getInstance().getTimeInMillis())
|
||||
return _compEnd - Calendar.getInstance().getTimeInMillis();
|
||||
// return 10L;
|
||||
// return 10;
|
||||
}
|
||||
|
||||
private long getMillisToWeekChange()
|
||||
@ -763,7 +763,7 @@ public class Olympiad extends ListenersContainer
|
||||
{
|
||||
return _nextWeeklyChange - Calendar.getInstance().getTimeInMillis();
|
||||
}
|
||||
return 10L;
|
||||
return 10;
|
||||
}
|
||||
|
||||
private void scheduleWeeklyChange()
|
||||
|
@ -253,7 +253,7 @@ public final class BuffInfo
|
||||
// Creates a task that will stop all the effects.
|
||||
if (_abnormalTime > 0)
|
||||
{
|
||||
_scheduledFutureTimeTask = ThreadPool.scheduleAtFixedRate(new BuffTimeTask(this), 0, 1000L);
|
||||
_scheduledFutureTimeTask = ThreadPool.scheduleAtFixedRate(new BuffTimeTask(this), 0, 1000);
|
||||
}
|
||||
|
||||
boolean update = false;
|
||||
|
@ -323,7 +323,7 @@ public final class L2GameClient extends ChannelInboundHandler<L2GameClient>
|
||||
{
|
||||
try (PreparedStatement ps2 = con.prepareStatement("UPDATE characters SET deletetime=? WHERE charId=?"))
|
||||
{
|
||||
ps2.setLong(1, System.currentTimeMillis() + (Config.DELETE_DAYS * 86400000L)); // 24*60*60*1000 = 86400000
|
||||
ps2.setLong(1, System.currentTimeMillis() + (Config.DELETE_DAYS * 86400000)); // 24*60*60*1000 = 86400000
|
||||
ps2.setInt(2, objectId);
|
||||
ps2.execute();
|
||||
}
|
||||
|
@ -81,13 +81,13 @@ public final class AllyDismiss implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
leaderClan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED * 86400000L), L2Clan.PENALTY_TYPE_DISMISS_CLAN); // 24*60*60*1000 = 86400000
|
||||
leaderClan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED * 86400000), L2Clan.PENALTY_TYPE_DISMISS_CLAN); // 24*60*60*1000 = 86400000
|
||||
leaderClan.updateClanInDB();
|
||||
|
||||
clan.setAllyId(0);
|
||||
clan.setAllyName(null);
|
||||
clan.changeAllyCrest(0, true);
|
||||
clan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED * 86400000L), L2Clan.PENALTY_TYPE_CLAN_DISMISSED); // 24*60*60*1000 = 86400000
|
||||
clan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED * 86400000), L2Clan.PENALTY_TYPE_CLAN_DISMISSED); // 24*60*60*1000 = 86400000
|
||||
clan.updateClanInDB();
|
||||
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_SUCCEEDED_IN_EXPELLING_THE_CLAN);
|
||||
|
@ -65,7 +65,7 @@ public final class AllyLeave implements IClientIncomingPacket
|
||||
clan.setAllyId(0);
|
||||
clan.setAllyName(null);
|
||||
clan.changeAllyCrest(0, true);
|
||||
clan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ALLY_JOIN_DAYS_WHEN_LEAVED * 86400000L), L2Clan.PENALTY_TYPE_CLAN_LEAVED); // 24*60*60*1000 = 86400000
|
||||
clan.setAllyPenaltyExpiryTime(currentTime + (Config.ALT_ALLY_JOIN_DAYS_WHEN_LEAVED * 86400000), L2Clan.PENALTY_TYPE_CLAN_LEAVED); // 24*60*60*1000 = 86400000
|
||||
clan.updateClanInDB();
|
||||
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_WITHDRAWN_FROM_THE_ALLIANCE);
|
||||
|
@ -360,8 +360,8 @@ public final class UseItem implements IClientIncomingPacket
|
||||
|
||||
private void reuseData(L2PcInstance activeChar, L2ItemInstance item, long remainingTime)
|
||||
{
|
||||
final int hours = (int) (remainingTime / 3600000L);
|
||||
final int minutes = (int) (remainingTime % 3600000L) / 60000;
|
||||
final int hours = (int) (remainingTime / 3600000);
|
||||
final int minutes = (int) (remainingTime % 3600000) / 60000;
|
||||
final int seconds = (int) ((remainingTime / 1000) % 60);
|
||||
final SystemMessage sm;
|
||||
if (hours > 0)
|
||||
|
@ -85,7 +85,7 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
packet.writeD(Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT);
|
||||
packet.writeC(0x00);
|
||||
|
||||
long lastAccess = 0L;
|
||||
long lastAccess = 0;
|
||||
if (_activeId == -1)
|
||||
{
|
||||
for (int i = 0; i < size; i++)
|
||||
|
@ -281,7 +281,7 @@ public final class TaskManager
|
||||
}
|
||||
case TYPE_GLOBAL_TASK:
|
||||
{
|
||||
interval = Long.valueOf(task.getParams()[0]) * 86400000L;
|
||||
interval = Long.valueOf(task.getParams()[0]) * 86400000;
|
||||
final String[] hour = task.getParams()[1].split(":");
|
||||
|
||||
if (hour.length != 3)
|
||||
|
Reference in New Issue
Block a user