Removed unnecessary Long literals.

This commit is contained in:
MobiusDev
2018-06-21 09:59:45 +00:00
parent e7504cea28
commit fd6b72dab6
294 changed files with 643 additions and 643 deletions

View File

@@ -127,7 +127,7 @@ public final class DenOfEvil extends AbstractNpcAI
zone.addSkill(skillId, skillLevel + 1);
if (skillLevel == 3) // 3+1=4
{
ThreadPool.schedule(new KashaDestruction(zone), 2 * 60 * 1000l);
ThreadPool.schedule(new KashaDestruction(zone), 2 * 60 * 1000);
zone.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.KASHA_S_EYE_PITCHES_AND_TOSSES_LIKE_IT_S_ABOUT_TO_EXPLODE));
}
else if (skillLevel == 2)

View File

@@ -128,12 +128,12 @@ public final class Parade extends AbstractNpcAI
public Parade()
{
// Starts at 8:00 and repeats every 6 hours.
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000L;
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000;
ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle);
// Test - Starts 3 minutes after server startup and repeats every 20 minutes.
// final long diff = timeLeftMilli(8, 0, 0), cycle = 600000L;
// ThreadPoolManager.scheduleAtFixedRate(new Start(), 180000L, cycle);
// 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(System.currentTimeMillis() + diff) + " and is scheduled each next " + (cycle / 3600000) + " hours.");
}
@@ -164,7 +164,7 @@ public final class Parade extends AbstractNpcAI
dd += 86400;
}
return (dd * 1000L) / 6L;
return (dd * 1000) / 6;
}
class Start implements Runnable

View File

@@ -669,7 +669,7 @@ public class HeartInfinityAttack extends AbstractNpcAI
@Override
public void run()
{
final long time = ((_world.startTime + (25 * 60 * 1000L)) - System.currentTimeMillis()) / 60000;
final long time = ((_world.startTime + (25 * 60 * 1000)) - System.currentTimeMillis()) / 60000;
if (time == 0)
{
broadCastPacket(_world, new ExShowScreenMessage(NpcStringId.YOU_HAVE_FAILED_AT_S1_S2_THE_INSTANCE_WILL_SHORTLY_EXPIRE, 2, 8000));

View File

@@ -637,7 +637,7 @@ public class HeartInfinityDefence extends AbstractNpcAI
@Override
public void run()
{
final long time = ((_world.startTime + (25 * 60 * 1000L)) - System.currentTimeMillis()) / 60000;
final long time = ((_world.startTime + (25 * 60 * 1000)) - System.currentTimeMillis()) / 60000;
if (time == 0)
{
conquestConclusion(_world);

View File

@@ -213,7 +213,7 @@ public class AdminCursedWeapons implements IAdminCommandHandler
{
activeChar.addItem("AdminCursedWeaponAdd", id, 1, activeChar, true);
}
cw.setEndTime(System.currentTimeMillis() + (cw.getDuration() * 60000L));
cw.setEndTime(System.currentTimeMillis() + (cw.getDuration() * 60000));
cw.reActivate();
}
}

View File

@@ -182,8 +182,8 @@ public class ItemSkillsTemplate implements IItemHandler
{
if (!isAvailable)
{
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);
SystemMessage sm = null;
if (hours > 0)

View File

@@ -545,7 +545,7 @@ public abstract class Chamber extends AbstractInstance
protected void scheduleRoomChange(InstanceWorld world, boolean bossRoom)
{
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
final long nextInterval = bossRoom ? 60000L : (ROOM_CHANGE_INTERVAL + getRandom(ROOM_CHANGE_RANDOM_TIME)) * 1000L;
final long nextInterval = bossRoom ? 60000 : (ROOM_CHANGE_INTERVAL + getRandom(ROOM_CHANGE_RANDOM_TIME)) * 1000;
// Schedule next room change only if remaining time is enough
if ((inst.getInstanceEndTime() - System.currentTimeMillis()) > nextInterval)