Threadpool refactoring.
This commit is contained in:
+2
-2
@@ -37,9 +37,9 @@ import com.l2jmobius.Config;
|
||||
* <li>Instant pool handles short-life events.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public final class ThreadPoolManager
|
||||
public final class ThreadPool
|
||||
{
|
||||
protected static final Logger LOGGER = Logger.getLogger(ThreadPoolManager.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(ThreadPool.class.getName());
|
||||
|
||||
private static final long MAX_DELAY = TimeUnit.NANOSECONDS.toMillis(Long.MAX_VALUE - System.nanoTime()) / 2;
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.Server;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.crypt.nProtect;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.mmocore.NetcoreConfig;
|
||||
@@ -182,10 +182,10 @@ public class GameServer
|
||||
LOGGER.info("L2DatabaseFactory: loaded.");
|
||||
|
||||
Util.printSection("Threads");
|
||||
ThreadPoolManager.init();
|
||||
ThreadPool.init();
|
||||
if (Config.DEADLOCKCHECK_INTIAL_TIME > 0)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(DeadlockDetector.getInstance(), Config.DEADLOCKCHECK_INTIAL_TIME, Config.DEADLOCKCHECK_DELAY_TIME);
|
||||
ThreadPool.scheduleAtFixedRate(DeadlockDetector.getInstance(), Config.DEADLOCKCHECK_INTIAL_TIME, Config.DEADLOCKCHECK_DELAY_TIME);
|
||||
}
|
||||
new File(Config.DATAPACK_ROOT, "data/clans").mkdirs();
|
||||
new File(Config.DATAPACK_ROOT, "data/crests").mkdirs();
|
||||
@@ -521,7 +521,7 @@ public class GameServer
|
||||
|
||||
if (Config.PCB_ENABLE)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(PcPoint.getInstance(), Config.PCB_INTERVAL * 1000, Config.PCB_INTERVAL * 1000);
|
||||
ThreadPool.scheduleAtFixedRate(PcPoint.getInstance(), Config.PCB_INTERVAL * 1000, Config.PCB_INTERVAL * 1000);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -67,8 +67,8 @@ public class GameTimeController
|
||||
_timer = new TimerThread();
|
||||
_timer.start();
|
||||
|
||||
_timerWatcher = ThreadPoolManager.scheduleAtFixedRate(new TimerWatcher(), 0, 1000);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new BroadcastSunState(), 0, 600000);
|
||||
_timerWatcher = ThreadPool.scheduleAtFixedRate(new TimerWatcher(), 0, 1000);
|
||||
ThreadPool.scheduleAtFixedRate(new BroadcastSunState(), 0, 600000);
|
||||
}
|
||||
|
||||
public boolean isNowNight()
|
||||
@@ -154,7 +154,7 @@ public class GameTimeController
|
||||
// TODO: maybe a general TP is needed for that kinda stuff (all knownlist updates should be done in a TP anyway).
|
||||
if (ended != null)
|
||||
{
|
||||
ThreadPoolManager.execute(new MovingObjectArrived(ended));
|
||||
ThreadPool.execute(new MovingObjectArrived(ended));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.WeakHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.csv.RecipeTable;
|
||||
import com.l2jmobius.gameserver.model.Inventory;
|
||||
@@ -118,7 +118,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION)
|
||||
{
|
||||
_activeMakers.put(manufacturer, maker);
|
||||
ThreadPoolManager.schedule(maker, 100);
|
||||
ThreadPool.schedule(maker, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,7 +169,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION)
|
||||
{
|
||||
_activeMakers.put(player, maker);
|
||||
ThreadPoolManager.schedule(maker, 100);
|
||||
ThreadPool.schedule(maker, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -385,7 +385,7 @@ public class RecipeController
|
||||
_player.broadcastPacket(msk);
|
||||
|
||||
_player.sendPacket(new SetupGauge(0, _delay));
|
||||
ThreadPoolManager.schedule(this, 100 + _delay);
|
||||
ThreadPool.schedule(this, 100 + _delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -539,7 +539,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION)
|
||||
{
|
||||
_player.sendPacket(new SetupGauge(0, _delay));
|
||||
ThreadPoolManager.schedule(this, 100 + _delay);
|
||||
ThreadPool.schedule(this, 100 + _delay);
|
||||
}
|
||||
// no rest - report no mana
|
||||
else
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Date;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Memory;
|
||||
import com.l2jmobius.commons.util.Util;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -39,7 +39,7 @@ public class ServerStatus
|
||||
|
||||
protected ServerStatus()
|
||||
{
|
||||
_scheduledTask = ThreadPoolManager.scheduleAtFixedRate(new ServerStatusTask(), 1800000, 3600000);
|
||||
_scheduledTask = ThreadPool.scheduleAtFixedRate(new ServerStatusTask(), 1800000, 3600000);
|
||||
}
|
||||
|
||||
protected class ServerStatusTask implements Runnable
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.BufferTable;
|
||||
import com.l2jmobius.gameserver.datatables.OfflineTradeTable;
|
||||
@@ -461,7 +461,7 @@ public class Shutdown extends Thread
|
||||
// stop all threadpolls
|
||||
try
|
||||
{
|
||||
ThreadPoolManager.shutdown();
|
||||
ThreadPool.shutdown();
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.L2TradeList;
|
||||
@@ -67,7 +67,7 @@ public class TradeController
|
||||
{
|
||||
restoreCount(_timer);
|
||||
dataTimerSave(_timer);
|
||||
ThreadPoolManager.schedule(new RestoreCount(_timer), (long) _timer * 60 * 60 * 1000);
|
||||
ThreadPool.schedule(new RestoreCount(_timer), (long) _timer * 60 * 60 * 1000);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -327,11 +327,11 @@ public class TradeController
|
||||
savetimer = rset2.getLong("savetimer");
|
||||
if ((savetimer - currentMillis) > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), 0);
|
||||
ThreadPool.schedule(new RestoreCount(time), 0);
|
||||
}
|
||||
}
|
||||
rset2.close();
|
||||
@@ -503,11 +503,11 @@ public class TradeController
|
||||
savetimer = rset2.getLong("savetimer");
|
||||
if ((savetimer - currentMillis) > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), 0);
|
||||
ThreadPool.schedule(new RestoreCount(time), 0);
|
||||
}
|
||||
}
|
||||
rset2.close();
|
||||
|
||||
@@ -23,7 +23,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
@@ -859,7 +859,7 @@ abstract class AbstractAI implements Ctrl
|
||||
|
||||
// Create and Launch an AI Follow Task to execute every 1s
|
||||
_followTarget = target;
|
||||
_followTask = ThreadPoolManager.scheduleAtFixedRate(new FollowTask(), 5, FOLLOW_INTERVAL);
|
||||
_followTask = ThreadPool.scheduleAtFixedRate(new FollowTask(), 5, FOLLOW_INTERVAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -877,7 +877,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
_followTarget = target;
|
||||
_followTask = ThreadPoolManager.scheduleAtFixedRate(new FollowTask(range), 5, ATTACK_FOLLOW_INTERVAL);
|
||||
_followTask = ThreadPool.scheduleAtFixedRate(new FollowTask(range), 5, ATTACK_FOLLOW_INTERVAL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.datatables.sql.TerritoryTable;
|
||||
@@ -315,7 +315,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
|
||||
if (_aiTask == null)
|
||||
{
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -100,7 +100,7 @@ public class L2DoorAI extends L2CharacterAI
|
||||
protected void onEvtAttacked(L2Character attacker)
|
||||
{
|
||||
L2DoorInstance me = (L2DoorInstance) _actor;
|
||||
ThreadPoolManager.execute(new onEventAttackedDoorTask(me, attacker));
|
||||
ThreadPool.execute(new onEventAttackedDoorTask(me, attacker));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
@@ -257,7 +257,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||
if (_aiTask == null)
|
||||
{
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.ai;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.csv.NpcWalkerRoutesTable;
|
||||
import com.l2jmobius.gameserver.model.L2NpcWalkerNode;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -59,7 +59,7 @@ public class L2NpcWalkerAI extends L2CharacterAI implements Runnable
|
||||
super(accessor);
|
||||
// Do we really need 2 minutes delay before start?
|
||||
// no we dont... :)
|
||||
ThreadPoolManager.scheduleAtFixedRate(this, 0, 1000);
|
||||
ThreadPool.scheduleAtFixedRate(this, 0, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
|
||||
import java.util.EmptyStackException;
|
||||
import java.util.Stack;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -371,7 +371,7 @@ public class L2PlayerAI extends L2CharacterAI
|
||||
@Override
|
||||
protected void onEvtArrivedRevalidate()
|
||||
{
|
||||
ThreadPoolManager.execute(new KnownListAsynchronousUpdateTask(_actor));
|
||||
ThreadPool.execute(new KnownListAsynchronousUpdateTask(_actor));
|
||||
super.onEvtArrivedRevalidate();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||
@@ -215,7 +215,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
|
||||
// If not idle - create an AI task (schedule onEvtThink repeatedly)
|
||||
if (_aiTask == null)
|
||||
{
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ public class WarehouseCacheManager
|
||||
{
|
||||
_cacheTime = Config.WAREHOUSE_CACHE_TIME * 60000L; // 60*1000 = 60000
|
||||
_cachedWh = new ConcurrentHashMap<>();
|
||||
ThreadPoolManager.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
|
||||
ThreadPool.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
|
||||
}
|
||||
|
||||
public void addCacheTask(L2PcInstance pc)
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@@ -426,7 +426,7 @@ public class ClanTable
|
||||
|
||||
public void scheduleRemoveClan(int clanId)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
if (getClan(clanId) == null)
|
||||
{
|
||||
|
||||
+4
-4
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.L2TradeList;
|
||||
@@ -58,7 +58,7 @@ public class TradeListTable
|
||||
{
|
||||
restoreCount(timer);
|
||||
dataTimerSave(timer);
|
||||
ThreadPoolManager.schedule(new RestoreCount(timer), (long) timer * 60 * 60 * 1000);
|
||||
ThreadPool.schedule(new RestoreCount(timer), (long) timer * 60 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,11 +186,11 @@ public class TradeListTable
|
||||
savetimer = rset2.getLong("savetimer");
|
||||
if ((savetimer - currentMillis) > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new RestoreCount(time), savetimer - System.currentTimeMillis());
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new RestoreCount(time), 0);
|
||||
ThreadPool.schedule(new RestoreCount(time), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.L2PetDataTable;
|
||||
import com.l2jmobius.gameserver.engines.DocumentEngine;
|
||||
@@ -216,7 +216,7 @@ public class ItemTable
|
||||
item.setOwnerId(actor.getObjectId());
|
||||
delay = 15000;
|
||||
}
|
||||
itemLootShedule = ThreadPoolManager.schedule(new resetOwner(item), delay);
|
||||
itemLootShedule = ThreadPool.schedule(new resetOwner(item), delay);
|
||||
item.setItemLootShedule(itemLootShedule);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.Announcements;
|
||||
@@ -427,7 +427,7 @@ public class AutoAnnouncementHandler
|
||||
if (isActive())
|
||||
{
|
||||
AutoAnnouncementRunner acr = new AutoAnnouncementRunner(_defaultId);
|
||||
_chatTask = ThreadPoolManager.scheduleAtFixedRate(acr, _defaultDelay, _defaultDelay);
|
||||
_chatTask = ThreadPool.scheduleAtFixedRate(acr, _defaultDelay, _defaultDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -557,7 +557,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
if (isActive())
|
||||
{
|
||||
AutoChatRunner acr = new AutoChatRunner(_npcId, -1);
|
||||
_chatTask = ThreadPoolManager.scheduleAtFixedRate(acr, _defaultDelay, _defaultDelay);
|
||||
_chatTask = ThreadPool.scheduleAtFixedRate(acr, _defaultDelay, _defaultDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -669,11 +669,11 @@ public class AutoChatHandler implements SpawnListener
|
||||
{
|
||||
// Schedule it set to 5Ms, isn't error, if use 0 sometine
|
||||
// chatDefinition return null in AutoChatRunner
|
||||
_chatTask = ThreadPoolManager.schedule(acr, 5);
|
||||
_chatTask = ThreadPool.schedule(acr, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
_chatTask = ThreadPoolManager.scheduleAtFixedRate(acr, getChatDelay(), getChatDelay());
|
||||
_chatTask = ThreadPool.scheduleAtFixedRate(acr, getChatDelay(), getChatDelay());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.handler.admincommandhandlers;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.MonsterRace;
|
||||
@@ -119,7 +119,7 @@ public class AdminMonsterRace implements IAdminCommandHandler
|
||||
activeChar.sendPacket(spk);
|
||||
activeChar.broadcastPacket(spk);
|
||||
|
||||
ThreadPoolManager.schedule(new RunRace(codes, activeChar), 5000);
|
||||
ThreadPool.schedule(new RunRace(codes, activeChar), 5000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public class AdminMonsterRace implements IAdminCommandHandler
|
||||
MonRaceInfo spk = new MonRaceInfo(codes[2][0], codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds());
|
||||
activeChar.sendPacket(spk);
|
||||
activeChar.broadcastPacket(spk);
|
||||
ThreadPoolManager.schedule(new RunEnd(activeChar), 30000);
|
||||
ThreadPool.schedule(new RunEnd(activeChar), 30000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.NoSuchElementException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -55,7 +55,7 @@ public class AdminTest implements IAdminCommandHandler
|
||||
{
|
||||
if (command.equals("admin_stats"))
|
||||
{
|
||||
for (String line : ThreadPoolManager.getStats())
|
||||
for (String line : ThreadPool.getStats())
|
||||
{
|
||||
activeChar.sendMessage(line);
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
@@ -87,7 +87,7 @@ public class ChristmasTree implements IItemHandler
|
||||
SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
|
||||
activeChar.sendPacket(sm);
|
||||
|
||||
ThreadPoolManager.schedule(new DeSpawn(result), 3600000);
|
||||
ThreadPool.schedule(new DeSpawn(result), 3600000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance;
|
||||
@@ -64,7 +64,7 @@ public class MysteryPotion implements IItemHandler
|
||||
activeChar.sendPacket(sm);
|
||||
|
||||
MysteryPotionStop mp = new MysteryPotionStop(playable);
|
||||
ThreadPoolManager.schedule(mp, EFFECT_DURATION);
|
||||
ThreadPool.schedule(mp, EFFECT_DURATION);
|
||||
}
|
||||
|
||||
public class MysteryPotionStop implements Runnable
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
@@ -807,7 +807,7 @@ public class Potions implements IItemHandler
|
||||
if (activeChar.isCastingNow() && (magicId > 2277) && (magicId < 2285))
|
||||
{
|
||||
_herbstask += 100;
|
||||
ThreadPoolManager.schedule(new HerbTask(activeChar, magicId, level), _herbstask);
|
||||
ThreadPool.schedule(new HerbTask(activeChar, magicId, level), _herbstask);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -223,7 +223,7 @@ public class ScrollOfEscape implements IItemHandler
|
||||
|
||||
EscapeFinalizer ef = new EscapeFinalizer(activeChar, itemId);
|
||||
// continue execution later
|
||||
activeChar.setSkillCast(ThreadPoolManager.schedule(ef, skill.getHitTime()));
|
||||
activeChar.setSkillCast(ThreadPool.schedule(ef, skill.getHitTime()));
|
||||
activeChar.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (skill.getHitTime() / GameTimeController.MILLIS_IN_TICK));
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -131,7 +131,7 @@ public class SoulCrystals implements IItemHandler
|
||||
|
||||
// Continue execution later
|
||||
CrystalFinalizer cf = new CrystalFinalizer(activeChar, target, crystalId);
|
||||
ThreadPoolManager.schedule(cf, skill.getHitTime());
|
||||
ThreadPool.schedule(cf, skill.getHitTime());
|
||||
}
|
||||
|
||||
static class CrystalFinalizer implements Runnable
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.datatables.csv.SummonItemsData;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
@@ -173,7 +173,7 @@ public class SummonItems implements IItemHandler
|
||||
final L2Skill skill = SkillTable.getInstance().getInfo(2046, 1);
|
||||
activeChar.useMagic(skill, true, true);
|
||||
activeChar.sendPacket(SystemMessageId.SUMMON_A_PET);
|
||||
ThreadPoolManager.schedule(new PetSummonFinalizer(activeChar, npcTemplate, item), 4800);
|
||||
ThreadPool.schedule(new PetSummonFinalizer(activeChar, npcTemplate, item), 4800);
|
||||
break;
|
||||
}
|
||||
case 2: // wyvern
|
||||
@@ -289,7 +289,7 @@ public class SummonItems implements IItemHandler
|
||||
|
||||
if (petSummon.getCurrentFed() <= 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new PetSummonFeedWait(_activeChar, petSummon), 60000);
|
||||
ThreadPool.schedule(new PetSummonFeedWait(_activeChar, petSummon), 60000);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.handler.skillhandlers;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
@@ -67,7 +67,7 @@ public class ClanGate implements ISkillHandler
|
||||
if (player.isCastleLord(castle.getCastleId()))
|
||||
{
|
||||
// please note clan gate expires in two minutes WHATEVER happens to the clan leader.
|
||||
ThreadPoolManager.schedule(new RemoveClanGate(castle.getCastleId(), player), skill.getTotalLifeTime());
|
||||
ThreadPool.schedule(new RemoveClanGate(castle.getCastleId(), player), skill.getTotalLifeTime());
|
||||
castle.createClanGate(player.getX(), player.getY(), player.getZ() + 20);
|
||||
player.getClan().broadcastToOnlineMembers(new SystemMessage(SystemMessageId.COURT_MAGICIAN_CREATED_PORTAL));
|
||||
player.setIsParalyzed(true);
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.handler.usercommandhandlers;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.csv.MapRegionTable;
|
||||
@@ -156,7 +156,7 @@ public class Escape implements IUserCommandHandler
|
||||
// End SoE Animation section
|
||||
EscapeFinalizer ef = new EscapeFinalizer(activeChar);
|
||||
// continue execution later
|
||||
activeChar.setSkillCast(ThreadPoolManager.schedule(ef, unstuckTimer));
|
||||
activeChar.setSkillCast(ThreadPool.schedule(ef, unstuckTimer));
|
||||
activeChar.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (unstuckTimer / GameTimeController.MILLIS_IN_TICK));
|
||||
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.handler.voicedcommandhandlers;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.olympiad.Olympiad;
|
||||
@@ -118,7 +118,7 @@ public class FarmPvpCmd implements IVoicedCommandHandler
|
||||
activeChar.sendPacket(sg);
|
||||
activeChar.setIsImobilised(true);
|
||||
|
||||
ThreadPoolManager.schedule(new teleportTask(activeChar, placex, placey, placez, message), 15000);
|
||||
ThreadPool.schedule(new teleportTask(activeChar, placex, placey, placez, message), 15000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.handler.voicedcommandhandlers;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -409,7 +409,7 @@ public class Wedding implements IVoicedCommandHandler
|
||||
|
||||
EscapeFinalizer ef = new EscapeFinalizer(activeChar, partner.getX(), partner.getY(), partner.getZ(), partner.isIn7sDungeon());
|
||||
// continue execution later
|
||||
activeChar.setSkillCast(ThreadPoolManager.schedule(ef, teleportTimer));
|
||||
activeChar.setSkillCast(ThreadPool.schedule(ef, teleportTimer));
|
||||
activeChar.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (teleportTimer / GameTimeController.MILLIS_IN_TICK));
|
||||
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.PrimeFinder;
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ public class BitSetIDFactory extends IdFactory
|
||||
protected BitSetIDFactory()
|
||||
{
|
||||
super();
|
||||
ThreadPoolManager.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
|
||||
ThreadPool.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
|
||||
initialize();
|
||||
LOGGER.info("IDFactory: " + _freeIds.size() + " id's available.");
|
||||
}
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -72,9 +72,9 @@ public class AutoSaveManager
|
||||
public void startAutoSaveManager()
|
||||
{
|
||||
stopAutoSaveManager();
|
||||
_autoSaveInDB = ThreadPoolManager.scheduleAtFixedRate(new AutoSaveTask(), Config.AUTOSAVE_INITIAL_TIME, Config.AUTOSAVE_DELAY_TIME);
|
||||
_autoCheckConnectionStatus = ThreadPoolManager.scheduleAtFixedRate(new ConnectionCheckTask(), Config.CHECK_CONNECTION_INITIAL_TIME, Config.CHECK_CONNECTION_DELAY_TIME);
|
||||
_autoCleanDatabase = ThreadPoolManager.scheduleAtFixedRate(new AutoCleanDBTask(), Config.CLEANDB_INITIAL_TIME, Config.CLEANDB_DELAY_TIME);
|
||||
_autoSaveInDB = ThreadPool.scheduleAtFixedRate(new AutoSaveTask(), Config.AUTOSAVE_INITIAL_TIME, Config.AUTOSAVE_DELAY_TIME);
|
||||
_autoCheckConnectionStatus = ThreadPool.scheduleAtFixedRate(new ConnectionCheckTask(), Config.CHECK_CONNECTION_INITIAL_TIME, Config.CHECK_CONNECTION_DELAY_TIME);
|
||||
_autoCleanDatabase = ThreadPool.scheduleAtFixedRate(new AutoCleanDBTask(), Config.CLEANDB_INITIAL_TIME, Config.CLEANDB_DELAY_TIME);
|
||||
}
|
||||
|
||||
protected class AutoSaveTask implements Runnable
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ import java.util.WeakHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
@@ -90,7 +90,7 @@ public final class AwayManager
|
||||
SetupGauge sg = new SetupGauge(SetupGauge.BLUE, Config.AWAY_TIMER * 1000);
|
||||
activeChar.sendPacket(sg);
|
||||
activeChar.setIsImobilised(true);
|
||||
ThreadPoolManager.schedule(new setPlayerAwayTask(activeChar, text), Config.AWAY_TIMER * 1000);
|
||||
ThreadPool.schedule(new setPlayerAwayTask(activeChar, text), Config.AWAY_TIMER * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,7 @@ public final class AwayManager
|
||||
activeChar.sendMessage("You are back from Away Status in " + Config.BACK_TIMER + " Sec.");
|
||||
SetupGauge sg = new SetupGauge(SetupGauge.BLUE, Config.BACK_TIMER * 1000);
|
||||
activeChar.sendPacket(sg);
|
||||
ThreadPoolManager.schedule(new setPlayerBackTask(activeChar), Config.BACK_TIMER * 1000);
|
||||
ThreadPool.schedule(new setPlayerBackTask(activeChar), Config.BACK_TIMER * 1000);
|
||||
}
|
||||
|
||||
public void extraBack(L2PcInstance activeChar)
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
@@ -293,7 +293,7 @@ public class CastleManorManager
|
||||
FirstDelay.set(Calendar.SECOND, 0);
|
||||
FirstDelay.set(Calendar.MILLISECOND, 0);
|
||||
FirstDelay.add(Calendar.MINUTE, 1);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new ManorTask(), FirstDelay.getTimeInMillis() - Calendar.getInstance().getTimeInMillis(), 60000);
|
||||
ThreadPool.scheduleAtFixedRate(new ManorTask(), FirstDelay.getTimeInMillis() - Calendar.getInstance().getTimeInMillis(), 60000);
|
||||
}
|
||||
|
||||
public void setNextPeriod()
|
||||
|
||||
+9
-9
@@ -22,7 +22,7 @@ import java.util.Random;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
@@ -321,7 +321,7 @@ public class ChristmasManager
|
||||
|
||||
// Tasks:
|
||||
|
||||
ThreadPoolManager.execute(new DeleteSpawns());
|
||||
ThreadPool.execute(new DeleteSpawns());
|
||||
|
||||
endFestiveMessagesAtFixedRate();
|
||||
isManagerInit--;
|
||||
@@ -340,7 +340,7 @@ public class ChristmasManager
|
||||
public void spawnTrees()
|
||||
{
|
||||
GetTreePos gtp = new GetTreePos(first);
|
||||
ThreadPoolManager.execute(gtp);
|
||||
ThreadPool.execute(gtp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,7 +416,7 @@ public class ChristmasManager
|
||||
|
||||
SpawnSantaNPCs ssNPCs = new SpawnSantaNPCs(first);
|
||||
|
||||
_task = ThreadPoolManager.schedule(ssNPCs, 300);
|
||||
_task = ThreadPool.schedule(ssNPCs, 300);
|
||||
ssNPCs.setTask(_task);
|
||||
|
||||
return;
|
||||
@@ -425,7 +425,7 @@ public class ChristmasManager
|
||||
_iterator++;
|
||||
GetTreePos gtp = new GetTreePos(_iterator);
|
||||
|
||||
_task = ThreadPoolManager.schedule(gtp, 300);
|
||||
_task = ThreadPool.schedule(gtp, 300);
|
||||
gtp.setTask(_task);
|
||||
}
|
||||
}
|
||||
@@ -523,7 +523,7 @@ public class ChristmasManager
|
||||
private void startFestiveMessagesAtFixedRate()
|
||||
{
|
||||
SendXMasMessage XMasMessage = new SendXMasMessage();
|
||||
_XMasMessageTask = ThreadPoolManager.scheduleAtFixedRate(XMasMessage, 60000, _IntervalOfChristmas);
|
||||
_XMasMessageTask = ThreadPool.scheduleAtFixedRate(XMasMessage, 60000, _IntervalOfChristmas);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -598,7 +598,7 @@ public class ChristmasManager
|
||||
private void givePresentsAtFixedRate()
|
||||
{
|
||||
final XMasPresentGivingTask XMasPresents = new XMasPresentGivingTask();
|
||||
_XMasPresentsTask = ThreadPoolManager.scheduleAtFixedRate(XMasPresents, _IntervalOfChristmas, _IntervalOfChristmas * 3);
|
||||
_XMasPresentsTask = ThreadPool.scheduleAtFixedRate(XMasPresents, _IntervalOfChristmas, _IntervalOfChristmas * 3);
|
||||
}
|
||||
|
||||
class XMasPresentGivingTask implements Runnable
|
||||
@@ -722,7 +722,7 @@ public class ChristmasManager
|
||||
_iterator++;
|
||||
SpawnSantaNPCs ssNPCs = new SpawnSantaNPCs(_iterator);
|
||||
|
||||
_task = ThreadPoolManager.schedule(ssNPCs, 300);
|
||||
_task = ThreadPool.schedule(ssNPCs, 300);
|
||||
ssNPCs.setTask(_task);
|
||||
}
|
||||
}
|
||||
@@ -741,7 +741,7 @@ public class ChristmasManager
|
||||
LOGGER.info("ChristmasManager:Init ChristmasManager was started successfully, have a festive holiday.");
|
||||
|
||||
final EndEvent ee = new EndEvent();
|
||||
Future<?> task = ThreadPoolManager.schedule(ee, 86400000);
|
||||
Future<?> task = ThreadPool.schedule(ee, 86400000);
|
||||
ee.setTask(task);
|
||||
|
||||
isManagerInit = 5;
|
||||
|
||||
+4
-4
@@ -27,7 +27,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
@@ -67,7 +67,7 @@ public class FishingChampionshipManager
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ public class FishingChampionshipManager
|
||||
pl.sendPacket(html);
|
||||
|
||||
refreshResult();
|
||||
ThreadPoolManager.schedule(new needRefresh(), 60000);
|
||||
ThreadPool.schedule(new needRefresh(), 60000);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ public class FishingChampionshipManager
|
||||
shutdown();
|
||||
|
||||
LOGGER.info("FishingChampionshipManager : new event period start.");
|
||||
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -28,7 +28,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
@@ -321,7 +321,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
// check
|
||||
{
|
||||
clean();
|
||||
_changeEntryTimeTask = ThreadPoolManager.schedule(new ChangeEntryTime(), 0);
|
||||
_changeEntryTimeTask = ThreadPool.schedule(new ChangeEntryTime(), 0);
|
||||
LOGGER.info("FourSepulchersManager: Beginning in Entry time");
|
||||
}
|
||||
else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup
|
||||
@@ -329,7 +329,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
// check
|
||||
{
|
||||
clean();
|
||||
_changeWarmUpTimeTask = ThreadPoolManager.schedule(new ChangeWarmUpTime(), 0);
|
||||
_changeWarmUpTimeTask = ThreadPool.schedule(new ChangeWarmUpTime(), 0);
|
||||
LOGGER.info("FourSepulchersManager: Beginning in WarmUp time");
|
||||
}
|
||||
else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack
|
||||
@@ -337,14 +337,14 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
// check
|
||||
{
|
||||
clean();
|
||||
_changeAttackTimeTask = ThreadPoolManager.schedule(new ChangeAttackTime(), 0);
|
||||
_changeAttackTimeTask = ThreadPool.schedule(new ChangeAttackTime(), 0);
|
||||
LOGGER.info("FourSepulchersManager: Beginning in Attack time");
|
||||
}
|
||||
else
|
||||
// else cooldown time and without cleanup because it's already
|
||||
// implemented
|
||||
{
|
||||
_changeCoolDownTimeTask = ThreadPoolManager.schedule(new ChangeCoolDownTime(), 0);
|
||||
_changeCoolDownTimeTask = ThreadPool.schedule(new ChangeCoolDownTime(), 0);
|
||||
LOGGER.info("FourSepulchersManager: Beginning in Cooldown time");
|
||||
}
|
||||
}
|
||||
@@ -1783,7 +1783,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
// cannot be
|
||||
// more than
|
||||
// 59
|
||||
ThreadPoolManager.schedule(new ManagerSay(), 5 * 60000);
|
||||
ThreadPool.schedule(new ManagerSay(), 5 * 60000);
|
||||
}
|
||||
// attack time ending chat
|
||||
else if ((tmp.get(Calendar.MINUTE) + 5) >= Config.FS_TIME_ATTACK)
|
||||
@@ -1826,8 +1826,8 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
}
|
||||
|
||||
// launching saying process...
|
||||
ThreadPoolManager.schedule(new ManagerSay(), 0);
|
||||
_changeWarmUpTimeTask = ThreadPoolManager.schedule(new ChangeWarmUpTime(), interval);
|
||||
ThreadPool.schedule(new ManagerSay(), 0);
|
||||
_changeWarmUpTimeTask = ThreadPool.schedule(new ChangeWarmUpTime(), interval);
|
||||
if (_changeEntryTimeTask != null)
|
||||
{
|
||||
_changeEntryTimeTask.cancel(true);
|
||||
@@ -1860,7 +1860,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
{
|
||||
interval = Config.FS_TIME_WARMUP * 60000;
|
||||
}
|
||||
_changeAttackTimeTask = ThreadPoolManager.schedule(new ChangeAttackTime(), interval);
|
||||
_changeAttackTimeTask = ThreadPool.schedule(new ChangeAttackTime(), interval);
|
||||
|
||||
if (_changeWarmUpTimeTask != null)
|
||||
{
|
||||
@@ -1907,14 +1907,14 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
// + " minute of this hour.");
|
||||
final Calendar inter = Calendar.getInstance();
|
||||
inter.set(Calendar.MINUTE, (int) min);
|
||||
ThreadPoolManager.schedule(new ManagerSay(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
|
||||
ThreadPool.schedule(new ManagerSay(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new ManagerSay(), 5 * 60400);
|
||||
ThreadPool.schedule(new ManagerSay(), 5 * 60400);
|
||||
}
|
||||
// searching time when attack time will be ended:
|
||||
// counting difference between time when attack time ends and
|
||||
@@ -1928,7 +1928,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
{
|
||||
interval = Config.FS_TIME_ATTACK * 60000;
|
||||
}
|
||||
_changeCoolDownTimeTask = ThreadPoolManager.schedule(new ChangeCoolDownTime(), interval);
|
||||
_changeCoolDownTimeTask = ThreadPool.schedule(new ChangeCoolDownTime(), interval);
|
||||
|
||||
if (_changeAttackTimeTask != null)
|
||||
{
|
||||
@@ -1967,7 +1967,7 @@ public class FourSepulchersManager extends GrandBossManager
|
||||
}
|
||||
|
||||
final long interval = time.getTimeInMillis() - Calendar.getInstance().getTimeInMillis();
|
||||
_changeEntryTimeTask = ThreadPoolManager.schedule(new ChangeEntryTime(), interval);
|
||||
_changeEntryTimeTask = ThreadPool.schedule(new ChangeEntryTime(), interval);
|
||||
|
||||
if (_changeCoolDownTimeTask != null)
|
||||
{
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -69,7 +69,7 @@ public class ItemsOnGroundManager
|
||||
|
||||
if (Config.SAVE_DROPPED_ITEM_INTERVAL > 0)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(new StoreInDb(), Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
|
||||
ThreadPool.scheduleAtFixedRate(new StoreInDb(), Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class ItemsOnGroundManager
|
||||
return;
|
||||
}
|
||||
|
||||
ThreadPoolManager.execute(new StoreInDb());
|
||||
ThreadPool.execute(new StoreInDb());
|
||||
}
|
||||
|
||||
public void cleanUp()
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.handler.AutoChatHandler;
|
||||
@@ -894,7 +894,7 @@ public class MercTicketManager
|
||||
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> npc.deleteMe(), despawnDelay);
|
||||
ThreadPool.schedule(() -> npc.deleteMe(), despawnDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.GmListTable;
|
||||
@@ -201,7 +201,7 @@ public class RaidBossSpawnManager
|
||||
info.set("respawnTime", respawnTime);
|
||||
|
||||
ScheduledFuture<?> futureSpawn;
|
||||
futureSpawn = ThreadPoolManager.schedule(new SpawnSchedule(boss.getNpcId()), respawn_delay);
|
||||
futureSpawn = ThreadPool.schedule(new SpawnSchedule(boss.getNpcId()), respawn_delay);
|
||||
|
||||
_schedules.put(boss.getNpcId(), futureSpawn);
|
||||
|
||||
@@ -274,7 +274,7 @@ public class RaidBossSpawnManager
|
||||
ScheduledFuture<?> futureSpawn;
|
||||
final long spawnTime = respawnTime - Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
futureSpawn = ThreadPoolManager.schedule(new SpawnSchedule(bossId), spawnTime);
|
||||
futureSpawn = ThreadPool.schedule(new SpawnSchedule(bossId), spawnTime);
|
||||
|
||||
_schedules.put(bossId, futureSpawn);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Point3D;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
@@ -341,7 +341,7 @@ public class CursedWeapon
|
||||
}
|
||||
else
|
||||
{
|
||||
_removeTask = ThreadPoolManager.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ public class CursedWeapon
|
||||
// Start the Life Task
|
||||
_endTime = System.currentTimeMillis() + (_duration * 60000L);
|
||||
|
||||
_removeTask = ThreadPoolManager.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
|
||||
@@ -105,6 +105,6 @@ public class DropProtection implements Runnable
|
||||
throw new NullPointerException("Trying to protect dropped item to null owner");
|
||||
}
|
||||
|
||||
_task = ThreadPoolManager.schedule(this, PROTECTED_MILLIS_TIME);
|
||||
_task = ThreadPool.schedule(this, PROTECTED_MILLIS_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.model.L2Skill.SkillType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -247,7 +247,7 @@ public abstract class L2Effect
|
||||
final int duration = _period - _periodfirsttime;
|
||||
// LOGGER.warning("Period: "+_period+"-"+_periodfirsttime+"="+duration);
|
||||
_currentTask = new EffectTask(duration * 1000, -1);
|
||||
_currentFuture = ThreadPoolManager.schedule(_currentTask, duration * 1000);
|
||||
_currentFuture = ThreadPool.schedule(_currentTask, duration * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ public abstract class L2Effect
|
||||
{
|
||||
stopEffectTask();
|
||||
_currentTask = new EffectTask(duration, -1);
|
||||
_currentFuture = ThreadPoolManager.schedule(_currentTask, duration);
|
||||
_currentFuture = ThreadPool.schedule(_currentTask, duration);
|
||||
|
||||
if (_state == EffectState.ACTING)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ public abstract class L2Effect
|
||||
{
|
||||
stopEffectTask();
|
||||
_currentTask = new EffectTask(delay, rate);
|
||||
_currentFuture = ThreadPoolManager.scheduleAtFixedRate(_currentTask, delay, rate);
|
||||
_currentFuture = ThreadPool.scheduleAtFixedRate(_currentTask, delay, rate);
|
||||
|
||||
if (_state == EffectState.ACTING)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.FishingChampionshipManager;
|
||||
@@ -113,7 +113,7 @@ public class L2Fishing implements Runnable
|
||||
|
||||
if (_fishAiTask == null)
|
||||
{
|
||||
_fishAiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
|
||||
_fishAiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.NoSuchElementException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
@@ -395,7 +395,7 @@ public class L2Party
|
||||
// activate position task
|
||||
if (_positionBroadcastTask == null)
|
||||
{
|
||||
_positionBroadcastTask = ThreadPoolManager.scheduleAtFixedRate(new PositionBroadcast(), PARTY_POSITION_BROADCAST / 2, PARTY_POSITION_BROADCAST);
|
||||
_positionBroadcastTask = ThreadPool.scheduleAtFixedRate(new PositionBroadcast(), PARTY_POSITION_BROADCAST / 2, PARTY_POSITION_BROADCAST);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
|
||||
/**
|
||||
@@ -189,7 +189,7 @@ public class L2Potion extends L2Object
|
||||
|
||||
private void startPotionMpRegeneration(L2Character activeChar)
|
||||
{
|
||||
_potionmpRegTask = ThreadPoolManager.scheduleAtFixedRate(new PotionMpHealing(activeChar), 1000, _milliseconds);
|
||||
_potionmpRegTask = ThreadPool.scheduleAtFixedRate(new PotionMpHealing(activeChar), 1000, _milliseconds);
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.RadarControl;
|
||||
|
||||
@@ -127,7 +127,7 @@ public final class L2Radar
|
||||
return;
|
||||
}
|
||||
_me.sendPacket(new RadarControl(0, 1, _myTarget.getX(), _myTarget.getY(), _myTarget.getZ()));
|
||||
ThreadPoolManager.schedule(new RadarOnPlayer(_myTarget, _me), 15000);
|
||||
ThreadPool.schedule(new RadarOnPlayer(_myTarget, _me), 15000);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
@@ -128,7 +128,7 @@ public class L2Request
|
||||
_isRequestor = isRequestor ? true : false;
|
||||
_isAnswerer = isRequestor ? false : true;
|
||||
|
||||
ThreadPoolManager.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
|
||||
ThreadPool.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.object.L2ObjectSet;
|
||||
import com.l2jmobius.gameserver.ai.L2AttackableAI;
|
||||
import com.l2jmobius.gameserver.ai.L2FortSiegeGuardAI;
|
||||
@@ -350,7 +350,7 @@ public final class L2WorldRegion
|
||||
}
|
||||
|
||||
// then, set a timer to activate the neighbors
|
||||
_neighborsTask = ThreadPoolManager.schedule(new NeighborsTask(true), 1000 * Config.GRID_NEIGHBOR_TURNON_TIME);
|
||||
_neighborsTask = ThreadPool.schedule(new NeighborsTask(true), 1000 * Config.GRID_NEIGHBOR_TURNON_TIME);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -367,7 +367,7 @@ public final class L2WorldRegion
|
||||
|
||||
// start a timer to "suggest" a deactivate to self and neighbors.
|
||||
// suggest means: first check if a neighbor has L2PcInstances in it. If not, deactivate.
|
||||
_neighborsTask = ThreadPoolManager.schedule(new NeighborsTask(false), 1000 * Config.GRID_NEIGHBOR_TURNOFF_TIME);
|
||||
_neighborsTask = ThreadPool.schedule(new NeighborsTask(false), 1000 * Config.GRID_NEIGHBOR_TURNOFF_TIME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
@@ -472,7 +472,7 @@ public class L2Attackable extends L2NpcInstance
|
||||
{
|
||||
_commandChannelTimer = new CommandChannelTimer(this);
|
||||
_commandChannelLastAttack = System.currentTimeMillis();
|
||||
ThreadPoolManager.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
_firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
}
|
||||
}
|
||||
@@ -3401,7 +3401,7 @@ public class L2Attackable extends L2NpcInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 10000); // 10sec
|
||||
ThreadPool.schedule(this, 10000); // 10sec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+23
-23
@@ -29,7 +29,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Point3D;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
@@ -1186,7 +1186,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
if (getCurrentMp() < mpConsume)
|
||||
{
|
||||
// If L2PcInstance doesn't have enough MP, stop the attack
|
||||
ThreadPoolManager.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
|
||||
sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP));
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
@@ -1201,7 +1201,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
else
|
||||
{
|
||||
// Cancel the action because the bow can't be re-use at this moment
|
||||
ThreadPoolManager.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@@ -1392,7 +1392,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Notify AI with EVT_READY_TO_ACT
|
||||
ThreadPoolManager.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1455,7 +1455,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority
|
||||
ThreadPoolManager.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk);
|
||||
ThreadPool.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk);
|
||||
|
||||
// Calculate and set the disable delay of the bow in function of the Attack Speed
|
||||
_disableBowAttackEndTime = ((sAtk + reuse) / GameTimeController.MILLIS_IN_TICK) + GameTimeController.getGameTicks();
|
||||
@@ -1526,10 +1526,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority for hit 1
|
||||
ThreadPoolManager.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk / 2);
|
||||
ThreadPool.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk / 2);
|
||||
|
||||
// Create a new hit task with Medium priority for hit 2 with a higher delay
|
||||
ThreadPoolManager.schedule(new HitTask(target, damage2, crit2, miss2, attack.soulshot, shld2), sAtk);
|
||||
ThreadPool.schedule(new HitTask(target, damage2, crit2, miss2, attack.soulshot, shld2), sAtk);
|
||||
|
||||
// Add those hits to the Server-Client packet Attack
|
||||
attack.addHit(target, damage1, miss1, crit1, shld1);
|
||||
@@ -1690,7 +1690,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority
|
||||
ThreadPoolManager.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk);
|
||||
ThreadPool.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk);
|
||||
|
||||
// Add this hit to the Server-Client packet Attack
|
||||
attack.addHit(target, damage1, miss1, crit1, shld1);
|
||||
@@ -2128,20 +2128,20 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
{
|
||||
if (skill.isPotion())
|
||||
{
|
||||
_potionCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 2), hitTime);
|
||||
_potionCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 2), hitTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 2), hitTime);
|
||||
_skillCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 2), hitTime);
|
||||
}
|
||||
}
|
||||
else if (skill.isPotion())
|
||||
{
|
||||
_potionCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 1), hitTime - 200);
|
||||
_potionCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 1), hitTime - 200);
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 1), hitTime - 200);
|
||||
_skillCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 1), hitTime - 200);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6155,7 +6155,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
|
||||
if (updateKnownObjects)
|
||||
{
|
||||
ThreadPoolManager.execute(new KnownListAsynchronousUpdateTask(this));
|
||||
ThreadPool.execute(new KnownListAsynchronousUpdateTask(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6592,7 +6592,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
// Create a task to notify the AI that L2Character arrives at a check point of the movement
|
||||
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
|
||||
{
|
||||
ThreadPoolManager.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
@@ -6675,7 +6675,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
// Create a task to notify the AI that L2Character arrives at a check point of the movement
|
||||
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
|
||||
{
|
||||
ThreadPoolManager.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
|
||||
@@ -8504,11 +8504,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
else if (skill.isPotion())
|
||||
{
|
||||
_potionCast = ThreadPoolManager.schedule(new MagicUseTask(final_targets, skill, coolTime, 2), 200);
|
||||
_potionCast = ThreadPool.schedule(new MagicUseTask(final_targets, skill, coolTime, 2), 200);
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(new MagicUseTask(final_targets, skill, coolTime, 2), 200);
|
||||
_skillCast = ThreadPool.schedule(new MagicUseTask(final_targets, skill, coolTime, 2), 200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8685,11 +8685,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
else if (skill.isPotion())
|
||||
{
|
||||
_potionCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 3), coolTime);
|
||||
_potionCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 3), coolTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(new MagicUseTask(targets, skill, coolTime, 3), coolTime);
|
||||
_skillCast = ThreadPool.schedule(new MagicUseTask(targets, skill, coolTime, 3), coolTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8798,7 +8798,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
|
||||
// DON'T USE : Recursive call to useMagic() method
|
||||
// currPlayer.useMagic(queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed());
|
||||
ThreadPoolManager.execute(new QueuedMagicUseTask(currPlayer, queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed()));
|
||||
ThreadPool.execute(new QueuedMagicUseTask(currPlayer, queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed()));
|
||||
}
|
||||
|
||||
final L2Weapon activeWeapon = getActiveWeaponItem();
|
||||
@@ -8924,7 +8924,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
|
||||
if (delay > 10)
|
||||
{
|
||||
ThreadPoolManager.schedule(new EnableSkill(skill), delay);
|
||||
ThreadPool.schedule(new EnableSkill(skill), delay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9318,7 +9318,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
{
|
||||
hitTime = (int) (0.70 * hitTime);
|
||||
}
|
||||
ThreadPoolManager.schedule(new notifyAiTaskDelayed(CtrlEvent.EVT_ATTACKED, this, target), hitTime);
|
||||
ThreadPool.schedule(new notifyAiTaskDelayed(CtrlEvent.EVT_ATTACKED, this, target), hitTime);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -9730,7 +9730,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
{
|
||||
updatePvPFlag(1);
|
||||
|
||||
_PvPRegTask = ThreadPoolManager.scheduleAtFixedRate(new PvPFlag(), 1000, 1000);
|
||||
_PvPRegTask = ThreadPool.scheduleAtFixedRate(new PvPFlag(), 1000, 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -83,7 +83,7 @@ public final class L2BabyPetInstance extends L2PetInstance
|
||||
}
|
||||
|
||||
// start the healing task
|
||||
_healingTask = ThreadPoolManager.scheduleAtFixedRate(new Heal(this), 0, 1000);
|
||||
_healingTask = ThreadPool.scheduleAtFixedRate(new Heal(this), 0, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public final class L2BabyPetInstance extends L2PetInstance
|
||||
super.doRevive();
|
||||
if (_healingTask == null)
|
||||
{
|
||||
_healingTask = ThreadPoolManager.scheduleAtFixedRate(new Heal(this), 0, 1000);
|
||||
_healingTask = ThreadPool.scheduleAtFixedRate(new Heal(this), 0, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -28,7 +28,7 @@ import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.knownlist.BoatKnownList;
|
||||
@@ -347,21 +347,21 @@ public class L2BoatInstance extends L2Character
|
||||
{
|
||||
_boat.say(5);
|
||||
bc = new BoatCaptain(2, _boat);
|
||||
ThreadPoolManager.schedule(bc, 240000);
|
||||
ThreadPool.schedule(bc, 240000);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
_boat.say(1);
|
||||
bc = new BoatCaptain(3, _boat);
|
||||
ThreadPoolManager.schedule(bc, 40000);
|
||||
ThreadPool.schedule(bc, 40000);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
_boat.say(0);
|
||||
bc = new BoatCaptain(4, _boat);
|
||||
ThreadPoolManager.schedule(bc, 20000);
|
||||
ThreadPool.schedule(bc, 20000);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
@@ -402,14 +402,14 @@ public class L2BoatInstance extends L2Character
|
||||
{
|
||||
_state++;
|
||||
Boatrun bc = new Boatrun(_state, _boat);
|
||||
ThreadPoolManager.schedule(bc, time);
|
||||
ThreadPool.schedule(bc, time);
|
||||
}
|
||||
else if (time == 0)
|
||||
{
|
||||
_boat._cycle = 2;
|
||||
_boat.say(10);
|
||||
BoatCaptain bc = new BoatCaptain(1, _boat);
|
||||
ThreadPoolManager.schedule(bc, 300000);
|
||||
ThreadPool.schedule(bc, 300000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -425,14 +425,14 @@ public class L2BoatInstance extends L2Character
|
||||
{
|
||||
_state++;
|
||||
Boatrun bc = new Boatrun(_state, _boat);
|
||||
ThreadPoolManager.schedule(bc, time);
|
||||
ThreadPool.schedule(bc, time);
|
||||
}
|
||||
else if (time == 0)
|
||||
{
|
||||
_boat._cycle = 1;
|
||||
_boat.say(10);
|
||||
BoatCaptain bc = new BoatCaptain(1, _boat);
|
||||
ThreadPoolManager.schedule(bc, 300000);
|
||||
ThreadPool.schedule(bc, 300000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -452,7 +452,7 @@ public class L2BoatInstance extends L2Character
|
||||
{
|
||||
// _runstate++;
|
||||
Boatrun bc = new Boatrun(_runstate, this);
|
||||
ThreadPoolManager.schedule(bc, 10);
|
||||
ThreadPool.schedule(bc, 10);
|
||||
_runstate = 0;
|
||||
}
|
||||
}
|
||||
@@ -477,7 +477,7 @@ public class L2BoatInstance extends L2Character
|
||||
{
|
||||
say(10);
|
||||
BoatCaptain bc = new BoatCaptain(1, this);
|
||||
ThreadPoolManager.schedule(bc, 300000);
|
||||
ThreadPool.schedule(bc, 300000);
|
||||
}
|
||||
|
||||
private int lastx = -1;
|
||||
@@ -559,7 +559,7 @@ public class L2BoatInstance extends L2Character
|
||||
}
|
||||
}
|
||||
Boatrun bc = new Boatrun(0, this);
|
||||
ThreadPoolManager.schedule(bc, 0);
|
||||
ThreadPool.schedule(bc, 0);
|
||||
}
|
||||
else if (_cycle == 2)
|
||||
{
|
||||
@@ -596,7 +596,7 @@ public class L2BoatInstance extends L2Character
|
||||
}
|
||||
}
|
||||
Boatrun bc = new Boatrun(0, this);
|
||||
ThreadPoolManager.schedule(bc, 0);
|
||||
ThreadPool.schedule(bc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -187,7 +187,7 @@ public class L2CabaleBufferInstance extends L2NpcInstance
|
||||
_aiTask.cancel(true);
|
||||
}
|
||||
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(new CabalaAI(this), 3000, 3000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(new CabalaAI(this), 3000, 3000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate;
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class L2CastleTeleporterInstance extends L2NpcInstance
|
||||
}
|
||||
|
||||
setTask(true);
|
||||
ThreadPoolManager.schedule(new oustAllPlayers(), delay);
|
||||
ThreadPool.schedule(new oustAllPlayers(), delay);
|
||||
}
|
||||
|
||||
final String filename = "data/html/castleteleporter/MassGK-1.htm";
|
||||
|
||||
+4
-4
@@ -22,7 +22,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -303,7 +303,7 @@ public class L2CubicInstance
|
||||
break;
|
||||
}
|
||||
}
|
||||
_disappearTask = ThreadPoolManager.schedule(new Disappear(), totallifetime); // disappear
|
||||
_disappearTask = ThreadPool.schedule(new Disappear(), totallifetime); // disappear
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -333,12 +333,12 @@ public class L2CubicInstance
|
||||
case SMART_CUBIC_EVATEMPLAR:
|
||||
case SMART_CUBIC_SHILLIENTEMPLAR:
|
||||
{
|
||||
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new Action(_activationchance), 0, _activationtime);
|
||||
_actionTask = ThreadPool.scheduleAtFixedRate(new Action(_activationchance), 0, _activationtime);
|
||||
break;
|
||||
}
|
||||
case LIFE_CUBIC:
|
||||
{
|
||||
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new Heal(), 0, _activationtime);
|
||||
_actionTask = ThreadPool.scheduleAtFixedRate(new Heal(), 0, _activationtime);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2CharacterAI;
|
||||
import com.l2jmobius.gameserver.ai.L2DoorAI;
|
||||
@@ -411,7 +411,7 @@ public class L2DoorInstance extends L2Character
|
||||
if (actionDelay > -1)
|
||||
{
|
||||
AutoOpenClose ao = new AutoOpenClose();
|
||||
ThreadPoolManager.scheduleAtFixedRate(ao, actionDelay, actionDelay);
|
||||
ThreadPool.scheduleAtFixedRate(ao, actionDelay, actionDelay);
|
||||
}
|
||||
else if (_autoActionTask != null)
|
||||
{
|
||||
@@ -870,7 +870,7 @@ public class L2DoorInstance extends L2Character
|
||||
*/
|
||||
public void onOpen()
|
||||
{
|
||||
ThreadPoolManager.schedule(new CloseTask(), 60000);
|
||||
ThreadPool.schedule(new CloseTask(), 60000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossPointsManager;
|
||||
@@ -104,7 +104,7 @@ public final class L2GrandBossInstance extends L2MonsterInstance
|
||||
protected void manageMinions()
|
||||
{
|
||||
_minionList.spawnMinions();
|
||||
_minionMaintainTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_minionMaintainTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
// Teleport raid boss home if it's too far from home location
|
||||
final L2Spawn bossSpawn = getSpawn();
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2AttackableAI;
|
||||
@@ -93,7 +93,7 @@ public final class L2GuardInstance extends L2Attackable
|
||||
super(objectId, template);
|
||||
getKnownList(); // init knownlist
|
||||
|
||||
ThreadPoolManager.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.nextInt(60000));
|
||||
ThreadPool.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.nextInt(60000));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2AttackableAI;
|
||||
@@ -91,7 +91,7 @@ public final class L2GuardNoHTMLInstance extends L2Attackable
|
||||
{
|
||||
super(objectId, template);
|
||||
getKnownList(); // init knownlist
|
||||
ThreadPoolManager.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.nextInt(60000));
|
||||
ThreadPool.scheduleAtFixedRate(new ReturnTask(), RETURN_INTERVAL, RETURN_INTERVAL + Rnd.nextInt(60000));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
@@ -1033,7 +1033,7 @@ public final class L2ItemInstance extends L2Object
|
||||
private void scheduleConsumeManaTask()
|
||||
{
|
||||
_consumingMana = true;
|
||||
ThreadPoolManager.schedule(new ScheduleConsumeManaTask(this), MANA_CONSUMPTION_RATE);
|
||||
ThreadPool.schedule(new ScheduleConsumeManaTask(this), MANA_CONSUMPTION_RATE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -90,7 +90,7 @@ public class L2MonsterInstance extends L2Attackable
|
||||
*/
|
||||
public void returnHome()
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
L2Spawn mobSpawn = getSpawn();
|
||||
if (!isInCombat() && !isAlikeDead() && !isDead() && (mobSpawn != null) && !isInsideRadius(mobSpawn.getX(), mobSpawn.getY(), Config.MAX_DRIFT_RANGE, false))
|
||||
@@ -183,7 +183,7 @@ public class L2MonsterInstance extends L2Attackable
|
||||
*/
|
||||
protected void manageMinions()
|
||||
{
|
||||
_minionMaintainTask = ThreadPoolManager.schedule(() -> _minionList.spawnMinions(), getMaintenanceInterval());
|
||||
_minionMaintainTask = ThreadPool.schedule(() -> _minionList.spawnMinions(), getMaintenanceInterval());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
@@ -249,7 +249,7 @@ public class L2NpcInstance extends L2Character
|
||||
|
||||
// Create a RandomAnimation Task that will be launched after the calculated delay
|
||||
_rAniTask = new RandomAnimationTask();
|
||||
ThreadPoolManager.schedule(_rAniTask, interval);
|
||||
ThreadPool.schedule(_rAniTask, interval);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+24
-24
@@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.crypt.nProtect;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Point3D;
|
||||
@@ -4231,7 +4231,7 @@ public final class L2PcInstance extends L2Playable
|
||||
return;
|
||||
}
|
||||
|
||||
ThreadPoolManager.execute(launchedMovingTask);
|
||||
ThreadPool.execute(launchedMovingTask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4322,7 +4322,7 @@ public final class L2PcInstance extends L2Playable
|
||||
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_SITTING));
|
||||
sittingTaskLaunched = true;
|
||||
// Schedule a sit down task to wait for the animation to finish
|
||||
ThreadPoolManager.schedule(new SitDownTask(this), 2500);
|
||||
ThreadPool.schedule(new SitDownTask(this), 2500);
|
||||
setIsParalyzed(true);
|
||||
}
|
||||
}
|
||||
@@ -4406,7 +4406,7 @@ public final class L2PcInstance extends L2Playable
|
||||
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_STANDING));
|
||||
// Schedule a stand up task to wait for the animation to finish
|
||||
setIsImobilised(true);
|
||||
ThreadPoolManager.schedule(new StandUpTask(this), 2000);
|
||||
ThreadPool.schedule(new StandUpTask(this), 2000);
|
||||
stopFakeDeath(null);
|
||||
}
|
||||
|
||||
@@ -4442,7 +4442,7 @@ public final class L2PcInstance extends L2Playable
|
||||
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_STANDING));
|
||||
// Schedule a stand up task to wait for the animation to finish
|
||||
setIsImobilised(true);
|
||||
ThreadPoolManager.schedule(new StandUpTask(this), 2500);
|
||||
ThreadPool.schedule(new StandUpTask(this), 2500);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4890,7 +4890,7 @@ public final class L2PcInstance extends L2Playable
|
||||
else
|
||||
{
|
||||
_herbstask += 100;
|
||||
ThreadPoolManager.schedule(new HerbTask(process, itemId, count, reference, sendMessage), _herbstask);
|
||||
ThreadPool.schedule(new HerbTask(process, itemId, count, reference, sendMessage), _herbstask);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5612,7 +5612,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (protect)
|
||||
{
|
||||
ThreadPoolManager.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
|
||||
ThreadPool.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5631,7 +5631,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (protect)
|
||||
{
|
||||
ThreadPoolManager.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_TELEPORT_PROTECTION - 1) * 1000);
|
||||
ThreadPool.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_TELEPORT_PROTECTION - 1) * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7392,7 +7392,7 @@ public final class L2PcInstance extends L2Playable
|
||||
pk.sendMessage("You are a teamkiller !!! Teamkills not counting.");
|
||||
}
|
||||
sendMessage("You will be revived and teleported to team spot in " + (Config.TVT_REVIVE_DELAY / 1000) + " seconds!");
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
teleToLocation((TvT._teamsX.get(TvT._teams.indexOf(_teamNameTvT)) + Rnd.get(201)) - 100, (TvT._teamsY.get(TvT._teams.indexOf(_teamNameTvT)) + Rnd.get(201)) - 100, TvT._teamsZ.get(TvT._teams.indexOf(_teamNameTvT)), false);
|
||||
doRevive();
|
||||
@@ -7404,7 +7404,7 @@ public final class L2PcInstance extends L2Playable
|
||||
if (TvT.is_teleport() || TvT.is_started())
|
||||
{
|
||||
sendMessage("You will be revived and teleported to team spot in " + (Config.TVT_REVIVE_DELAY / 1000) + " seconds!");
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
teleToLocation(TvT._teamsX.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsY.get(TvT._teams.indexOf(_teamNameTvT)), TvT._teamsZ.get(TvT._teams.indexOf(_teamNameTvT)), false);
|
||||
doRevive();
|
||||
@@ -7421,7 +7421,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
removeCTFFlagOnDie();
|
||||
}
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
teleToLocation(CTF._teamsX.get(CTF._teams.indexOf(_teamNameCTF)), CTF._teamsY.get(CTF._teams.indexOf(_teamNameCTF)), CTF._teamsZ.get(CTF._teams.indexOf(_teamNameCTF)), false);
|
||||
doRevive();
|
||||
@@ -7448,7 +7448,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
sendMessage("You will be revived and teleported to spot in 20 seconds!");
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
final Location p_loc = DM.get_playersSpawnLocation();
|
||||
teleToLocation(p_loc._x, p_loc._y, p_loc._z, false);
|
||||
@@ -7461,7 +7461,7 @@ public final class L2PcInstance extends L2Playable
|
||||
if (DM.is_teleport() || DM.is_started())
|
||||
{
|
||||
sendMessage("You will be revived and teleported to spot in 20 seconds!");
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
final Location players_loc = DM.get_playersSpawnLocation();
|
||||
teleToLocation(players_loc._x, players_loc._y, players_loc._z, false);
|
||||
@@ -7485,7 +7485,7 @@ public final class L2PcInstance extends L2Playable
|
||||
else
|
||||
{
|
||||
sendMessage("You will be revived and teleported to team spot in 20 seconds!");
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
doRevive();
|
||||
if (_isVIP)
|
||||
@@ -12759,7 +12759,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
_inventoryDisable = true;
|
||||
|
||||
ThreadPoolManager.schedule(new InventoryEnable(), 1500);
|
||||
ThreadPool.schedule(new InventoryEnable(), 1500);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13093,7 +13093,7 @@ public final class L2PcInstance extends L2Playable
|
||||
*/
|
||||
public void rechargeAutoSoulShot(boolean physical, boolean magic, boolean summon, int atkTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> rechargeAutoSoulShot(physical, magic, summon), atkTime);
|
||||
ThreadPool.schedule(() -> rechargeAutoSoulShot(physical, magic, summon), atkTime);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -14868,7 +14868,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskWarnUserTakeBreak == null)
|
||||
{
|
||||
_taskWarnUserTakeBreak = ThreadPoolManager.scheduleAtFixedRate(new WarnUserTakeBreak(), 7200000, 7200000);
|
||||
_taskWarnUserTakeBreak = ThreadPool.scheduleAtFixedRate(new WarnUserTakeBreak(), 7200000, 7200000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14904,7 +14904,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskRentPet == null)
|
||||
{
|
||||
_taskRentPet = ThreadPoolManager.scheduleAtFixedRate(new RentPetTask(), seconds * 1000L, seconds * 1000L);
|
||||
_taskRentPet = ThreadPool.scheduleAtFixedRate(new RentPetTask(), seconds * 1000L, seconds * 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14948,7 +14948,7 @@ public final class L2PcInstance extends L2Playable
|
||||
final int timeinwater = 86000;
|
||||
|
||||
sendPacket(new SetupGauge(2, timeinwater));
|
||||
_taskWater = ThreadPoolManager.scheduleAtFixedRate(new WaterTask(), timeinwater, 1000);
|
||||
_taskWater = ThreadPool.scheduleAtFixedRate(new WaterTask(), timeinwater, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16415,7 +16415,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_shortBuffTask.cancel(false);
|
||||
_shortBuffTask = null;
|
||||
}
|
||||
_shortBuffTask = ThreadPoolManager.schedule(new ShortBuffTask(this), 15000);
|
||||
_shortBuffTask = ThreadPool.schedule(new ShortBuffTask(this), 15000);
|
||||
|
||||
sendPacket(new ShortBuffStatusUpdate(magicId, level, time));
|
||||
}
|
||||
@@ -16617,7 +16617,7 @@ public final class L2PcInstance extends L2Playable
|
||||
checkDelay = Math.round((float) (_fish.getGutsCheckTime() * 0.66));
|
||||
}
|
||||
}
|
||||
_taskforfish = ThreadPoolManager.scheduleAtFixedRate(new LookingForFishTask(_fish.getWaitTime(), _fish.getFishGuts(), _fish.getType(), isNoob, isUpperGrade), 10000, checkDelay);
|
||||
_taskforfish = ThreadPool.scheduleAtFixedRate(new LookingForFishTask(_fish.getWaitTime(), _fish.getFishGuts(), _fish.getType(), isNoob, isUpperGrade), 10000, checkDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18781,7 +18781,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
// start the countdown
|
||||
final int minutes = (int) (delayInMilliseconds / 60000);
|
||||
_punishTask = ThreadPoolManager.schedule(new PunishTask(this), _punishTimer);
|
||||
_punishTask = ThreadPool.schedule(new PunishTask(this), _punishTimer);
|
||||
sendMessage("You are chat banned for " + minutes + " minutes.");
|
||||
}
|
||||
else
|
||||
@@ -18803,7 +18803,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_punishTimer = delayInMilliseconds; // Delay in milliseconds
|
||||
|
||||
// start the countdown
|
||||
_punishTask = ThreadPoolManager.schedule(new PunishTask(this), _punishTimer);
|
||||
_punishTask = ThreadPool.schedule(new PunishTask(this), _punishTimer);
|
||||
sendMessage("You are in jail for " + (delayInMilliseconds / 60000) + " minutes.");
|
||||
}
|
||||
|
||||
@@ -18897,7 +18897,7 @@ public final class L2PcInstance extends L2Playable
|
||||
// If punish timer exists, restart punishtask.
|
||||
if (_punishTimer > 0)
|
||||
{
|
||||
_punishTask = ThreadPoolManager.schedule(new PunishTask(this), _punishTimer);
|
||||
_punishTask = ThreadPool.schedule(new PunishTask(this), _punishTimer);
|
||||
sendMessage("You are still " + getPunishLevel().string() + " for " + (_punishTimer / 60000) + " minutes.");
|
||||
}
|
||||
if (getPunishLevel() == PunishLevel.JAIL)
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.sql.L2PetDataTable;
|
||||
@@ -1121,7 +1121,7 @@ public class L2PetInstance extends L2Summon
|
||||
_feedTime = 1;
|
||||
}
|
||||
|
||||
_feedTask = ThreadPoolManager.scheduleAtFixedRate(new FeedTask(), 60000 / _feedTime, 60000 / _feedTime);
|
||||
_feedTask = ThreadPool.scheduleAtFixedRate(new FeedTask(), 60000 / _feedTime, 60000 / _feedTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -128,7 +128,7 @@ public class L2ProtectorInstance extends L2NpcInstance
|
||||
_aiTask.cancel(true);
|
||||
}
|
||||
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(new ProtectorAI(this), 3000, 3000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(new ProtectorAI(this), 3000, 3000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+23
-23
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.knownlist.RaceManagerKnownList;
|
||||
import com.l2jmobius.gameserver.model.entity.MonsterRace;
|
||||
@@ -96,26 +96,26 @@ public class L2RaceManagerInstance extends L2NpcInstance
|
||||
// _history = new ArrayList<Race>();
|
||||
_managers = new ArrayList<>();
|
||||
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_AVAILABLE_FOR_S1_RACE), 0, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_NOW_AVAILABLE_FOR_S1_RACE), 30 * SECOND, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_AVAILABLE_FOR_S1_RACE), MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_NOW_AVAILABLE_FOR_S1_RACE), MINUTE + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 2 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 3 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 4 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 5 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 6 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKET_SALES_CLOSED), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_MINUTES), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_MINUTES), 8 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_30_SECONDS), (8 * MINUTE) + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_COUNTDOWN_IN_FIVE_SECONDS), (8 * MINUTE) + (50 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (55 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (56 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (57 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (58 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (59 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_RACE_START), 9 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_AVAILABLE_FOR_S1_RACE), 0, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_NOW_AVAILABLE_FOR_S1_RACE), 30 * SECOND, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_AVAILABLE_FOR_S1_RACE), MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_NOW_AVAILABLE_FOR_S1_RACE), MINUTE + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 2 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 3 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 4 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 5 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKETS_STOP_IN_S1_MINUTES), 6 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_TICKET_SALES_CLOSED), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_MINUTES), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_MINUTES), 8 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_30_SECONDS), (8 * MINUTE) + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_COUNTDOWN_IN_FIVE_SECONDS), (8 * MINUTE) + (50 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (55 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (56 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (57 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (58 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_BEGINS_IN_S1_SECONDS), (8 * MINUTE) + (59 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSRACE_RACE_START), 9 * MINUTE, 10 * MINUTE);
|
||||
}
|
||||
_managers.add(this);
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public class L2RaceManagerInstance extends L2NpcInstance
|
||||
_packet = new MonRaceInfo(_codes[1][0], _codes[1][1], race.getMonsters(), race.getSpeeds());
|
||||
sendMonsterInfo();
|
||||
|
||||
ThreadPoolManager.schedule(new RunRace(), 5000);
|
||||
ThreadPool.schedule(new RunRace(), 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -513,7 +513,7 @@ public class L2RaceManagerInstance extends L2NpcInstance
|
||||
{
|
||||
_packet = new MonRaceInfo(_codes[2][0], _codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds());
|
||||
sendMonsterInfo();
|
||||
ThreadPoolManager.schedule(new RunEnd(), 30000);
|
||||
ThreadPool.schedule(new RunEnd(), 30000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossPointsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
||||
@@ -132,7 +132,7 @@ public final class L2RaidBossInstance extends L2MonsterInstance
|
||||
protected void manageMinions()
|
||||
{
|
||||
_minionList.spawnMinions();
|
||||
_minionMaintainTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_minionMaintainTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
// teleport raid boss home if it's too far from home location
|
||||
L2Spawn bossSpawn = getSpawn();
|
||||
|
||||
+9
-9
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
@@ -65,12 +65,12 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_victimSpawnKeyBoxTask.cancel(true);
|
||||
}
|
||||
_victimSpawnKeyBoxTask = ThreadPoolManager.schedule(new VictimSpawnKeyBox(this), 300000);
|
||||
_victimSpawnKeyBoxTask = ThreadPool.schedule(new VictimSpawnKeyBox(this), 300000);
|
||||
if (_victimShout != null)
|
||||
{
|
||||
_victimShout.cancel(true);
|
||||
}
|
||||
_victimShout = ThreadPoolManager.schedule(new VictimShout(this), 5000);
|
||||
_victimShout = ThreadPool.schedule(new VictimShout(this), 5000);
|
||||
break;
|
||||
}
|
||||
case 18196:
|
||||
@@ -110,7 +110,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_changeImmortalTask.cancel(true);
|
||||
}
|
||||
_changeImmortalTask = ThreadPoolManager.schedule(new ChangeImmortal(this), 1600);
|
||||
_changeImmortalTask = ThreadPool.schedule(new ChangeImmortal(this), 1600);
|
||||
break;
|
||||
}
|
||||
case 18256:
|
||||
@@ -166,7 +166,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
break;
|
||||
}
|
||||
case 18150:
|
||||
@@ -192,7 +192,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
break;
|
||||
}
|
||||
case 18141:
|
||||
@@ -210,7 +210,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 8500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 8500);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
@@ -230,7 +230,7 @@ public class L2SepulcherNpcInstance extends L2NpcInstance
|
||||
{
|
||||
_spawnMonsterTask.cancel(true);
|
||||
}
|
||||
_spawnMonsterTask = ThreadPoolManager.schedule(new SpawnMonster(getNpcId()), 3500);
|
||||
_spawnMonsterTask = ThreadPool.schedule(new SpawnMonster(getNpcId()), 3500);
|
||||
break;
|
||||
}
|
||||
case 31455:
|
||||
@@ -383,12 +383,12 @@ public class L2SepulcherNpcInstance extends L2NpcInstance
|
||||
{
|
||||
_closeTask.cancel(true);
|
||||
}
|
||||
_closeTask = ThreadPoolManager.schedule(new CloseNextDoor(doorId), 10000);
|
||||
_closeTask = ThreadPool.schedule(new CloseNextDoor(doorId), 10000);
|
||||
if (_spawnNextMysteriousBoxTask != null)
|
||||
{
|
||||
_spawnNextMysteriousBoxTask.cancel(true);
|
||||
}
|
||||
_spawnNextMysteriousBoxTask = ThreadPoolManager.schedule(new SpawnNextMysteriousBox(npcId), 0);
|
||||
_spawnNextMysteriousBoxTask = ThreadPool.schedule(new SpawnNextMysteriousBox(npcId), 0);
|
||||
}
|
||||
|
||||
private class CloseNextDoor implements Runnable
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -102,7 +102,7 @@ public class L2SummonInstance extends L2Summon
|
||||
LOGGER.warning("L2SummonInstance: Task Delay " + (delay / 1000) + " seconds.");
|
||||
}
|
||||
|
||||
_summonLifeTask = ThreadPoolManager.scheduleAtFixedRate(new SummonLifetime(getOwner(), this), delay, delay);
|
||||
_summonLifeTask = ThreadPool.scheduleAtFixedRate(new SummonLifetime(getOwner(), this), delay, delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Point3D;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
@@ -199,7 +199,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance
|
||||
_durationCheckTask.cancel(true);
|
||||
}
|
||||
|
||||
_durationCheckTask = ThreadPoolManager.scheduleAtFixedRate(new CheckDuration(this), DURATION_CHECK_INTERVAL, DURATION_CHECK_INTERVAL);
|
||||
_durationCheckTask = ThreadPool.scheduleAtFixedRate(new CheckDuration(this), DURATION_CHECK_INTERVAL, DURATION_CHECK_INTERVAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance
|
||||
{
|
||||
_buffTask.cancel(true);
|
||||
}
|
||||
_buffTask = ThreadPoolManager.scheduleAtFixedRate(new CheckOwnerBuffs(this, totalBuffsAvailable), BUFF_INTERVAL, BUFF_INTERVAL);
|
||||
_buffTask = ThreadPool.scheduleAtFixedRate(new CheckOwnerBuffs(this, totalBuffsAvailable), BUFF_INTERVAL, BUFF_INTERVAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.model.actor.position.Location;
|
||||
@@ -37,7 +37,7 @@ public class L2TownPetInstance extends L2NpcInstance
|
||||
{
|
||||
super(objectId, template);
|
||||
|
||||
ThreadPoolManager.scheduleAtFixedRate(new RandomWalkTask(), 2000, 2000);
|
||||
ThreadPool.scheduleAtFixedRate(new RandomWalkTask(), 2000, 2000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -74,7 +74,7 @@ public class L2XmassTreeInstance extends L2NpcInstance
|
||||
public L2XmassTreeInstance(int objectId, L2NpcTemplate template)
|
||||
{
|
||||
super(objectId, template);
|
||||
_aiTask = ThreadPoolManager.scheduleAtFixedRate(new XmassAI(this), 3000, 3000);
|
||||
_aiTask = ThreadPool.scheduleAtFixedRate(new XmassAI(this), 3000, 3000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
@@ -358,7 +358,7 @@ public class CharStatus
|
||||
final int period = Formulas.getRegeneratePeriod(getActiveChar());
|
||||
|
||||
// Create the HP/MP/CP Regeneration task
|
||||
_regTask = ThreadPoolManager.scheduleAtFixedRate(new RegenTask(), period, period);
|
||||
_regTask = ThreadPool.scheduleAtFixedRate(new RegenTask(), period, period);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
@@ -355,7 +355,7 @@ public class Auction
|
||||
taskDelay = _endDate - currentTime;
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new AutoEndTask(), taskDelay);
|
||||
ThreadPool.schedule(new AutoEndTask(), taskDelay);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -613,7 +613,7 @@ public class Auction
|
||||
else
|
||||
{
|
||||
/** Task waiting ClanHallManager is loaded every 3s */
|
||||
ThreadPoolManager.schedule(new AutoEndTask(), 3000);
|
||||
ThreadPool.schedule(new AutoEndTask(), 3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
@@ -252,11 +252,11 @@ public class ClanHall
|
||||
|
||||
if (_endDate > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(), _endDate - currentTime);
|
||||
ThreadPool.schedule(new FunctionTask(), _endDate - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(), 0);
|
||||
ThreadPool.schedule(new FunctionTask(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class ClanHall
|
||||
LOGGER.warning("deducted " + fee + " adena from " + getName() + " owner's cwh for function id : " + getType());
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new FunctionTask(), getRate());
|
||||
ThreadPool.schedule(new FunctionTask(), getRate());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -862,22 +862,22 @@ public class ClanHall
|
||||
|
||||
if (_paidUntil > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), _paidUntil - currentTime);
|
||||
ThreadPool.schedule(new FeeTask(), _paidUntil - currentTime);
|
||||
}
|
||||
else if (!_paid && !forced)
|
||||
{
|
||||
if ((System.currentTimeMillis() + (1000 * 60 * 60 * 24)) <= (_paidUntil + _chRate))
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), System.currentTimeMillis() + (1000 * 60 * 60 * 24));
|
||||
ThreadPool.schedule(new FeeTask(), System.currentTimeMillis() + (1000 * 60 * 60 * 24));
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), (_paidUntil + _chRate) - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new FeeTask(), (_paidUntil + _chRate) - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), 0);
|
||||
ThreadPool.schedule(new FeeTask(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -919,7 +919,7 @@ public class ClanHall
|
||||
LOGGER.warning("deducted " + getLease() + " adena from " + getName() + " owner's cwh for ClanHall _paidUntil" + _paidUntil);
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new FeeTask(), _paidUntil - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new FeeTask(), _paidUntil - System.currentTimeMillis());
|
||||
_paid = true;
|
||||
updateDb();
|
||||
}
|
||||
@@ -936,7 +936,7 @@ public class ClanHall
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), 3000);
|
||||
ThreadPool.schedule(new FeeTask(), 3000);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -948,11 +948,11 @@ public class ClanHall
|
||||
|
||||
if ((System.currentTimeMillis() + (1000 * 60 * 60 * 24)) <= (_paidUntil + _chRate))
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), System.currentTimeMillis() + (1000 * 60 * 60 * 24));
|
||||
ThreadPool.schedule(new FeeTask(), System.currentTimeMillis() + (1000 * 60 * 60 * 24));
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), (_paidUntil + _chRate) - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new FeeTask(), (_paidUntil + _chRate) - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.OlympiadStadiaManager;
|
||||
@@ -163,7 +163,7 @@ public class Duel
|
||||
broadcastToTeam2(sm);
|
||||
}
|
||||
// Schedule duel start
|
||||
ThreadPoolManager.schedule(new ScheduleStartDuelTask(this), 3000);
|
||||
ThreadPool.schedule(new ScheduleStartDuelTask(this), 3000);
|
||||
}
|
||||
|
||||
// ===============================================================
|
||||
@@ -341,11 +341,11 @@ public class Duel
|
||||
{
|
||||
setFinished(true);
|
||||
playKneelAnimation();
|
||||
ThreadPoolManager.schedule(new ScheduleEndDuelTask(_duel, status), 5000);
|
||||
ThreadPool.schedule(new ScheduleEndDuelTask(_duel, status), 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 1000);
|
||||
ThreadPool.schedule(this, 1000);
|
||||
}
|
||||
}
|
||||
catch (Throwable t)
|
||||
@@ -408,11 +408,11 @@ public class Duel
|
||||
}
|
||||
|
||||
// give players 20 seconds to complete teleport and get ready (its ought to be 30 on offical..)
|
||||
ThreadPoolManager.schedule(this, 20000);
|
||||
ThreadPool.schedule(this, 20000);
|
||||
}
|
||||
else if (count > 0) // duel not started yet - continue countdown
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 1000);
|
||||
ThreadPool.schedule(this, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -624,7 +624,7 @@ public class Duel
|
||||
ps = null;
|
||||
|
||||
// start duelling task
|
||||
ThreadPoolManager.schedule(new ScheduleDuelTask(this), 1000);
|
||||
ThreadPool.schedule(new ScheduleDuelTask(this), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Vector;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -848,7 +848,7 @@ public class CTF implements EventTask
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||
|
||||
setUserData();
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
sit();
|
||||
afterTeleportOperations();
|
||||
@@ -1138,7 +1138,7 @@ public class CTF implements EventTask
|
||||
sit();
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
synchronized (_players)
|
||||
{
|
||||
@@ -1244,7 +1244,7 @@ public class CTF implements EventTask
|
||||
*/
|
||||
public static void autoEvent()
|
||||
{
|
||||
ThreadPoolManager.execute(new AutoEventTask());
|
||||
ThreadPool.execute(new AutoEventTask());
|
||||
}
|
||||
|
||||
// start without restart
|
||||
@@ -3343,7 +3343,7 @@ public class CTF implements EventTask
|
||||
player.sendPacket(new RadarControl(0, 1, hasFlag.getX(), hasFlag.getY(), hasFlag.getZ()));
|
||||
final L2Radar rdr = new L2Radar(player);
|
||||
final L2Radar.RadarOnPlayer radar = rdr.new RadarOnPlayer(hasFlag, player);
|
||||
ThreadPoolManager.schedule(radar, 10000 + Rnd.get(30000));
|
||||
ThreadPool.schedule(radar, 10000 + Rnd.get(30000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Vector;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -797,7 +797,7 @@ public class DM implements EventTask
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||
|
||||
setUserData();
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
sit();
|
||||
afterTeleportOperations();
|
||||
@@ -1063,7 +1063,7 @@ public class DM implements EventTask
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||
|
||||
removeUserData();
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
// final Vector<L2PcInstance> players = getPlayers();
|
||||
synchronized (_players)
|
||||
|
||||
+6
-6
@@ -24,7 +24,7 @@ import java.util.Calendar;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance;
|
||||
@@ -163,12 +163,12 @@ public class Lottery
|
||||
if (_enddate > System.currentTimeMillis())
|
||||
{
|
||||
_isStarted = true;
|
||||
ThreadPoolManager.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
|
||||
|
||||
if (_enddate > (System.currentTimeMillis() + (12 * MINUTE)))
|
||||
{
|
||||
_isSellingTickets = true;
|
||||
ThreadPoolManager.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
|
||||
ThreadPool.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
|
||||
}
|
||||
rset.close();
|
||||
statement.close();
|
||||
@@ -212,8 +212,8 @@ public class Lottery
|
||||
_enddate = finishtime.getTimeInMillis();
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
|
||||
ThreadPoolManager.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
|
||||
ThreadPool.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
@@ -460,7 +460,7 @@ public class Lottery
|
||||
LOGGER.warning("Lottery: Could not store finished lottery data: " + e);
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new startLottery(), MINUTE);
|
||||
ThreadPool.schedule(new startLottery(), MINUTE);
|
||||
_number++;
|
||||
|
||||
_isStarted = false;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Vector;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
@@ -799,7 +799,7 @@ public class TvT implements EventTask
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||
|
||||
setUserData();
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
sit();
|
||||
|
||||
@@ -1071,7 +1071,7 @@ public class TvT implements EventTask
|
||||
sit();
|
||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
synchronized (_players)
|
||||
{
|
||||
@@ -1177,7 +1177,7 @@ public class TvT implements EventTask
|
||||
*/
|
||||
public static void autoEvent()
|
||||
{
|
||||
ThreadPoolManager.execute(new AutoEventTask());
|
||||
ThreadPool.execute(new AutoEventTask());
|
||||
}
|
||||
|
||||
// start without restart
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Random;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||
@@ -335,7 +335,7 @@ public class VIP
|
||||
Announcements.getInstance().gameAnnounceToAll("Vip event has started.Use .vipjoin to join or .vipleave to leave.");
|
||||
spawnJoinNPC();
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
_joining = false;
|
||||
_started = true;
|
||||
@@ -348,7 +348,7 @@ public class VIP
|
||||
Announcements.getInstance().gameAnnounceToAll("Registration for the VIP event involving " + _teamName + " has ended.");
|
||||
Announcements.getInstance().gameAnnounceToAll("Players will be teleported to their locations in 20 seconds.");
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
teleportPlayers();
|
||||
chooseVIP();
|
||||
@@ -357,13 +357,13 @@ public class VIP
|
||||
Announcements.getInstance().gameAnnounceToAll("VIP event will start in 20 seconds.");
|
||||
spawnEndNPC();
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
Announcements.getInstance().gameAnnounceToAll("VIP event has started. " + _teamName + "'s VIP must get to the starter city and talk with " + getNPCName(_endNPC, null) + ". The opposing team must kill the VIP. All players except the VIP will respawn at their current locations.");
|
||||
Announcements.getInstance().gameAnnounceToAll("VIP event will end if the " + _teamName + " team makes it to their town or when " + (_time / 1000 / 60) + " mins have elapsed.");
|
||||
VIP.sit();
|
||||
|
||||
ThreadPoolManager.schedule(() -> endEventTime(), _time);
|
||||
ThreadPool.schedule(() -> endEventTime(), _time);
|
||||
}, 20000);
|
||||
}, 20000);
|
||||
}
|
||||
@@ -617,7 +617,7 @@ public class VIP
|
||||
{
|
||||
Announcements.getInstance().gameAnnounceToAll("Teleporting VIP players back to the Registration area in 20 seconds.");
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
for (L2PcInstance player1 : _playersVIP)
|
||||
{
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import java.util.Iterator;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
|
||||
/**
|
||||
* @author Shyla
|
||||
@@ -41,7 +41,7 @@ public class EventsGlobalTask implements Runnable
|
||||
|
||||
private EventsGlobalTask()
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
}
|
||||
|
||||
public static EventsGlobalTask getInstance()
|
||||
@@ -238,7 +238,7 @@ public class EventsGlobalTask implements Runnable
|
||||
{
|
||||
for (EventTask actualEvent : registeredEventsAtCurrentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(actualEvent, 5000);
|
||||
ThreadPool.schedule(actualEvent, 5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -41,7 +41,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.OlympiadStadiaManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -241,7 +241,7 @@ public class Olympiad
|
||||
{
|
||||
if (_validationEnd > Calendar.getInstance().getTimeInMillis())
|
||||
{
|
||||
_scheduledValdationTask = ThreadPoolManager.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
_scheduledValdationTask = ThreadPool.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -402,7 +402,7 @@ public class Olympiad
|
||||
_scheduledOlympiadEnd.cancel(true);
|
||||
}
|
||||
|
||||
_scheduledOlympiadEnd = ThreadPoolManager.schedule(new OlympiadEndTask(), getMillisToOlympiadEnd());
|
||||
_scheduledOlympiadEnd = ThreadPool.schedule(new OlympiadEndTask(), getMillisToOlympiadEnd());
|
||||
|
||||
updateCompStatus();
|
||||
}
|
||||
@@ -436,7 +436,7 @@ public class Olympiad
|
||||
final Calendar validationEnd = Calendar.getInstance();
|
||||
_validationEnd = validationEnd.getTimeInMillis() + VALIDATION_PERIOD;
|
||||
|
||||
_scheduledValdationTask = ThreadPoolManager.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
_scheduledValdationTask = ThreadPool.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ public class Olympiad
|
||||
LOGGER.info("Olympiad System: Event starts/started : " + _compStart.getTime());
|
||||
}
|
||||
|
||||
_scheduledCompStart = ThreadPoolManager.schedule(() ->
|
||||
_scheduledCompStart = ThreadPool.schedule(() ->
|
||||
{
|
||||
if (isOlympiadEnd())
|
||||
{
|
||||
@@ -825,10 +825,10 @@ public class Olympiad
|
||||
final long regEnd = getMillisToCompEnd() - 600000;
|
||||
if (regEnd > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> Announcements.getInstance().announceToAll(new SystemMessage(SystemMessageId.OLYMPIAD_REGISTRATION_PERIOD_ENDED)), regEnd);
|
||||
ThreadPool.schedule(() -> Announcements.getInstance().announceToAll(new SystemMessage(SystemMessageId.OLYMPIAD_REGISTRATION_PERIOD_ENDED)), regEnd);
|
||||
}
|
||||
|
||||
_scheduledCompEnd = ThreadPoolManager.schedule(() ->
|
||||
_scheduledCompEnd = ThreadPool.schedule(() ->
|
||||
{
|
||||
if (isOlympiadEnd())
|
||||
{
|
||||
@@ -870,7 +870,7 @@ public class Olympiad
|
||||
_scheduledOlympiadEnd.cancel(true);
|
||||
}
|
||||
|
||||
_scheduledOlympiadEnd = ThreadPoolManager.schedule(new OlympiadEndTask(), 0);
|
||||
_scheduledOlympiadEnd = ThreadPool.schedule(new OlympiadEndTask(), 0);
|
||||
}
|
||||
|
||||
protected long getMillisToValidationEnd()
|
||||
@@ -1001,7 +1001,7 @@ public class Olympiad
|
||||
return;
|
||||
}
|
||||
|
||||
_scheduledWeeklyTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_scheduledWeeklyTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
addWeeklyPoints();
|
||||
LOGGER.info("Olympiad System: Added weekly points to nobles");
|
||||
@@ -1771,7 +1771,7 @@ public class Olympiad
|
||||
break;
|
||||
}
|
||||
|
||||
_scheduledWeeklyTask = ThreadPoolManager.scheduleAtFixedRate(new OlympiadPointsRestoreTask(final_change_period), getMillisToWeekChange(), final_change_period);
|
||||
_scheduledWeeklyTask = ThreadPool.scheduleAtFixedRate(new OlympiadPointsRestoreTask(final_change_period), getMillisToWeekChange(), final_change_period);
|
||||
}
|
||||
|
||||
class OlympiadPointsRestoreTask implements Runnable
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.csv.MapRegionTable;
|
||||
import com.l2jmobius.gameserver.handler.AutoChatHandler;
|
||||
@@ -306,7 +306,7 @@ public class SevenSigns
|
||||
final long milliToChange = getMilliToPeriodChange();
|
||||
|
||||
SevenSignsPeriodChange sspc = new SevenSignsPeriodChange();
|
||||
ThreadPoolManager.schedule(sspc, milliToChange);
|
||||
ThreadPool.schedule(sspc, milliToChange);
|
||||
|
||||
// Thanks to http://rainbow.arch.scriptmania.com/scripts/timezone_countdown.html for help with this.
|
||||
final double numSecs = (milliToChange / 1000) % 60;
|
||||
@@ -1849,7 +1849,7 @@ public class SevenSigns
|
||||
setCalendarForNextPeriodChange();
|
||||
|
||||
SevenSignsPeriodChange sspc = new SevenSignsPeriodChange();
|
||||
ThreadPoolManager.schedule(sspc, getMilliToPeriodChange());
|
||||
ThreadPool.schedule(sspc, getMilliToPeriodChange());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
@@ -3248,7 +3248,7 @@ public class SevenSignsFestival implements SpawnListener
|
||||
_festivalData = new HashMap<>();
|
||||
|
||||
restoreFestivalData();
|
||||
ThreadPoolManager.scheduleAtFixedRate(new RestoreStatus(), 7200000, 10800000);
|
||||
ThreadPool.scheduleAtFixedRate(new RestoreStatus(), 7200000, 10800000);
|
||||
|
||||
if (SevenSigns.getInstance().isSealValidationPeriod())
|
||||
{
|
||||
@@ -3400,7 +3400,7 @@ public class SevenSignsFestival implements SpawnListener
|
||||
// at the specified time, then invoke it automatically after every cycle.
|
||||
FestivalManager fm = new FestivalManager();
|
||||
setNextFestivalStart(Config.ALT_FESTIVAL_MANAGER_START + FESTIVAL_SIGNUP_TIME);
|
||||
_managerScheduledTask = ThreadPoolManager.scheduleAtFixedRate(fm, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
|
||||
_managerScheduledTask = ThreadPool.scheduleAtFixedRate(fm, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
|
||||
|
||||
LOGGER.info("SevenSignsFestival: The first Festival of Darkness cycle begins in " + (Config.ALT_FESTIVAL_MANAGER_START / 60000) + " minute(s).");
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,7 +27,7 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
@@ -567,7 +567,7 @@ public class Castle
|
||||
if (getOwnerId() > 0)
|
||||
{
|
||||
L2Clan clan = ClanTable.getInstance().getClan(getOwnerId()); // Try to find clan instance
|
||||
ThreadPoolManager.schedule(new CastleUpdater(clan, 1), 3600000); // Schedule owner tasks to start running
|
||||
ThreadPool.schedule(new CastleUpdater(clan, 1), 3600000); // Schedule owner tasks to start running
|
||||
}
|
||||
|
||||
rs.close();
|
||||
@@ -704,7 +704,7 @@ public class Castle
|
||||
// give crowns
|
||||
CrownManager.getInstance().checkCrowns(clan);
|
||||
|
||||
ThreadPoolManager.schedule(new CastleUpdater(clan, 1), 3600000); // Schedule owner tasks to start running
|
||||
ThreadPool.schedule(new CastleUpdater(clan, 1), 3600000); // Schedule owner tasks to start running
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
@@ -75,7 +75,7 @@ public class Fort
|
||||
|
||||
public void EndOfSiege(L2Clan clan)
|
||||
{
|
||||
ThreadPoolManager.schedule(new endFortressSiege(this, clan), 1000);
|
||||
ThreadPool.schedule(new endFortressSiege(this, clan), 1000);
|
||||
}
|
||||
|
||||
public void Engrave(L2Clan clan, int objId)
|
||||
|
||||
+14
-14
@@ -24,7 +24,7 @@ import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.crypt.nProtect;
|
||||
import com.l2jmobius.commons.crypt.nProtect.RestrictionType;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
@@ -120,33 +120,33 @@ public class FortSiege
|
||||
|
||||
if (timeRemaining > 3600000)
|
||||
{
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
}
|
||||
else if ((timeRemaining <= 3600000) && (timeRemaining > 600000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getFort().getName() + " siege conclusion.", true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getFort().getName() + " siege conclusion.", true);
|
||||
|
||||
// Prepare task for 5 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 300000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 300000);
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getFort().getName() + " siege conclusion.", true);
|
||||
|
||||
// Prepare task for 10 seconds count down
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 10000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining - 10000);
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
announceToPlayer(getFort().getName() + " siege " + (timeRemaining / 1000) + " second(s) left!", true);
|
||||
|
||||
// Prepare task for second count down
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_fortInst), timeRemaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -190,19 +190,19 @@ public class FortSiege
|
||||
if (timeRemaining > 86400000)
|
||||
{
|
||||
// Prepare task for 24 before siege start to end registration
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 86400000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 86400000);
|
||||
}
|
||||
else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000))
|
||||
{
|
||||
// Prepare task for 1 hr left before siege start.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 13600000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 13600000);
|
||||
}
|
||||
else if ((timeRemaining <= 13600000) && (timeRemaining > 600000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getFort().getName() + " siege begin.", false);
|
||||
|
||||
// Prepare task for 10 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 600000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 600000);
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
@@ -213,21 +213,21 @@ public class FortSiege
|
||||
clearSiegeWaitingClan();
|
||||
|
||||
// Prepare task for 5 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 300000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 300000);
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getFort().getName() + " siege begin.", false);
|
||||
|
||||
// Prepare task for 10 seconds count down
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 10000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining - 10000);
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
announceToPlayer(getFort().getName() + " siege " + (timeRemaining / 1000) + " second(s) to start!", false);
|
||||
|
||||
// Prepare task for second count down
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_fortInst), timeRemaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -506,7 +506,7 @@ public class FortSiege
|
||||
FortSiege.class,
|
||||
this
|
||||
});
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(getFort()), 1000); // Prepare auto end task
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(getFort()), 1000); // Prepare auto end task
|
||||
|
||||
announceToPlayer("The siege of " + getFort().getName() + " has started!", false);
|
||||
saveFortSiege();
|
||||
@@ -1089,7 +1089,7 @@ public class FortSiege
|
||||
_siegeRegistrationEndDate.add(Calendar.MINUTE, -10);
|
||||
|
||||
// Schedule siege auto start
|
||||
ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(getFort()), 1000);
|
||||
ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(getFort()), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+14
-14
@@ -26,7 +26,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.crypt.nProtect;
|
||||
import com.l2jmobius.commons.crypt.nProtect.RestrictionType;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
@@ -176,35 +176,35 @@ public class Siege
|
||||
if (timeRemaining > 3600000)
|
||||
{
|
||||
// Prepare task for 1 hr left.
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 3600000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 3600000);
|
||||
}
|
||||
else if ((timeRemaining <= 3600000) && (timeRemaining > 600000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege conclusion.", true);
|
||||
|
||||
// Prepare task for 10 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 600000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 600000);
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege conclusion.", true);
|
||||
|
||||
// Prepare task for 5 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 300000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 300000);
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege conclusion.", true);
|
||||
|
||||
// Prepare task for 10 seconds count down
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 10000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 10000);
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
announceToPlayer(getCastle().getName() + " siege " + (timeRemaining / 1000) + " second(s) left!", true);
|
||||
|
||||
// Prepare task for second count down
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -253,7 +253,7 @@ public class Siege
|
||||
if (timeRemaining > 86400000)
|
||||
{
|
||||
// Prepare task for 24 before siege start to end registration
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 86400000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 86400000);
|
||||
}
|
||||
else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000))
|
||||
{
|
||||
@@ -262,35 +262,35 @@ public class Siege
|
||||
clearSiegeWaitingClan();
|
||||
|
||||
// Prepare task for 1 hr left before siege start.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 13600000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 13600000);
|
||||
}
|
||||
else if ((timeRemaining <= 13600000) && (timeRemaining > 600000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false);
|
||||
|
||||
// Prepare task for 10 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 600000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 600000);
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false);
|
||||
|
||||
// Prepare task for 5 minute left.
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 300000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 300000);
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
announceToPlayer((timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false);
|
||||
|
||||
// Prepare task for 10 seconds count down
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 10000);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 10000);
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
announceToPlayer(getCastle().getName() + " siege " + (timeRemaining / 1000) + " second(s) to start!", false);
|
||||
|
||||
// Prepare task for second count down
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining);
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -673,7 +673,7 @@ public class Siege
|
||||
this
|
||||
});
|
||||
// Prepare auto end task
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(getCastle()), 1000);
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(getCastle()), 1000);
|
||||
|
||||
announceToPlayer("The siege of " + getCastle().getName() + " has started!", false);
|
||||
|
||||
@@ -1206,7 +1206,7 @@ public class Siege
|
||||
_siegeRegistrationEndDate.add(Calendar.DAY_OF_MONTH, -1);
|
||||
|
||||
// Schedule siege auto start
|
||||
ThreadPoolManager.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
@@ -116,8 +116,8 @@ public class BanditStrongholdSiege extends ClanHallSiege
|
||||
spawnFlags();
|
||||
gateControl(1);
|
||||
anonce("Take place at the siege of his headquarters.", 1);
|
||||
ThreadPoolManager.schedule(new startFirstStep(), 5 * 60000);
|
||||
_midTimer = ThreadPoolManager.schedule(new midSiegeStep(), 25 * 60000);
|
||||
ThreadPool.schedule(new startFirstStep(), 5 * 60000);
|
||||
_midTimer = ThreadPool.schedule(new midSiegeStep(), 25 * 60000);
|
||||
|
||||
_siegeEndDate = Calendar.getInstance();
|
||||
_siegeEndDate.add(Calendar.MINUTE, 60);
|
||||
@@ -139,7 +139,7 @@ public class BanditStrongholdSiege extends ClanHallSiege
|
||||
gateControl(1);
|
||||
_finalStage = true;
|
||||
anonce("Take place at the siege of his headquarters.", 1);
|
||||
ThreadPoolManager.schedule(new startFirstStep(), 5 * 60000);
|
||||
ThreadPool.schedule(new startFirstStep(), 5 * 60000);
|
||||
}
|
||||
|
||||
public void endSiege(boolean par)
|
||||
@@ -682,7 +682,7 @@ public class BanditStrongholdSiege extends ClanHallSiege
|
||||
else
|
||||
{
|
||||
_midTimer.cancel(false);
|
||||
ThreadPoolManager.schedule(new midSiegeStep(), 5000);
|
||||
ThreadPool.schedule(new midSiegeStep(), 5000);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+10
-10
@@ -28,7 +28,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||
@@ -137,7 +137,7 @@ public class DevastatedCastle
|
||||
final long milliToSiege = getMilliToSiege();
|
||||
|
||||
RunMessengerSpawn rms = new RunMessengerSpawn();
|
||||
ThreadPoolManager.schedule(rms, milliToSiege);
|
||||
ThreadPool.schedule(rms, milliToSiege);
|
||||
|
||||
final long total_millis = System.currentTimeMillis() + milliToSiege;
|
||||
|
||||
@@ -230,11 +230,11 @@ public class DevastatedCastle
|
||||
}
|
||||
|
||||
RunSiege rs = new RunSiege();
|
||||
ThreadPoolManager.schedule(rs, 14400000); // 4 * 60 * 60 * 1000
|
||||
ThreadPool.schedule(rs, 14400000); // 4 * 60 * 60 * 1000
|
||||
|
||||
ThreadPoolManager.schedule(new DeSpawnTimer(result), 7200000); // 2 * 60 * 60 * 1000
|
||||
ThreadPoolManager.schedule(new AnnounceInfo("Siege registration of Devastated castle is over!"), 7200000);
|
||||
ThreadPoolManager.schedule(new AnnounceInfo("2 hours until siege begin."), 7200000);
|
||||
ThreadPool.schedule(new DeSpawnTimer(result), 7200000); // 2 * 60 * 60 * 1000
|
||||
ThreadPool.schedule(new AnnounceInfo("Siege registration of Devastated castle is over!"), 7200000);
|
||||
ThreadPool.schedule(new AnnounceInfo("2 hours until siege begin."), 7200000);
|
||||
}
|
||||
|
||||
protected class AnnounceInfo implements Runnable
|
||||
@@ -290,7 +290,7 @@ public class DevastatedCastle
|
||||
spawn.setZ(-2194);
|
||||
spawn.stopRespawn();
|
||||
result = spawn.spawnOne();
|
||||
_gustav = ThreadPoolManager.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
_gustav = ThreadPool.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
|
||||
template = NpcTable.getInstance().getTemplate(BOSS1_ID);
|
||||
spawn = new L2Spawn(template);
|
||||
@@ -299,7 +299,7 @@ public class DevastatedCastle
|
||||
spawn.setZ(-2195);
|
||||
spawn.stopRespawn();
|
||||
_minion1 = spawn.spawnOne();
|
||||
_dietrich = ThreadPoolManager.schedule(new DeSpawnTimer(_minion1), 3600000); // 60 * 60 * 1000
|
||||
_dietrich = ThreadPool.schedule(new DeSpawnTimer(_minion1), 3600000); // 60 * 60 * 1000
|
||||
|
||||
template = NpcTable.getInstance().getTemplate(BOSS2_ID);
|
||||
spawn = new L2Spawn(template);
|
||||
@@ -308,7 +308,7 @@ public class DevastatedCastle
|
||||
spawn.setZ(-2194);
|
||||
spawn.stopRespawn();
|
||||
_minion2 = spawn.spawnOne();
|
||||
_mikhail = ThreadPoolManager.schedule(new DeSpawnTimer(_minion2), 3600000); // 60 * 60 * 1000
|
||||
_mikhail = ThreadPool.schedule(new DeSpawnTimer(_minion2), 3600000); // 60 * 60 * 1000
|
||||
|
||||
spawnMonsters();
|
||||
}
|
||||
@@ -737,7 +737,7 @@ public class DevastatedCastle
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
_monsterdespawn = ThreadPoolManager.schedule(new DeSpawnMonsters(), 3600000); // 60 * 60 * 1000
|
||||
_monsterdespawn = ThreadPool.schedule(new DeSpawnMonsters(), 3600000); // 60 * 60 * 1000
|
||||
}
|
||||
|
||||
protected class DeSpawnMonsters implements Runnable
|
||||
|
||||
+6
-6
@@ -27,7 +27,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||
@@ -127,7 +127,7 @@ public class FortressOfResistance
|
||||
final long milliToCapture = getMilliToCapture();
|
||||
|
||||
RunMessengerSpawn rms = new RunMessengerSpawn();
|
||||
ThreadPoolManager.schedule(rms, milliToCapture);
|
||||
ThreadPool.schedule(rms, milliToCapture);
|
||||
|
||||
final long total_millis = System.currentTimeMillis() + milliToCapture;
|
||||
|
||||
@@ -219,9 +219,9 @@ public class FortressOfResistance
|
||||
e.printStackTrace();
|
||||
}
|
||||
final RunBossSpawn rbs = new RunBossSpawn();
|
||||
ThreadPoolManager.schedule(rbs, 3600000); // 60 * 60 * 1000
|
||||
ThreadPool.schedule(rbs, 3600000); // 60 * 60 * 1000
|
||||
LOGGER.info("Fortress of Resistanse: Messenger spawned!");
|
||||
ThreadPoolManager.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
ThreadPool.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
}
|
||||
|
||||
protected class RunBossSpawn implements Runnable
|
||||
@@ -261,8 +261,8 @@ public class FortressOfResistance
|
||||
Announce("Capture of Partisan Hideout has begun!");
|
||||
Announce("You have one hour to kill Nurka!");
|
||||
|
||||
_nurka = ThreadPoolManager.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
_announce = ThreadPoolManager.schedule(new AnnounceInfo("No one can`t kill Nurka! Partisan Hideout set free until next week!"), 3600000);
|
||||
_nurka = ThreadPool.schedule(new DeSpawnTimer(result), 3600000); // 60 * 60 * 1000
|
||||
_announce = ThreadPool.schedule(new AnnounceInfo("No one can`t kill Nurka! Partisan Hideout set free until next week!"), 3600000);
|
||||
}
|
||||
|
||||
protected class DeSpawnTimer implements Runnable
|
||||
|
||||
+5
-5
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.csv.DoorTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
@@ -110,8 +110,8 @@ public class WildBeastFarmSiege extends ClanHallSiege
|
||||
spawnFlags();
|
||||
gateControl(1);
|
||||
anonce("Take place at the siege of his headquarters.", 1);
|
||||
ThreadPoolManager.schedule(new startFirstStep(), 5 * 60000);
|
||||
_midTimer = ThreadPoolManager.schedule(new midSiegeStep(), 25 * 60000);
|
||||
ThreadPool.schedule(new startFirstStep(), 5 * 60000);
|
||||
_midTimer = ThreadPool.schedule(new midSiegeStep(), 25 * 60000);
|
||||
_siegeEndDate = Calendar.getInstance();
|
||||
_siegeEndDate.add(Calendar.MINUTE, 60);
|
||||
_endSiegeTask.schedule(1000);
|
||||
@@ -131,7 +131,7 @@ public class WildBeastFarmSiege extends ClanHallSiege
|
||||
gateControl(1);
|
||||
_finalStage = true;
|
||||
anonce("Take place at the siege of his headquarters.", 1);
|
||||
ThreadPoolManager.schedule(new startFirstStep(), 5 * 60000);
|
||||
ThreadPool.schedule(new startFirstStep(), 5 * 60000);
|
||||
}
|
||||
|
||||
public void endSiege(boolean par)
|
||||
@@ -665,7 +665,7 @@ public class WildBeastFarmSiege extends ClanHallSiege
|
||||
else
|
||||
{
|
||||
_midTimer.cancel(false);
|
||||
ThreadPoolManager.schedule(new midSiegeStep(), 5000);
|
||||
ThreadPool.schedule(new midSiegeStep(), 5000);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -140,7 +140,7 @@ public final class QuestSpawn
|
||||
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new DeSpawnScheduleTimerTask(result), despawnDelay);
|
||||
ThreadPool.schedule(new DeSpawnScheduleTimerTask(result), despawnDelay);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.quest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
public class QuestStateManager
|
||||
@@ -34,7 +34,7 @@ public class QuestStateManager
|
||||
try
|
||||
{
|
||||
cleanUp();
|
||||
ThreadPoolManager.schedule(new ScheduleTimerTask(), 60000);
|
||||
ThreadPool.schedule(new ScheduleTimerTask(), 60000);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class QuestStateManager
|
||||
// Constructor
|
||||
public QuestStateManager()
|
||||
{
|
||||
ThreadPoolManager.schedule(new ScheduleTimerTask(), 60000);
|
||||
ThreadPool.schedule(new ScheduleTimerTask(), 60000);
|
||||
}
|
||||
|
||||
// =========================================================
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.quest;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
@@ -71,11 +71,11 @@ public class QuestTimer
|
||||
_isRepeating = repeating;
|
||||
if (repeating)
|
||||
{
|
||||
_schedular = ThreadPoolManager.scheduleAtFixedRate(new ScheduleTimerTask(), time, time); // Prepare auto end task
|
||||
_schedular = ThreadPool.scheduleAtFixedRate(new ScheduleTimerTask(), time, time); // Prepare auto end task
|
||||
}
|
||||
else
|
||||
{
|
||||
_schedular = ThreadPoolManager.schedule(new ScheduleTimerTask(), time); // Prepare auto end task
|
||||
_schedular = ThreadPool.schedule(new ScheduleTimerTask(), time); // Prepare auto end task
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user