Threadpool refactoring.
This commit is contained in:
+3
-3
@@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver;
|
||||
package com.l2jmobius.commons.concurrent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -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 LOG = Logger.getLogger(ThreadPoolManager.class.getName());
|
||||
protected static final Logger LOG = Logger.getLogger(ThreadPool.class.getName());
|
||||
|
||||
private static final long MAX_DELAY = TimeUnit.NANOSECONDS.toMillis(Long.MAX_VALUE - System.nanoTime()) / 2;
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.Server;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.commons.mmocore.SelectorConfig;
|
||||
import com.l2jmobius.commons.mmocore.SelectorThread;
|
||||
@@ -167,7 +168,7 @@ public final class GameServer
|
||||
}
|
||||
|
||||
printSection("ThreadPool");
|
||||
ThreadPoolManager.init();
|
||||
ThreadPool.init();
|
||||
EventDispatcher.getInstance();
|
||||
|
||||
new File("log/game").mkdirs();
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
|
||||
@@ -143,7 +144,7 @@ public final class GameTimeController extends Thread
|
||||
|
||||
if (isNight)
|
||||
{
|
||||
ThreadPoolManager.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
|
||||
ThreadPool.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
|
||||
}
|
||||
|
||||
while (true)
|
||||
@@ -175,7 +176,7 @@ public final class GameTimeController extends Thread
|
||||
{
|
||||
isNight = !isNight;
|
||||
|
||||
ThreadPoolManager.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
|
||||
ThreadPool.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -31,7 +32,7 @@ public final class ItemsAutoDestroy
|
||||
|
||||
protected ItemsAutoDestroy()
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(this::removeItems, 5000, 5000);
|
||||
ThreadPool.scheduleAtFixedRate(this::removeItems, 5000, 5000);
|
||||
}
|
||||
|
||||
public static ItemsAutoDestroy getInstance()
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.StatType;
|
||||
@@ -109,7 +110,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION)
|
||||
{
|
||||
_activeMakers.put(manufacturer.getObjectId(), maker);
|
||||
ThreadPoolManager.schedule(maker, 100);
|
||||
ThreadPool.schedule(maker, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -158,7 +159,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION)
|
||||
{
|
||||
_activeMakers.put(player.getObjectId(), maker);
|
||||
ThreadPoolManager.schedule(maker, 100);
|
||||
ThreadPool.schedule(maker, 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -353,7 +354,7 @@ public class RecipeController
|
||||
_player.broadcastPacket(msk);
|
||||
|
||||
_player.sendPacket(new SetupGauge(0, _delay));
|
||||
ThreadPoolManager.schedule(this, 100 + _delay);
|
||||
ThreadPool.schedule(this, 100 + _delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -536,7 +537,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION && isWait)
|
||||
{
|
||||
_player.sendPacket(new SetupGauge(0, _delay));
|
||||
ThreadPoolManager.schedule(this, 100 + _delay);
|
||||
ThreadPool.schedule(this, 100 + _delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -558,7 +559,7 @@ public class RecipeController
|
||||
if (Config.ALT_GAME_CREATION && isWait)
|
||||
{
|
||||
_player.sendPacket(new SetupGauge(0, _delay));
|
||||
ThreadPoolManager.schedule(this, 100 + _delay);
|
||||
ThreadPool.schedule(this, 100 + _delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jmobius.gameserver.model.AutoSpawnHandler;
|
||||
@@ -186,7 +187,7 @@ public class SevenSigns
|
||||
|
||||
// Schedule a time for the next period change.
|
||||
final 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;
|
||||
@@ -1625,7 +1626,7 @@ public class SevenSigns
|
||||
setCalendarForNextPeriodChange();
|
||||
|
||||
final SevenSignsPeriodChange sspc = new SevenSignsPeriodChange();
|
||||
ThreadPoolManager.schedule(sspc, getMilliToPeriodChange());
|
||||
ThreadPool.schedule(sspc, getMilliToPeriodChange());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
@@ -930,7 +931,7 @@ public class SevenSignsFestival implements SpawnListener
|
||||
// at the specified time, then invoke it automatically after every cycle.
|
||||
_managerInstance = new FestivalManager();
|
||||
setNextFestivalStart(Config.ALT_FESTIVAL_MANAGER_START + FESTIVAL_SIGNUP_TIME);
|
||||
_managerScheduledTask = ThreadPoolManager.scheduleAtFixedRate(_managerInstance, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
|
||||
_managerScheduledTask = ThreadPool.scheduleAtFixedRate(_managerInstance, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
|
||||
|
||||
_log.info("SevenSignsFestival: The first Festival of Darkness cycle begins in " + (Config.ALT_FESTIVAL_MANAGER_START / 60000) + " minute(s).");
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
@@ -213,7 +214,7 @@ public class Shutdown extends Thread
|
||||
// stop all thread pools
|
||||
try
|
||||
{
|
||||
ThreadPoolManager.shutdown();
|
||||
ThreadPool.shutdown();
|
||||
_log.info("Thread Pool Manager: Manager has been shut down(" + tc.getEstimatedTimeAndRestartCounter() + "ms).");
|
||||
}
|
||||
catch (Throwable t)
|
||||
|
||||
@@ -23,8 +23,8 @@ 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.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -836,7 +836,7 @@ public 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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -853,7 +853,7 @@ public 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,8 +26,8 @@ import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.TerritoryTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.AISkillScope;
|
||||
@@ -303,7 +303,7 @@ public class L2AttackableAI 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
if ((_fearTime > 0) && (_fearTask == null))
|
||||
{
|
||||
_fearTask = ThreadPoolManager.scheduleAtFixedRate(new FearTask(this, effector, start), 0, FEAR_TICKS * 1000); // seconds
|
||||
_fearTask = ThreadPool.scheduleAtFixedRate(new FearTask(this, effector, start), 0, FEAR_TICKS * 1000); // seconds
|
||||
_actor.startAbnormalVisualEffect(true, AbnormalVisualEffect.TURN_FLEE);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -30,8 +30,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
@@ -311,7 +311,7 @@ public class L2CharacterAI extends AbstractAI
|
||||
|
||||
if (_actor.getBowAttackEndTime() > GameTimeController.getInstance().getGameTicks())
|
||||
{
|
||||
ThreadPoolManager.schedule(new CastTask(_actor, skill, target), (_actor.getBowAttackEndTime() - GameTimeController.getInstance().getGameTicks()) * GameTimeController.MILLIS_IN_TICK);
|
||||
ThreadPool.schedule(new CastTask(_actor, skill, target), (_actor.getBowAttackEndTime() - GameTimeController.getInstance().getGameTicks()) * GameTimeController.MILLIS_IN_TICK);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.ai;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -87,7 +87,7 @@ public class L2DoorAI extends L2CharacterAI
|
||||
@Override
|
||||
protected void onEvtAttacked(L2Character attacker)
|
||||
{
|
||||
ThreadPoolManager.execute(new onEventAttackedDoorTask((L2DoorInstance) _actor, attacker));
|
||||
ThreadPool.execute(new onEventAttackedDoorTask((L2DoorInstance) _actor, attacker));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,8 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
@@ -199,7 +199,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
@@ -197,7 +197,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -294,7 +294,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
{
|
||||
if (_avoidTask == null)
|
||||
{
|
||||
_avoidTask = ThreadPoolManager.scheduleAtFixedRate(this, 100, 100);
|
||||
_avoidTask = ThreadPool.scheduleAtFixedRate(this, 100, 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ public class WarehouseCacheManager
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
|
||||
ThreadPool.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
|
||||
}
|
||||
|
||||
public void addCacheTask(L2PcInstance pc)
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
@@ -340,7 +340,7 @@ public class ClanTable
|
||||
|
||||
public void scheduleRemoveClan(int clanId)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
if (getClan(clanId) == null)
|
||||
{
|
||||
|
||||
+3
-3
@@ -36,8 +36,8 @@ import org.xml.sax.Attributes;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -422,11 +422,11 @@ public final class BotReportTable
|
||||
c.set(Calendar.DAY_OF_YEAR, c.get(Calendar.DAY_OF_YEAR) + 1);
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new ResetPointTask(), c.getTimeInMillis() - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new ResetPointTask(), c.getTimeInMillis() - System.currentTimeMillis());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ThreadPoolManager.schedule(new ResetPointTask(), 24 * 3600 * 1000);
|
||||
ThreadPool.schedule(new ResetPointTask(), 24 * 3600 * 1000);
|
||||
LOGGER.log(Level.WARNING, "BotReportTable: Could not properly schedule bot report points reset task. Scheduled in 24 hours.", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.engines.DocumentEngine;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -220,14 +220,14 @@ public class ItemTable
|
||||
if ((raid.getFirstCommandChannelAttacked() != null) && !Config.AUTO_LOOT_RAIDS)
|
||||
{
|
||||
item.setOwnerId(raid.getFirstCommandChannelAttacked().getLeaderObjectId());
|
||||
itemLootShedule = ThreadPoolManager.schedule(new ResetOwner(item), Config.LOOT_RAIDS_PRIVILEGE_INTERVAL);
|
||||
itemLootShedule = ThreadPool.schedule(new ResetOwner(item), Config.LOOT_RAIDS_PRIVILEGE_INTERVAL);
|
||||
item.setItemLootShedule(itemLootShedule);
|
||||
}
|
||||
}
|
||||
else if (!Config.AUTO_LOOT || ((reference instanceof L2EventMonsterInstance) && ((L2EventMonsterInstance) reference).eventDropOnGround()))
|
||||
{
|
||||
item.setOwnerId(actor.getObjectId());
|
||||
itemLootShedule = ThreadPoolManager.schedule(new ResetOwner(item), 15000);
|
||||
itemLootShedule = ThreadPool.schedule(new ResetOwner(item), 15000);
|
||||
item.setItemLootShedule(itemLootShedule);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.idfactory;
|
||||
import java.util.BitSet;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.util.PrimeFinder;
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ public class BitSetIDFactory extends IdFactory
|
||||
|
||||
synchronized (BitSetIDFactory.class)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
|
||||
ThreadPool.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
|
||||
initialize();
|
||||
}
|
||||
_log.info(getClass().getSimpleName() + ": " + _freeIds.size() + " id's available.");
|
||||
|
||||
+3
-3
@@ -35,8 +35,8 @@ import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ManorMode;
|
||||
import com.l2jmobius.gameserver.model.CropProcure;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
@@ -101,7 +101,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
// Schedule autosave
|
||||
if (!Config.ALT_MANOR_SAVE_ALL_ACTIONS)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(this::storeMe, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000);
|
||||
ThreadPool.scheduleAtFixedRate(this::storeMe, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -272,7 +272,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
|
||||
}
|
||||
}
|
||||
// Schedule mode change
|
||||
ThreadPoolManager.schedule(this::changeMode, _nextModeChange.getTimeInMillis() - System.currentTimeMillis());
|
||||
ThreadPool.schedule(this::changeMode, _nextModeChange.getTimeInMillis() - System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public final void changeMode()
|
||||
|
||||
+4
-4
@@ -27,8 +27,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -79,7 +79,7 @@ public class FishingChampionshipManager
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public class FishingChampionshipManager
|
||||
pl.sendPacket(html);
|
||||
|
||||
refreshResult();
|
||||
ThreadPoolManager.schedule(new needRefresh(), 60000);
|
||||
ThreadPool.schedule(new needRefresh(), 60000);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ public class FishingChampionshipManager
|
||||
shutdown();
|
||||
|
||||
_log.info("FishingChampionshipManager : new event period start.");
|
||||
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -33,8 +33,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.FourSepulchersChangeAttackTimeTask;
|
||||
@@ -204,25 +204,25 @@ public final class FourSepulchersManager
|
||||
if ((currentTime >= _coolDownTimeEnd) && (currentTime < _entryTimeEnd)) // entry time check
|
||||
{
|
||||
clean();
|
||||
_changeEntryTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeEntryTimeTask(), 0);
|
||||
_changeEntryTimeTask = ThreadPool.schedule(new FourSepulchersChangeEntryTimeTask(), 0);
|
||||
_log.info(getClass().getSimpleName() + ": Beginning in Entry time");
|
||||
}
|
||||
else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup time check
|
||||
{
|
||||
clean();
|
||||
_changeWarmUpTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeWarmUpTimeTask(), 0);
|
||||
_changeWarmUpTimeTask = ThreadPool.schedule(new FourSepulchersChangeWarmUpTimeTask(), 0);
|
||||
_log.info(getClass().getSimpleName() + ": Beginning in WarmUp time");
|
||||
}
|
||||
else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack time check
|
||||
{
|
||||
clean();
|
||||
_changeAttackTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeAttackTimeTask(), 0);
|
||||
_changeAttackTimeTask = ThreadPool.schedule(new FourSepulchersChangeAttackTimeTask(), 0);
|
||||
_log.info(getClass().getSimpleName() + ": Beginning in Attack time");
|
||||
}
|
||||
else
|
||||
// else cooldown time and without cleanup because it's already implemented
|
||||
{
|
||||
_changeCoolDownTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeCoolDownTimeTask(), 0);
|
||||
_changeCoolDownTimeTask = ThreadPool.schedule(new FourSepulchersChangeCoolDownTimeTask(), 0);
|
||||
_log.info(getClass().getSimpleName() + ": Beginning in Cooldown time");
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.GrandBossManagerStoreTask;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
@@ -109,7 +109,7 @@ public final class GrandBossManager implements IStorable
|
||||
{
|
||||
_log.log(Level.WARNING, "Error while initializing GrandBossManager: " + e.getMessage(), e);
|
||||
}
|
||||
ThreadPoolManager.scheduleAtFixedRate(new GrandBossManagerStoreTask(), 5 * 60 * 1000, 5 * 60 * 1000);
|
||||
ThreadPool.scheduleAtFixedRate(new GrandBossManagerStoreTask(), 5 * 60 * 1000, 5 * 60 * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.Team;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.PenaltyRemoveTask;
|
||||
import com.l2jmobius.gameserver.model.ArenaParticipantsHolder;
|
||||
@@ -86,7 +86,7 @@ public final class HandysBlockCheckerManager
|
||||
{
|
||||
holder.checkAndShuffle();
|
||||
}
|
||||
ThreadPoolManager.execute(holder.getEvent().new StartEvent());
|
||||
ThreadPool.execute(holder.getEvent().new StartEvent());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -345,7 +345,7 @@ public final class HandysBlockCheckerManager
|
||||
|
||||
private void schedulePenaltyRemoval(int objId)
|
||||
{
|
||||
ThreadPoolManager.schedule(new PenaltyRemoveTask(objId), 10000);
|
||||
ThreadPool.schedule(new PenaltyRemoveTask(objId), 10000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -27,9 +27,9 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
@@ -47,7 +47,7 @@ public final class ItemsOnGroundManager implements Runnable
|
||||
{
|
||||
if (Config.SAVE_DROPPED_ITEM_INTERVAL > 0)
|
||||
{
|
||||
ThreadPoolManager.scheduleAtFixedRate(this, Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
|
||||
ThreadPool.scheduleAtFixedRate(this, Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
|
||||
}
|
||||
load();
|
||||
}
|
||||
|
||||
+4
-4
@@ -29,8 +29,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.MessageDeletionTask;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -72,11 +72,11 @@ public final class MailManager
|
||||
|
||||
if (expiration < System.currentTimeMillis())
|
||||
{
|
||||
ThreadPoolManager.schedule(new MessageDeletionTask(msgId), 10000);
|
||||
ThreadPool.schedule(new MessageDeletionTask(msgId), 10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new MessageDeletionTask(msgId), expiration - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new MessageDeletionTask(msgId), expiration - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public final class MailManager
|
||||
receiver.sendPacket(ExNoticePostArrived.valueOf(true));
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new MessageDeletionTask(msg.getId()), msg.getExpiration() - System.currentTimeMillis());
|
||||
ThreadPool.schedule(new MessageDeletionTask(msg.getId()), msg.getExpiration() - System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public final void markAsReadInDb(int msgId)
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.Containers;
|
||||
@@ -109,7 +109,7 @@ public class PremiumManager
|
||||
*/
|
||||
private void startExpireTask(L2PcInstance player, long delay)
|
||||
{
|
||||
ScheduledFuture<?> task = ThreadPoolManager.schedule(new PremiumExpireTask(player), delay);
|
||||
ScheduledFuture<?> task = ThreadPool.schedule(new PremiumExpireTask(player), delay);
|
||||
expiretasks.put(player.getAccountName(), task);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -29,8 +29,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.model.L2Spawn;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -186,7 +186,7 @@ public class RaidBossSpawnManager
|
||||
time.setTimeInMillis(respawnTime);
|
||||
_log.info(getClass().getSimpleName() + ": Updated " + boss.getName() + " respawn time to " + time.getTime());
|
||||
|
||||
_schedules.put(boss.getId(), ThreadPoolManager.schedule(new SpawnSchedule(boss.getId()), respawnDelay));
|
||||
_schedules.put(boss.getId(), ThreadPool.schedule(new SpawnSchedule(boss.getId()), respawnDelay));
|
||||
updateDb();
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public class RaidBossSpawnManager
|
||||
}
|
||||
else
|
||||
{
|
||||
_schedules.put(bossId, ThreadPoolManager.schedule(new SpawnSchedule(bossId), respawnTime - Calendar.getInstance().getTimeInMillis()));
|
||||
_schedules.put(bossId, ThreadPool.schedule(new SpawnSchedule(bossId), respawnTime - Calendar.getInstance().getTimeInMillis()));
|
||||
}
|
||||
|
||||
_spawns.put(bossId, spawnDat);
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ import java.util.Calendar;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.Shutdown;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
|
||||
/**
|
||||
* @author Gigi
|
||||
@@ -71,7 +71,7 @@ public class ServerRestartManager
|
||||
if (lastRestart != null)
|
||||
{
|
||||
nextRestartTime = new SimpleDateFormat("HH:mm").format(lastRestart.getTime());
|
||||
ThreadPoolManager.schedule(new ServerRestartTask(), lastDelay - (Config.SERVER_RESTART_SCHEDULE_COUNTDOWN * 1000));
|
||||
ThreadPool.schedule(new ServerRestartTask(), lastDelay - (Config.SERVER_RESTART_SCHEDULE_COUNTDOWN * 1000));
|
||||
_log.info("Scheduled server restart at " + lastRestart.getTime() + ".");
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.Calendar;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.UpdateSoDStateTask;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class SoDManager
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new UpdateSoDStateTask(), Config.SOD_STAGE_2_LENGTH - timePast);
|
||||
ThreadPool.schedule(new UpdateSoDStateTask(), Config.SOD_STAGE_2_LENGTH - timePast);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -116,7 +116,7 @@ public class SoIManager
|
||||
spawnOpenedSeed();
|
||||
DoorData.getInstance().getDoor(14240102).openMe();
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
closeSeed();
|
||||
setCurrentStage(4);
|
||||
|
||||
+17
-17
@@ -32,8 +32,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
@@ -275,7 +275,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
{
|
||||
_scheduledEndTWTask.cancel(false);
|
||||
}
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), 1000);
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -283,7 +283,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
{
|
||||
_scheduledStartTWTask.cancel(false);
|
||||
}
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), 1000);
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1267,14 +1267,14 @@ public final class TerritoryWarManager implements Siegable
|
||||
if (timeRemaining > 7200000)
|
||||
{
|
||||
_isRegistrationOver = false;
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 7200000); // Prepare task for 2h before TW start to end registration
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 7200000); // Prepare task for 2h before TW start to end registration
|
||||
}
|
||||
else if ((timeRemaining <= 7200000) && (timeRemaining > 1200000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_REQUEST_PERIOD_HAS_ENDED);
|
||||
Broadcast.toAllOnlinePlayers(sm);
|
||||
_isRegistrationOver = true;
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 1200000); // Prepare task for 20 mins left before TW start.
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 1200000); // Prepare task for 20 mins left before TW start.
|
||||
}
|
||||
else if ((timeRemaining <= 1200000) && (timeRemaining > 600000))
|
||||
{
|
||||
@@ -1283,7 +1283,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
_isTWChannelOpen = true;
|
||||
_isRegistrationOver = true;
|
||||
updatePlayerTWStateFlags(false);
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 600000); // Prepare task for 10 mins left before TW start.
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 600000); // Prepare task for 10 mins left before TW start.
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
@@ -1292,7 +1292,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
_isTWChannelOpen = true;
|
||||
_isRegistrationOver = true;
|
||||
updatePlayerTWStateFlags(false);
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 300000); // Prepare task for 5 mins left before TW start.
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 300000); // Prepare task for 5 mins left before TW start.
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 60000))
|
||||
{
|
||||
@@ -1301,7 +1301,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
_isTWChannelOpen = true;
|
||||
_isRegistrationOver = true;
|
||||
updatePlayerTWStateFlags(false);
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 60000); // Prepare task for 1 min left before TW start.
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 60000); // Prepare task for 1 min left before TW start.
|
||||
}
|
||||
else if ((timeRemaining <= 60000) && (timeRemaining > 0))
|
||||
{
|
||||
@@ -1310,15 +1310,15 @@ public final class TerritoryWarManager implements Siegable
|
||||
_isTWChannelOpen = true;
|
||||
_isRegistrationOver = true;
|
||||
updatePlayerTWStateFlags(false);
|
||||
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining); // Prepare task for TW start.
|
||||
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining); // Prepare task for TW start.
|
||||
}
|
||||
else if ((timeRemaining + WARLENGTH) > 0)
|
||||
{
|
||||
_isTWChannelOpen = true;
|
||||
_isRegistrationOver = true;
|
||||
startTerritoryWar();
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), 1000); // Prepare task for TW end.
|
||||
_scheduledRewardOnlineTask = ThreadPoolManager.scheduleAtFixedRate(new RewardOnlineParticipants(), 60000, 60000);
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), 1000); // Prepare task for TW end.
|
||||
_scheduledRewardOnlineTask = ThreadPool.scheduleAtFixedRate(new RewardOnlineParticipants(), 60000, 60000);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -1348,41 +1348,41 @@ public final class TerritoryWarManager implements Siegable
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_HOUR_S);
|
||||
sm.addInt(2);
|
||||
announceToParticipants(sm, 0, 0);
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
}
|
||||
else if ((timeRemaining <= 3600000) && (timeRemaining > 600000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
|
||||
sm.addInt((int) (timeRemaining / 60000));
|
||||
announceToParticipants(sm, 0, 0);
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
|
||||
sm.addInt((int) (timeRemaining / 60000));
|
||||
announceToParticipants(sm, 0, 0);
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
|
||||
sm.addInt((int) (timeRemaining / 60000));
|
||||
announceToParticipants(sm, 0, 0);
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_TO_THE_END_OF_TERRITORY_WAR);
|
||||
sm.addInt((int) (timeRemaining / 1000));
|
||||
announceToParticipants(sm, 0, 0);
|
||||
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining); // Prepare task for second count down
|
||||
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining); // Prepare task for second count down
|
||||
}
|
||||
else
|
||||
{
|
||||
endTerritoryWar();
|
||||
// _scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), 1000);
|
||||
ThreadPoolManager.schedule(new closeTerritoryChannelTask(), 600000);
|
||||
ThreadPool.schedule(new closeTerritoryChannelTask(), 600000);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
+4
-4
@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.instancemanager.tasks.StartMovingTask;
|
||||
@@ -269,7 +269,7 @@ public final class WalkingManager implements IXmlReader
|
||||
npc.setWalking();
|
||||
}
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, node);
|
||||
walk.setWalkCheckTask(ThreadPoolManager.scheduleAtFixedRate(new StartMovingTask(npc, routeName), 60000, 60000)); // start walk check task, for resuming walk after fight
|
||||
walk.setWalkCheckTask(ThreadPool.scheduleAtFixedRate(new StartMovingTask(npc, routeName), 60000, 60000)); // start walk check task, for resuming walk after fight
|
||||
|
||||
npc.getKnownList().startTrackingTask();
|
||||
|
||||
@@ -277,7 +277,7 @@ public final class WalkingManager implements IXmlReader
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
|
||||
ThreadPool.schedule(new StartMovingTask(npc, routeName), 60000);
|
||||
}
|
||||
}
|
||||
// walk was stopped due to some reason (arrived to node, script action, fight or something else), resume it
|
||||
@@ -414,7 +414,7 @@ public final class WalkingManager implements IXmlReader
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
|
||||
ThreadPool.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-6
@@ -26,8 +26,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -152,12 +152,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));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -191,8 +191,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();
|
||||
PreparedStatement ps = con.prepareStatement(INSERT_LOTTERY))
|
||||
@@ -400,7 +400,7 @@ public class Lottery
|
||||
_log.log(Level.WARNING, "Lottery: Could not store finished lottery data: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(new startLottery(), MINUTE);
|
||||
ThreadPool.schedule(new startLottery(), MINUTE);
|
||||
_number++;
|
||||
|
||||
_isStarted = false;
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
|
||||
/**
|
||||
@@ -61,14 +61,14 @@ public final class FourSepulchersChangeAttackTimeTask implements Runnable
|
||||
{
|
||||
final Calendar inter = Calendar.getInstance();
|
||||
inter.set(Calendar.MINUTE, (int) min);
|
||||
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
|
||||
ThreadPool.schedule(new FourSepulchersManagerSayTask(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 5 * 60400);
|
||||
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 5 * 60400);
|
||||
}
|
||||
// searching time when attack time will be ended:
|
||||
// counting difference between time when attack time ends and
|
||||
@@ -83,7 +83,7 @@ public final class FourSepulchersChangeAttackTimeTask implements Runnable
|
||||
interval = Config.FS_TIME_ATTACK * 60000L;
|
||||
}
|
||||
|
||||
manager.setChangeCoolDownTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeCoolDownTimeTask(), interval));
|
||||
manager.setChangeCoolDownTimeTask(ThreadPool.schedule(new FourSepulchersChangeCoolDownTimeTask(), interval));
|
||||
final ScheduledFuture<?> changeAttackTimeTask = manager.getChangeAttackTimeTask();
|
||||
|
||||
if (changeAttackTimeTask != null)
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager.tasks;
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@ public final class FourSepulchersChangeCoolDownTimeTask implements Runnable
|
||||
|
||||
final long interval = time.getTimeInMillis() - Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
manager.setChangeEntryTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeEntryTimeTask(), interval));
|
||||
manager.setChangeEntryTimeTask(ThreadPool.schedule(new FourSepulchersChangeEntryTimeTask(), interval));
|
||||
final ScheduledFuture<?> changeCoolDownTimeTask = manager.getChangeCoolDownTimeTask();
|
||||
|
||||
if (changeCoolDownTimeTask != null)
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
|
||||
/**
|
||||
@@ -40,8 +40,8 @@ public final class FourSepulchersChangeEntryTimeTask implements Runnable
|
||||
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getEntrytTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_ENTRY * 60000L;
|
||||
// launching saying process...
|
||||
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 0);
|
||||
manager.setChangeWarmUpTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeWarmUpTimeTask(), interval));
|
||||
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 0);
|
||||
manager.setChangeWarmUpTimeTask(ThreadPool.schedule(new FourSepulchersChangeWarmUpTimeTask(), interval));
|
||||
final ScheduledFuture<?> changeEntryTimeTask = manager.getChangeEntryTimeTask();
|
||||
|
||||
if (changeEntryTimeTask != null)
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.Calendar;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ public final class FourSepulchersChangeWarmUpTimeTask implements Runnable
|
||||
manager.setIsCoolDownTime(false);
|
||||
|
||||
final long interval = manager.isFirstTimeRun() ? manager.getWarmUpTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_WARMUP * 60000L;
|
||||
manager.setChangeAttackTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeAttackTimeTask(), interval));
|
||||
manager.setChangeAttackTimeTask(ThreadPool.schedule(new FourSepulchersChangeAttackTimeTask(), interval));
|
||||
final ScheduledFuture<?> changeWarmUpTimeTask = manager.getChangeWarmUpTimeTask();
|
||||
|
||||
if (changeWarmUpTimeTask != null)
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager.tasks;
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ public final class FourSepulchersManagerSayTask implements Runnable
|
||||
// cannot be
|
||||
// more than
|
||||
// 59
|
||||
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 5 * 60000);
|
||||
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 5 * 60000);
|
||||
}
|
||||
// attack time ending chat
|
||||
else if ((tmp.get(Calendar.MINUTE) + 5) >= Config.FS_TIME_ATTACK)
|
||||
|
||||
+4
-4
@@ -34,8 +34,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
@@ -274,7 +274,7 @@ public class AutoSpawnHandler
|
||||
if (isActive)
|
||||
{
|
||||
final AutoSpawner rs = new AutoSpawner(objectId);
|
||||
spawnTask = spawnInst._desDelay > 0 ? ThreadPoolManager.scheduleAtFixedRate(rs, spawnInst._initDelay, spawnInst._resDelay) : ThreadPoolManager.schedule(rs, spawnInst._initDelay);
|
||||
spawnTask = spawnInst._desDelay > 0 ? ThreadPool.scheduleAtFixedRate(rs, spawnInst._initDelay, spawnInst._resDelay) : ThreadPool.schedule(rs, spawnInst._initDelay);
|
||||
_runningSpawns.put(objectId, spawnTask);
|
||||
}
|
||||
else
|
||||
@@ -285,7 +285,7 @@ public class AutoSpawnHandler
|
||||
{
|
||||
spawnTask.cancel(false);
|
||||
}
|
||||
ThreadPoolManager.schedule(rd, 0);
|
||||
ThreadPool.schedule(rd, 0);
|
||||
}
|
||||
spawnInst.setSpawnActive(isActive);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ public class AutoSpawnHandler
|
||||
// If there is no despawn time, do not create a despawn task.
|
||||
if (spawnInst.getDespawnDelay() > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(new AutoDespawner(_objectId), spawnInst.getDespawnDelay() - 1000);
|
||||
ThreadPool.schedule(new AutoDespawner(_objectId), spawnInst.getDespawnDelay() - 1000);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.function.Function;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -1308,7 +1308,7 @@ public final class CharEffectList
|
||||
return;
|
||||
}
|
||||
// Schedule the icon update packets 500miliseconds ahead, so it can gather-up most of the changes.
|
||||
_effectIconsUpdate = ThreadPoolManager.schedule(() ->
|
||||
_effectIconsUpdate = ThreadPool.schedule(() ->
|
||||
{
|
||||
AbnormalStatusUpdate asu = null;
|
||||
PartySpelled ps = null;
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
@@ -352,7 +352,7 @@ public class CursedWeapon implements INamable
|
||||
{
|
||||
_player.stopTransformation(true);
|
||||
|
||||
ThreadPoolManager.schedule(() -> TransformData.getInstance().transformPlayer(transformationId, _player), 500);
|
||||
ThreadPool.schedule(() -> TransformData.getInstance().transformPlayer(transformationId, _player), 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -378,7 +378,7 @@ public class CursedWeapon implements INamable
|
||||
}
|
||||
else
|
||||
{
|
||||
_removeTask = ThreadPoolManager.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ public class CursedWeapon implements INamable
|
||||
|
||||
// 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.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
|
||||
@@ -84,6 +84,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.SevenSignsFestival;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import com.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
@@ -359,7 +359,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
|
||||
if (_positionBroadcastTask == null)
|
||||
{
|
||||
_positionBroadcastTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_positionBroadcastTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
if (_positionPacket == null)
|
||||
{
|
||||
@@ -993,7 +993,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
}
|
||||
_changeRequestDistributionType = partyDistributionType;
|
||||
_changeDistributionTypeAnswers = new HashSet<>();
|
||||
_changeDistributionTypeRequestTask = ThreadPoolManager.schedule(() -> finishLootRequest(false), PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT.toMillis());
|
||||
_changeDistributionTypeRequestTask = ThreadPool.schedule(() -> finishLootRequest(false), PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT.toMillis());
|
||||
|
||||
broadcastToPartyMembers(getLeader(), new ExAskModifyPartyLooting(getLeader().getName(), partyDistributionType));
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model;
|
||||
|
||||
import com.l2jmobius.gameserver.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;
|
||||
@@ -123,7 +123,7 @@ public class L2Request
|
||||
{
|
||||
_isRequestor = isRequestor;
|
||||
_isAnswerer = !isRequestor;
|
||||
ThreadPoolManager.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
|
||||
ThreadPool.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.TerritoryTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.NpcPersonalAIData;
|
||||
@@ -441,7 +441,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
_scheduledCount++;
|
||||
|
||||
// Create a new SpawnTask to launch after the respawn Delay
|
||||
ThreadPoolManager.schedule(new SpawnTask(), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
|
||||
ThreadPool.schedule(new SpawnTask(), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -330,7 +330,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +350,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2AttackableAI;
|
||||
@@ -257,7 +257,7 @@ public class L2Attackable extends L2Npc
|
||||
{
|
||||
_commandChannelTimer = new CommandChannelTimer(this);
|
||||
_commandChannelLastAttack = System.currentTimeMillis();
|
||||
ThreadPoolManager.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -35,8 +35,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2AttackableAI;
|
||||
@@ -802,7 +802,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
if (getCurrentMp() < mpConsume)
|
||||
{
|
||||
// If L2PcInstance doesn't have enough MP, stop the attack
|
||||
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
@@ -820,7 +820,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
else
|
||||
{
|
||||
// Cancel the action because the bow can't be re-use at this moment
|
||||
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Notify AI with EVT_READY_TO_ACT
|
||||
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1150,7 +1150,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority
|
||||
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
|
||||
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), 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.getInstance().getGameTicks();
|
||||
@@ -1220,7 +1220,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority
|
||||
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
|
||||
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), 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.getInstance().getGameTicks();
|
||||
@@ -1290,10 +1290,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority for hit 1
|
||||
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk / 2);
|
||||
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk / 2);
|
||||
|
||||
// Create a new hit task with Medium priority for hit 2 with a higher delay
|
||||
ThreadPoolManager.schedule(new HitTask(this, target, damage2, crit2, miss2, attack.hasSoulshot(), shld2), sAtk);
|
||||
ThreadPool.schedule(new HitTask(this, target, damage2, crit2, miss2, attack.hasSoulshot(), shld2), sAtk);
|
||||
|
||||
// Add those hits to the Server-Client packet Attack
|
||||
attack.addHit(target, damage1, miss1, crit1, shld1);
|
||||
@@ -1470,7 +1470,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Create a new hit task with Medium priority
|
||||
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
|
||||
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
|
||||
|
||||
// Add this hit to the Server-Client packet Attack
|
||||
attack.addHit(target, damage1, miss1, crit1, shld1);
|
||||
@@ -1741,7 +1741,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// queue herbs and potions
|
||||
if (isCastingSimultaneouslyNow() && simultaneously)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> beginCast(skill, simultaneously, target, targets), 100);
|
||||
ThreadPool.schedule(() -> beginCast(skill, simultaneously, target, targets), 100);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1895,7 +1895,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// Before start AI Cast Broadcast Fly Effect is Need
|
||||
if (skill.getFlyType() != null)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FlyToLocationTask(this, target, skill), 50);
|
||||
ThreadPool.schedule(new FlyToLocationTask(this, target, skill), 50);
|
||||
}
|
||||
|
||||
final MagicUseTask mut = new MagicUseTask(this, targets, skill, skillTime, simultaneously);
|
||||
@@ -1925,7 +1925,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
// Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime)
|
||||
// For client animation reasons (party buffs especially) 400 ms before!
|
||||
_skillCast2 = ThreadPoolManager.schedule(mut, skillTime - 400);
|
||||
_skillCast2 = ThreadPool.schedule(mut, skillTime - 400);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1938,7 +1938,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
// Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime)
|
||||
// For client animation reasons (party buffs especially) 400 ms before!
|
||||
_skillCast = ThreadPoolManager.schedule(mut, skillTime - 400);
|
||||
_skillCast = ThreadPool.schedule(mut, skillTime - 400);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4051,7 +4051,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPoolManager.execute(() ->
|
||||
ThreadPool.execute(() ->
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -4502,7 +4502,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// 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(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
}
|
||||
@@ -4580,7 +4580,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// 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(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
|
||||
@@ -5432,7 +5432,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(mut, 400);
|
||||
_skillCast = ThreadPool.schedule(mut, 400);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5561,11 +5561,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if (mut.isSimultaneous())
|
||||
{
|
||||
_skillCast2 = ThreadPoolManager.schedule(mut, 0);
|
||||
_skillCast2 = ThreadPool.schedule(mut, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillCast = ThreadPoolManager.schedule(mut, 0);
|
||||
_skillCast = ThreadPool.schedule(mut, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5632,7 +5632,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
// 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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||
import com.l2jmobius.gameserver.SevenSigns;
|
||||
import com.l2jmobius.gameserver.SevenSignsFestival;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
@@ -314,7 +314,7 @@ public class L2Npc extends L2Character
|
||||
|
||||
// Create a RandomAnimation Task that will be launched after the calculated delay
|
||||
_rAniTask = new RandomAnimationTask(this);
|
||||
ThreadPoolManager.schedule(_rAniTask, interval);
|
||||
ThreadPool.schedule(_rAniTask, interval);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1533,7 +1533,7 @@ public class L2Npc extends L2Character
|
||||
|
||||
public L2Npc scheduleDespawn(long delay)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
if (!isDecayed())
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
@@ -92,7 +92,7 @@ public abstract class L2Vehicle extends L2Character
|
||||
{
|
||||
if (_engine != null)
|
||||
{
|
||||
ThreadPoolManager.schedule(_engine, delay);
|
||||
ThreadPool.schedule(_engine, delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.PetDataTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
@@ -187,7 +187,7 @@ public final class L2BabyPetInstance extends L2PetInstance
|
||||
{
|
||||
if ((_majorHeal != null) || (_buffs != null) || ((_recharge != null) && (_castTask == null) && !isDead()))
|
||||
{
|
||||
_castTask = ThreadPoolManager.scheduleAtFixedRate(new CastTask(this), 3000, 2000);
|
||||
_castTask = ThreadPool.scheduleAtFixedRate(new CastTask(this), 3000, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.stat.ControllableAirShipStat;
|
||||
@@ -257,8 +257,8 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
|
||||
public void onSpawn()
|
||||
{
|
||||
super.onSpawn();
|
||||
_checkTask = ThreadPoolManager.scheduleAtFixedRate(new CheckTask(), 60000, 10000);
|
||||
_consumeFuelTask = ThreadPoolManager.scheduleAtFixedRate(new ConsumeFuelTask(), 60000, 60000);
|
||||
_checkTask = ThreadPool.scheduleAtFixedRate(new CheckTask(), 60000, 10000);
|
||||
_consumeFuelTask = ThreadPool.scheduleAtFixedRate(new ConsumeFuelTask(), 60000, 60000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -330,7 +330,7 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
|
||||
if (isVisible() && isEmpty() && !isInDock())
|
||||
{
|
||||
// deleteMe() can't be called from CheckTask because task should not cancel itself
|
||||
ThreadPoolManager.execute(new DecayTask());
|
||||
ThreadPool.execute(new DecayTask());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -22,7 +22,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
@@ -181,7 +181,7 @@ public final class L2CubicInstance implements IIdentifiable
|
||||
break;
|
||||
}
|
||||
}
|
||||
_disappearTask = ThreadPoolManager.schedule(new CubicDisappear(this), cubicDuration * 1000); // disappear
|
||||
_disappearTask = ThreadPool.schedule(new CubicDisappear(this), cubicDuration * 1000); // disappear
|
||||
}
|
||||
|
||||
public synchronized void doAction()
|
||||
@@ -208,12 +208,12 @@ public final class L2CubicInstance implements IIdentifiable
|
||||
case SMART_CUBIC_EVATEMPLAR:
|
||||
case SMART_CUBIC_SHILLIENTEMPLAR:
|
||||
{
|
||||
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new CubicAction(this, _cubicSkillChance), 0, _cubicDelay);
|
||||
_actionTask = ThreadPool.scheduleAtFixedRate(new CubicAction(this, _cubicSkillChance), 0, _cubicDelay);
|
||||
break;
|
||||
}
|
||||
case LIFE_CUBIC:
|
||||
{
|
||||
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new CubicHeal(this), 0, _cubicDelay);
|
||||
_actionTask = ThreadPool.scheduleAtFixedRate(new CubicHeal(this), 0, _cubicDelay);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -49,8 +49,8 @@ public class L2DecoyInstance extends L2Decoy
|
||||
_totalLifeTime = totalLifeTime;
|
||||
_timeRemaining = _totalLifeTime;
|
||||
final int skilllevel = getTemplate().getDisplayId() - 13070;
|
||||
_DecoyLifeTask = ThreadPoolManager.scheduleAtFixedRate(new DecoyLifetime(getOwner(), this), 1000, 1000);
|
||||
_HateSpam = ThreadPoolManager.scheduleAtFixedRate(new HateSpam(this, SkillData.getInstance().getSkill(5272, skilllevel)), 2000, 5000);
|
||||
_DecoyLifeTask = ThreadPool.scheduleAtFixedRate(new DecoyLifetime(getOwner(), this), 1000, 1000);
|
||||
_HateSpam = ThreadPool.scheduleAtFixedRate(new HateSpam(this, SkillData.getInstance().getSkill(5272, skilllevel)), 2000, 5000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.L2CharacterAI;
|
||||
import com.l2jmobius.gameserver.ai.L2DoorAI;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
@@ -127,7 +127,7 @@ public class L2DoorInstance extends L2Character
|
||||
{
|
||||
delay += Rnd.get(getTemplate().getRandomTime());
|
||||
}
|
||||
ThreadPoolManager.schedule(new TimerOpen(), delay * 1000);
|
||||
ThreadPool.schedule(new TimerOpen(), delay * 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -751,7 +751,7 @@ public class L2DoorInstance extends L2Character
|
||||
_autoCloseTask = null;
|
||||
oldTask.cancel(false);
|
||||
}
|
||||
_autoCloseTask = ThreadPoolManager.schedule(new AutoClose(), getTemplate().getCloseTime() * 1000);
|
||||
_autoCloseTask = ThreadPool.schedule(new AutoClose(), getTemplate().getCloseTime() * 1000);
|
||||
}
|
||||
|
||||
class AutoClose implements Runnable
|
||||
@@ -786,7 +786,7 @@ public class L2DoorInstance extends L2Character
|
||||
{
|
||||
delay += Rnd.get(getTemplate().getRandomTime());
|
||||
}
|
||||
ThreadPoolManager.schedule(this, delay * 1000);
|
||||
ThreadPool.schedule(this, delay * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
@@ -158,7 +158,7 @@ public class L2FortCommanderInstance extends L2DefenderInstance
|
||||
|
||||
broadcastPacket(ns);
|
||||
setCanTalk(false);
|
||||
ThreadPoolManager.schedule(new ScheduleTalkTask(), 10000);
|
||||
ThreadPool.schedule(new ScheduleTalkTask(), 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -45,6 +45,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.GameTimeController;
|
||||
import com.l2jmobius.gameserver.ItemsAutoDestroy;
|
||||
@@ -52,7 +53,6 @@ import com.l2jmobius.gameserver.LoginServerThread;
|
||||
import com.l2jmobius.gameserver.RecipeController;
|
||||
import com.l2jmobius.gameserver.SevenSigns;
|
||||
import com.l2jmobius.gameserver.SevenSignsFestival;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.ai.L2CharacterAI;
|
||||
import com.l2jmobius.gameserver.ai.L2PlayerAI;
|
||||
@@ -886,7 +886,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (_PvPRegTask == null)
|
||||
{
|
||||
_PvPRegTask = ThreadPoolManager.scheduleAtFixedRate(new PvPFlagTask(this), 1000, 1000);
|
||||
_PvPRegTask = ThreadPool.scheduleAtFixedRate(new PvPFlagTask(this), 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2841,7 +2841,7 @@ public final class L2PcInstance extends L2Playable
|
||||
getAI().setIntention(CtrlIntention.AI_INTENTION_REST);
|
||||
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_SITTING));
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -2863,7 +2863,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
|
||||
ThreadPoolManager.schedule(new StandUpTask(this), 2500);
|
||||
ThreadPool.schedule(new StandUpTask(this), 2500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4247,7 +4247,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
if (Config.GAMEGUARD_ENFORCE)
|
||||
{
|
||||
ThreadPoolManager.schedule(new GameGuardCheckTask(this), 30 * 1000);
|
||||
ThreadPool.schedule(new GameGuardCheckTask(this), 30 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9080,7 +9080,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_inventoryDisable = val;
|
||||
if (val)
|
||||
{
|
||||
ThreadPoolManager.schedule(new InventoryEnableTask(this), 1500);
|
||||
ThreadPool.schedule(new InventoryEnableTask(this), 1500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10300,7 +10300,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskWarnUserTakeBreak == null)
|
||||
{
|
||||
_taskWarnUserTakeBreak = ThreadPoolManager.scheduleAtFixedRate(new WarnUserTakeBreakTask(this), 7200000, 7200000);
|
||||
_taskWarnUserTakeBreak = ThreadPool.scheduleAtFixedRate(new WarnUserTakeBreakTask(this), 7200000, 7200000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10326,7 +10326,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_taskRentPet == null)
|
||||
{
|
||||
_taskRentPet = ThreadPoolManager.scheduleAtFixedRate(new RentPetTask(this), seconds * 1000L, seconds * 1000L);
|
||||
_taskRentPet = ThreadPool.scheduleAtFixedRate(new RentPetTask(this), seconds * 1000L, seconds * 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10354,7 +10354,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
final int timeinwater = (int) calcStat(Stats.BREATH, 60000, this, null);
|
||||
sendPacket(new SetupGauge(2, timeinwater));
|
||||
_taskWater = ThreadPoolManager.scheduleAtFixedRate(new WaterTask(this), timeinwater, 1000);
|
||||
_taskWater = ThreadPool.scheduleAtFixedRate(new WaterTask(this), timeinwater, 1000);
|
||||
}
|
||||
|
||||
public boolean isInWater()
|
||||
@@ -10717,7 +10717,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
_teleportWatchdog = ThreadPoolManager.schedule(new TeleportWatchdogTask(this), Config.TELEPORT_WATCHDOG_TIMEOUT * 1000);
|
||||
_teleportWatchdog = ThreadPool.schedule(new TeleportWatchdogTask(this), Config.TELEPORT_WATCHDOG_TIMEOUT * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11516,7 +11516,7 @@ public final class L2PcInstance extends L2Playable
|
||||
checkDelay = _fish.getGutsCheckTime() * 66;
|
||||
}
|
||||
}
|
||||
_taskforfish = ThreadPoolManager.scheduleAtFixedRate(new LookingForFishTask(this, _fish.getStartCombatTime(), _fish.getFishGuts(), _fish.getFishGroup(), isNoob, isUpperGrade), 10000, checkDelay);
|
||||
_taskforfish = ThreadPool.scheduleAtFixedRate(new LookingForFishTask(this, _fish.getStartCombatTime(), _fish.getFishGuts(), _fish.getFishGroup(), isNoob, isUpperGrade), 10000, checkDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12051,7 +12051,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
if (_fameTask == null)
|
||||
{
|
||||
_fameTask = ThreadPoolManager.scheduleAtFixedRate(new FameTask(this, fameFixRate), delay, delay);
|
||||
_fameTask = ThreadPool.scheduleAtFixedRate(new FameTask(this, fameFixRate), delay, delay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12069,7 +12069,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (Config.ENABLE_VITALITY && (_vitalityTask == null))
|
||||
{
|
||||
_vitalityTask = ThreadPoolManager.scheduleAtFixedRate(new VitalityTask(this), 1000, 60000);
|
||||
_vitalityTask = ThreadPool.scheduleAtFixedRate(new VitalityTask(this), 1000, 60000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12189,7 +12189,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_soulTask.cancel(false);
|
||||
_soulTask = null;
|
||||
}
|
||||
_soulTask = ThreadPoolManager.schedule(new ResetSoulsTask(this), 600000);
|
||||
_soulTask = ThreadPool.schedule(new ResetSoulsTask(this), 600000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12489,7 +12489,7 @@ public final class L2PcInstance extends L2Playable
|
||||
sendPacket(new SetupGauge(3, (getCurrentFeed() * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume()));
|
||||
if (!isDead())
|
||||
{
|
||||
_mountFeedTask = ThreadPoolManager.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
|
||||
_mountFeedTask = ThreadPool.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
|
||||
}
|
||||
}
|
||||
else if (_canFeed)
|
||||
@@ -12499,7 +12499,7 @@ public final class L2PcInstance extends L2Playable
|
||||
sendPacket(sg);
|
||||
if (!isDead())
|
||||
{
|
||||
_mountFeedTask = ThreadPoolManager.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
|
||||
_mountFeedTask = ThreadPool.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12563,7 +12563,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void enteredNoLanding(int delay)
|
||||
{
|
||||
_dismountTask = ThreadPoolManager.schedule(new DismountTask(this), delay * 1000);
|
||||
_dismountTask = ThreadPool.schedule(new DismountTask(this), delay * 1000);
|
||||
}
|
||||
|
||||
public void exitedNoLanding()
|
||||
@@ -12707,7 +12707,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_chargeTask.cancel(false);
|
||||
}
|
||||
}
|
||||
_chargeTask = ThreadPoolManager.schedule(new ResetChargesTask(this), 600000);
|
||||
_chargeTask = ThreadPool.schedule(new ResetChargesTask(this), 600000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13820,7 +13820,7 @@ public final class L2PcInstance extends L2Playable
|
||||
startNevitHourglassTask();
|
||||
|
||||
// Create task to give new recommendations
|
||||
_recoGiveTask = ThreadPoolManager.scheduleAtFixedRate(new RecoGiveTask(this), 7200000, 3600000);
|
||||
_recoGiveTask = ThreadPool.scheduleAtFixedRate(new RecoGiveTask(this), 7200000, 3600000);
|
||||
|
||||
// Store new data
|
||||
storeRecommendations(false);
|
||||
@@ -13836,7 +13836,7 @@ public final class L2PcInstance extends L2Playable
|
||||
if (taskTime > 0)
|
||||
{
|
||||
// If player have some timeleft, start bonus task
|
||||
_nevitHourglassTask = ThreadPoolManager.schedule(new RecoBonusTaskEnd(this), taskTime);
|
||||
_nevitHourglassTask = ThreadPool.schedule(new RecoBonusTaskEnd(this), taskTime);
|
||||
}
|
||||
sendPacket(new ExVoteSystemInfo(this));
|
||||
}
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharSummonTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.SummonEffectsTable;
|
||||
@@ -1100,7 +1100,7 @@ public class L2PetInstance extends L2Summon
|
||||
stopFeed();
|
||||
if (!isDead() && (getOwner().getSummon() == this))
|
||||
{
|
||||
_feedTask = ThreadPoolManager.scheduleAtFixedRate(new FeedTask(), 10000, 10000);
|
||||
_feedTask = ThreadPool.scheduleAtFixedRate(new FeedTask(), 10000, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -19,8 +19,8 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.MonsterRace;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -103,26 +103,26 @@ public class L2RaceManagerInstance extends L2Npc
|
||||
|
||||
_managers = new ArrayList<>();
|
||||
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_ARE_NOW_AVAILABLE_FOR_MONSTER_RACE_S1), 0, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.NOW_SELLING_TICKETS_FOR_MONSTER_RACE_S1), 30 * SECOND, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_ARE_NOW_AVAILABLE_FOR_MONSTER_RACE_S1), MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.NOW_SELLING_TICKETS_FOR_MONSTER_RACE_S1), MINUTE + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 2 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 3 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 4 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 5 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 6 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_SALES_ARE_CLOSED_FOR_MONSTER_RACE_S1_ODDS_ARE_POSTED), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S2_WILL_BEGIN_IN_S1_MINUTE_S), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S2_WILL_BEGIN_IN_S1_MINUTE_S), 8 * MINUTE, 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S1_WILL_BEGIN_IN_30_SECONDS), (8 * MINUTE) + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S1_IS_ABOUT_TO_BEGIN_COUNTDOWN_IN_FIVE_SECONDS), (8 * MINUTE) + (50 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (55 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (56 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (57 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (58 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (59 * SECOND), 10 * MINUTE);
|
||||
ThreadPoolManager.scheduleAtFixedRate(new Announcement(SystemMessageId.THEY_RE_OFF), 9 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_ARE_NOW_AVAILABLE_FOR_MONSTER_RACE_S1), 0, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.NOW_SELLING_TICKETS_FOR_MONSTER_RACE_S1), 30 * SECOND, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_ARE_NOW_AVAILABLE_FOR_MONSTER_RACE_S1), MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.NOW_SELLING_TICKETS_FOR_MONSTER_RACE_S1), MINUTE + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 2 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 3 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 4 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 5 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKET_SALES_FOR_THE_MONSTER_RACE_WILL_END_IN_S1_MINUTE_S), 6 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.TICKETS_SALES_ARE_CLOSED_FOR_MONSTER_RACE_S1_ODDS_ARE_POSTED), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S2_WILL_BEGIN_IN_S1_MINUTE_S), 7 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S2_WILL_BEGIN_IN_S1_MINUTE_S), 8 * MINUTE, 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S1_WILL_BEGIN_IN_30_SECONDS), (8 * MINUTE) + (30 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.MONSTER_RACE_S1_IS_ABOUT_TO_BEGIN_COUNTDOWN_IN_FIVE_SECONDS), (8 * MINUTE) + (50 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (55 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (56 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (57 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (58 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THE_RACE_WILL_BEGIN_IN_S1_SECOND_S), (8 * MINUTE) + (59 * SECOND), 10 * MINUTE);
|
||||
ThreadPool.scheduleAtFixedRate(new Announcement(SystemMessageId.THEY_RE_OFF), 9 * MINUTE, 10 * MINUTE);
|
||||
}
|
||||
_managers.add(this);
|
||||
}
|
||||
@@ -251,7 +251,7 @@ public class L2RaceManagerInstance extends L2Npc
|
||||
_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
|
||||
{
|
||||
@@ -528,7 +528,7 @@ public class L2RaceManagerInstance extends L2Npc
|
||||
{
|
||||
_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.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossPointsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
||||
@@ -108,7 +108,7 @@ public class L2RaidBossInstance extends L2MonsterInstance
|
||||
@Override
|
||||
protected void startMaintenanceTask()
|
||||
{
|
||||
_maintenanceTask = ThreadPoolManager.scheduleAtFixedRate(() -> checkAndReturnToSpawn(), 60000, getMaintenanceInterval() + Rnd.get(5000));
|
||||
_maintenanceTask = ThreadPool.scheduleAtFixedRate(() -> checkAndReturnToSpawn(), 60000, getMaintenanceInterval() + Rnd.get(5000));
|
||||
}
|
||||
|
||||
protected void checkAndReturnToSpawn()
|
||||
|
||||
+9
-9
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||
@@ -81,12 +81,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:
|
||||
@@ -126,7 +126,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:
|
||||
@@ -191,7 +191,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:
|
||||
@@ -217,7 +217,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:
|
||||
@@ -235,7 +235,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -267,7 +267,7 @@ public class L2SepulcherMonsterInstance extends L2MonsterInstance
|
||||
{
|
||||
_onDeadEventTask.cancel(true);
|
||||
}
|
||||
_onDeadEventTask = ThreadPoolManager.schedule(new OnDeadEvent(this), 3500);
|
||||
_onDeadEventTask = ThreadPool.schedule(new OnDeadEvent(this), 3500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -281,7 +281,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
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
@@ -206,7 +206,7 @@ public class L2SepulcherNpcInstance extends L2Npc
|
||||
{
|
||||
_spawnMonsterTask.cancel(true);
|
||||
}
|
||||
_spawnMonsterTask = ThreadPoolManager.schedule(new SpawnMonster(getId()), 3500);
|
||||
_spawnMonsterTask = ThreadPool.schedule(new SpawnMonster(getId()), 3500);
|
||||
break;
|
||||
}
|
||||
case 31455:
|
||||
@@ -361,12 +361,12 @@ public class L2SepulcherNpcInstance extends L2Npc
|
||||
{
|
||||
_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 static class CloseNextDoor implements Runnable
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharSummonTable;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.SummonEffectsTable;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
@@ -79,7 +79,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
super.onSpawn();
|
||||
if (_summonLifeTask == null)
|
||||
{
|
||||
_summonLifeTask = ThreadPoolManager.scheduleAtFixedRate(this, 0, 5000);
|
||||
_summonLifeTask = ThreadPool.scheduleAtFixedRate(this, 0, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
@@ -201,7 +201,7 @@ public class L2SiegeFlagInstance extends L2Npc
|
||||
// send warning to owners of headquarters that theirs base is under attack
|
||||
_clan.broadcastToOnlineMembers(SystemMessage.getSystemMessage(SystemMessageId.YOUR_BASE_IS_BEING_ATTACKED));
|
||||
setCanTalk(false);
|
||||
ThreadPoolManager.schedule(new ScheduleTalkTask(), 20000);
|
||||
ThreadPool.schedule(new ScheduleTalkTask(), 20000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
@@ -152,7 +152,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,10 +216,10 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance
|
||||
int delay = 100;
|
||||
for (Skill skill : _beastSkills)
|
||||
{
|
||||
ThreadPoolManager.schedule(new buffCast(skill), delay);
|
||||
ThreadPool.schedule(new buffCast(skill), delay);
|
||||
delay += (100 + skill.getHitTime());
|
||||
}
|
||||
ThreadPoolManager.schedule(new buffCast(null), delay);
|
||||
ThreadPool.schedule(new buffCast(null), delay);
|
||||
}
|
||||
|
||||
private class buffCast implements Runnable
|
||||
@@ -283,7 +283,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
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.enums.TrapAction;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
@@ -84,7 +84,7 @@ public final class L2TrapInstance extends L2Npc
|
||||
_remainingTime = _lifeTime;
|
||||
if (_skill != null)
|
||||
{
|
||||
_trapTask = ThreadPoolManager.scheduleAtFixedRate(new TrapTask(this), TICK, TICK);
|
||||
_trapTask = ThreadPool.scheduleAtFixedRate(new TrapTask(this), TICK, TICK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ public final class L2TrapInstance extends L2Npc
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnTrapAction(this, target, TrapAction.TRAP_TRIGGERED), this);
|
||||
|
||||
ThreadPoolManager.schedule(new TrapTriggerTask(this), 500);
|
||||
ThreadPool.schedule(new TrapTriggerTask(this), 500);
|
||||
}
|
||||
|
||||
public void unSummon()
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.knownlist;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
@@ -101,7 +101,7 @@ public class NpcKnownList extends CharKnownList
|
||||
{
|
||||
if ((_trackingTask == null) && (getActiveChar().getAggroRange() > 0))
|
||||
{
|
||||
_trackingTask = ThreadPoolManager.scheduleAtFixedRate(new TrackingTask(), 2000, 2000);
|
||||
_trackingTask = ThreadPool.scheduleAtFixedRate(new TrackingTask(), 2000, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.Formulas;
|
||||
@@ -195,7 +195,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.model.actor.tasks.attackable;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ public final class CommandChannelTimer implements Runnable
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 10000); // 10sec
|
||||
ThreadPool.schedule(this, 10000); // 10sec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.actor.tasks.npc.trap;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2TrapInstance;
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ public class TrapTriggerTask implements Runnable
|
||||
try
|
||||
{
|
||||
_trap.doCast(_trap.getSkill());
|
||||
ThreadPoolManager.schedule(new TrapUnsummonTask(_trap), _trap.getSkill().getHitTime() + 300);
|
||||
ThreadPool.schedule(new TrapUnsummonTask(_trap), _trap.getSkill().getHitTime() + 300);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
+3
-3
@@ -25,8 +25,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
@@ -160,7 +160,7 @@ public final class AutoAnnouncement extends Announcement implements Runnable
|
||||
_task.cancel(false);
|
||||
}
|
||||
_currentState = _repeat;
|
||||
_task = ThreadPoolManager.schedule(this, _initial);
|
||||
_task = ThreadPool.schedule(this, _initial);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -178,6 +178,6 @@ public final class AutoAnnouncement extends Announcement implements Runnable
|
||||
{
|
||||
_currentState--;
|
||||
}
|
||||
_task = ThreadPoolManager.schedule(this, _delay);
|
||||
_task = ThreadPool.schedule(this, _delay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
|
||||
/**
|
||||
@@ -113,7 +113,7 @@ public final class Product
|
||||
}
|
||||
if ((_restockTask == null) || _restockTask.isDone())
|
||||
{
|
||||
_restockTask = ThreadPoolManager.schedule(new RestockTask(), getRestockDelay());
|
||||
_restockTask = ThreadPool.schedule(new RestockTask(), getRestockDelay());
|
||||
}
|
||||
final boolean result = _count.addAndGet(-val) >= 0;
|
||||
save();
|
||||
@@ -130,7 +130,7 @@ public final class Product
|
||||
final long remainTime = nextRestockTime - System.currentTimeMillis();
|
||||
if (remainTime > 0)
|
||||
{
|
||||
_restockTask = ThreadPoolManager.schedule(new RestockTask(), remainTime);
|
||||
_restockTask = ThreadPool.schedule(new RestockTask(), remainTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.enums.AuctionItemType;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
@@ -235,7 +235,7 @@ public class Auction
|
||||
{
|
||||
taskDelay = _endDate - currentTime;
|
||||
}
|
||||
ThreadPoolManager.schedule(new AutoEndTask(), taskDelay);
|
||||
ThreadPool.schedule(new AutoEndTask(), taskDelay);
|
||||
}
|
||||
|
||||
public static String getItemTypeName(AuctionItemType value)
|
||||
@@ -470,7 +470,7 @@ public class Auction
|
||||
else
|
||||
{
|
||||
/** Task waiting ClanHallManager is loaded every 3s */
|
||||
ThreadPoolManager.schedule(new AutoEndTask(), 3000);
|
||||
ThreadPool.schedule(new AutoEndTask(), 3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -25,7 +25,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.datatables.SkillData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.Team;
|
||||
@@ -303,7 +303,7 @@ public final class BlockCheckerEngine
|
||||
|
||||
_abnormalEnd = true;
|
||||
|
||||
ThreadPoolManager.execute(new EndEvent());
|
||||
ThreadPool.execute(new EndEvent());
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -420,7 +420,7 @@ public final class BlockCheckerEngine
|
||||
}
|
||||
_isStarted = true;
|
||||
// Spawn the blocks
|
||||
ThreadPoolManager.execute(new SpawnRound(16, 1));
|
||||
ThreadPool.execute(new SpawnRound(16, 1));
|
||||
// Start up player parameters
|
||||
setUpPlayers();
|
||||
// Set the started time
|
||||
@@ -454,17 +454,17 @@ public final class BlockCheckerEngine
|
||||
{
|
||||
case 1: // Schedule second spawn round
|
||||
{
|
||||
_task = ThreadPoolManager.schedule(new SpawnRound(20, 2), 60000);
|
||||
_task = ThreadPool.schedule(new SpawnRound(20, 2), 60000);
|
||||
break;
|
||||
}
|
||||
case 2: // Schedule third spawn round
|
||||
{
|
||||
_task = ThreadPoolManager.schedule(new SpawnRound(14, 3), 60000);
|
||||
_task = ThreadPool.schedule(new SpawnRound(14, 3), 60000);
|
||||
break;
|
||||
}
|
||||
case 3: // Schedule Event End Count Down
|
||||
{
|
||||
_task = ThreadPoolManager.schedule(new EndEvent(), 180000);
|
||||
_task = ThreadPool.schedule(new EndEvent(), 180000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ public final class BlockCheckerEngine
|
||||
SpawnTable.getInstance().addNewSpawn(girlSpawn, false);
|
||||
girlSpawn.init();
|
||||
// Schedule his deletion after 9 secs of spawn
|
||||
ThreadPoolManager.schedule(new CarryingGirlUnspawn(girlSpawn), 9000);
|
||||
ThreadPool.schedule(new CarryingGirlUnspawn(girlSpawn), 9000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
@@ -158,11 +158,11 @@ public final class Castle extends AbstractResidence
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (_endDate > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), 0);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public final class Castle extends AbstractResidence
|
||||
{
|
||||
ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().destroyItemByItemId("CS_function_fee", Inventory.ADENA_ID, fee, null, null);
|
||||
}
|
||||
ThreadPoolManager.schedule(new FunctionTask(true), getRate());
|
||||
ThreadPool.schedule(new FunctionTask(true), getRate());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -25,8 +25,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -131,11 +131,11 @@ public abstract class ClanHall
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (_endDate > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), 0);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public abstract class ClanHall
|
||||
{
|
||||
ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().destroyItemByItemId("CH_function_fee", Inventory.ADENA_ID, fee, null, null);
|
||||
}
|
||||
ThreadPoolManager.schedule(new FunctionTask(true), getRate());
|
||||
ThreadPool.schedule(new FunctionTask(true), getRate());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.DimensionalRiftManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jmobius.gameserver.model.L2Party;
|
||||
@@ -173,7 +173,7 @@ public class DimensionalRift
|
||||
final long jumpTime = calcTimeToNextJump();
|
||||
teleporterTimer.schedule(teleporterTimerTask, jumpTime); // Teleporter task, 8-10 minutes
|
||||
|
||||
earthQuakeTask = ThreadPoolManager.schedule(() ->
|
||||
earthQuakeTask = ThreadPool.schedule(() ->
|
||||
{
|
||||
for (L2PcInstance p : _party.getMembers())
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.DuelResult;
|
||||
import com.l2jmobius.gameserver.enums.Team;
|
||||
@@ -98,7 +98,7 @@ public class Duel
|
||||
broadcastToTeam2(sm);
|
||||
}
|
||||
// Schedule duel start
|
||||
ThreadPoolManager.schedule(new ScheduleStartDuelTask(this), 3000);
|
||||
ThreadPool.schedule(new ScheduleStartDuelTask(this), 3000);
|
||||
}
|
||||
|
||||
public static class PlayerCondition
|
||||
@@ -206,14 +206,14 @@ public class Duel
|
||||
}
|
||||
case CONTINUE:
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 1000);
|
||||
ThreadPool.schedule(this, 1000);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
setFinished(true);
|
||||
playKneelAnimation();
|
||||
ThreadPoolManager.schedule(new ScheduleEndDuelTask(_duel, _duel.checkEndDuelCondition()), 5000);
|
||||
ThreadPool.schedule(new ScheduleEndDuelTask(_duel, _duel.checkEndDuelCondition()), 5000);
|
||||
InstanceManager.getInstance().destroyInstance(_duel.getDueldInstanceId());
|
||||
break;
|
||||
}
|
||||
@@ -251,11 +251,11 @@ public class Duel
|
||||
_duel.teleportPlayers();
|
||||
|
||||
// give players 20 seconds to complete teleport and get ready (its ought to be 30 on official..)
|
||||
ThreadPoolManager.schedule(this, _duel.isPartyDuel() ? 20000 : 1);
|
||||
ThreadPool.schedule(this, _duel.isPartyDuel() ? 20000 : 1);
|
||||
}
|
||||
else if (count > 0) // duel not started yet - continue countdown
|
||||
{
|
||||
ThreadPoolManager.schedule(this, 1000);
|
||||
ThreadPool.schedule(this, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -461,7 +461,7 @@ public class Duel
|
||||
broadcastToTeam2(B04_S01);
|
||||
|
||||
// start duelling task
|
||||
ThreadPoolManager.schedule(new ScheduleDuelTask(this), 1000);
|
||||
ThreadPool.schedule(new ScheduleDuelTask(this), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,10 +34,10 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.FortUpdater;
|
||||
import com.l2jmobius.gameserver.FortUpdater.UpdaterType;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
||||
@@ -166,11 +166,11 @@ public final class Fort extends AbstractResidence
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (_endDate > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), _endDate - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FunctionTask(cwh), 0);
|
||||
ThreadPool.schedule(new FunctionTask(cwh), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public final class Fort extends AbstractResidence
|
||||
{
|
||||
getOwnerClan().getWarehouse().destroyItemByItemId("CS_function_fee", Inventory.ADENA_ID, fee, null, null);
|
||||
}
|
||||
ThreadPoolManager.schedule(new FunctionTask(true), getRate());
|
||||
ThreadPool.schedule(new FunctionTask(true), getRate());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -268,7 +268,7 @@ public final class Fort extends AbstractResidence
|
||||
|
||||
public void endOfSiege(L2Clan clan)
|
||||
{
|
||||
ThreadPoolManager.execute(new endFortressSiege(this, clan));
|
||||
ThreadPool.execute(new endFortressSiege(this, clan));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -587,15 +587,15 @@ public final class Fort extends AbstractResidence
|
||||
initial = (Config.FS_UPDATE_FRQ * 60000L) - initial;
|
||||
if ((Config.FS_MAX_OWN_TIME <= 0) || (getOwnedTime() < (Config.FS_MAX_OWN_TIME * 3600)))
|
||||
{
|
||||
_FortUpdater[0] = ThreadPoolManager.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.PERIODIC_UPDATE), initial, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.PERIODIC_UPDATE), initial, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
{
|
||||
_FortUpdater[1] = ThreadPoolManager.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
_FortUpdater[1] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, runCount, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_FortUpdater[1] = ThreadPoolManager.schedule(new FortUpdater(this, clan, 0, UpdaterType.MAX_OWN_TIME), 60000); // Schedule owner tasks to remove owner
|
||||
_FortUpdater[1] = ThreadPool.schedule(new FortUpdater(this, clan, 0, UpdaterType.MAX_OWN_TIME), 60000); // Schedule owner tasks to remove owner
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -820,10 +820,10 @@ public final class Fort extends AbstractResidence
|
||||
{
|
||||
_FortUpdater[1].cancel(false);
|
||||
}
|
||||
_FortUpdater[0] = ThreadPoolManager.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.PERIODIC_UPDATE), Config.FS_UPDATE_FRQ * 60000L, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
_FortUpdater[0] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.PERIODIC_UPDATE), Config.FS_UPDATE_FRQ * 60000L, Config.FS_UPDATE_FRQ * 60000L); // Schedule owner tasks to start running
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
{
|
||||
_FortUpdater[1] = ThreadPoolManager.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
_FortUpdater[1] = ThreadPool.scheduleAtFixedRate(new FortUpdater(this, clan, 0, UpdaterType.MAX_OWN_TIME), 3600000, 3600000); // Schedule owner tasks to remove owener
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
+22
-22
@@ -28,8 +28,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.FortTeleportWhoType;
|
||||
@@ -112,7 +112,7 @@ public class FortSiege implements Siegable
|
||||
final SystemMessage sm;
|
||||
if (_time == 3600) // 1hr remains
|
||||
{
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(600), 3000000); // Prepare task for 10 minutes left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(600), 3000000); // Prepare task for 10 minutes left.
|
||||
}
|
||||
else if (_time == 600) // 10min remains
|
||||
{
|
||||
@@ -120,49 +120,49 @@ public class FortSiege implements Siegable
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(10);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(300), 300000); // Prepare task for 5 minutes left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(300), 300000); // Prepare task for 5 minutes left.
|
||||
}
|
||||
else if (_time == 300) // 5min remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(5);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(60), 240000); // Prepare task for 1 minute left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(60), 240000); // Prepare task for 1 minute left.
|
||||
}
|
||||
else if (_time == 60) // 1min remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(1);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(30), 30000); // Prepare task for 30 seconds left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(30), 30000); // Prepare task for 30 seconds left.
|
||||
}
|
||||
else if (_time == 30) // 30seconds remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(30);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(10), 20000); // Prepare task for 10 seconds left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(10), 20000); // Prepare task for 10 seconds left.
|
||||
}
|
||||
else if (_time == 10) // 10seconds remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(10);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(5), 5000); // Prepare task for 5 seconds left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(5), 5000); // Prepare task for 5 seconds left.
|
||||
}
|
||||
else if (_time == 5) // 5seconds remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(5);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(1), 4000); // Prepare task for 1 seconds left.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(1), 4000); // Prepare task for 1 seconds left.
|
||||
}
|
||||
else if (_time == 1) // 1seconds remains
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_UNTIL_THE_FORTRESS_BATTLE_STARTS);
|
||||
sm.addInt(1);
|
||||
announceToPlayer(sm);
|
||||
ThreadPoolManager.schedule(new ScheduleStartSiegeTask(0), 1000); // Prepare task start siege.
|
||||
ThreadPool.schedule(new ScheduleStartSiegeTask(0), 1000); // Prepare task start siege.
|
||||
}
|
||||
else if (_time == 0)// start siege
|
||||
{
|
||||
@@ -274,7 +274,7 @@ public class FortSiege implements Siegable
|
||||
getSiegeGuardManager().unspawnSiegeGuard(); // Remove all spawned siege guard from this fort
|
||||
getFort().resetDoors(); // Respawn door to fort
|
||||
|
||||
ThreadPoolManager.schedule(new ScheduleSuspiciousMerchantSpawn(), FortSiegeManager.getInstance().getSuspiciousMerchantRespawnDelay() * 60 * 1000L); // Prepare 3hr task for suspicious merchant respawn
|
||||
ThreadPool.schedule(new ScheduleSuspiciousMerchantSpawn(), FortSiegeManager.getInstance().getSuspiciousMerchantRespawnDelay() * 60 * 1000L); // Prepare 3hr task for suspicious merchant respawn
|
||||
setSiegeDateTime(true); // store suspicious merchant spawn in DB
|
||||
|
||||
if (_siegeEnd != null)
|
||||
@@ -338,7 +338,7 @@ public class FortSiege implements Siegable
|
||||
getFort().getZone().updateZoneStatusForCharactersInside();
|
||||
|
||||
// Schedule a task to prepare auto siege end
|
||||
_siegeEnd = ThreadPoolManager.schedule(new ScheduleEndSiegeTask(), FortSiegeManager.getInstance().getSiegeLength() * 60 * 1000L); // Prepare auto end task
|
||||
_siegeEnd = ThreadPool.schedule(new ScheduleEndSiegeTask(), FortSiegeManager.getInstance().getSiegeLength() * 60 * 1000L); // Prepare auto end task
|
||||
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_FORTRESS_BATTLE_S1_HAS_BEGUN);
|
||||
sm.addCastleId(getFort().getResidenceId());
|
||||
@@ -664,7 +664,7 @@ public class FortSiege implements Siegable
|
||||
getFort().getSiege().announceToPlayer(SystemMessage.getSystemMessage(SystemMessageId.THE_BARRACKS_HAVE_BEEN_SEIZED));
|
||||
if (_siegeRestore == null)
|
||||
{
|
||||
_siegeRestore = ThreadPoolManager.schedule(new ScheduleSiegeRestore(), FortSiegeManager.getInstance().getCountDownLength() * 60 * 1000L);
|
||||
_siegeRestore = ThreadPool.schedule(new ScheduleSiegeRestore(), FortSiegeManager.getInstance().getCountDownLength() * 60 * 1000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -828,7 +828,7 @@ public class FortSiege implements Siegable
|
||||
saveFortSiege();
|
||||
clearSiegeClan(); // remove all clans
|
||||
// spawn suspicious merchant immediately
|
||||
ThreadPoolManager.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -836,33 +836,33 @@ public class FortSiege implements Siegable
|
||||
if (getAttackerClans().isEmpty())
|
||||
{
|
||||
// no attackers - waiting for suspicious merchant spawn
|
||||
ThreadPoolManager.schedule(new ScheduleSuspiciousMerchantSpawn(), delay);
|
||||
ThreadPool.schedule(new ScheduleSuspiciousMerchantSpawn(), delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
// preparing start siege task
|
||||
if (delay > 3600000) // more than hour, how this can happens ? spawn suspicious merchant
|
||||
{
|
||||
ThreadPoolManager.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), delay - 3600000);
|
||||
}
|
||||
if (delay > 600000) // more than 10 min, spawn suspicious merchant
|
||||
{
|
||||
ThreadPoolManager.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(600), delay - 600000);
|
||||
ThreadPool.execute(new ScheduleSuspiciousMerchantSpawn());
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(600), delay - 600000);
|
||||
}
|
||||
else if (delay > 300000)
|
||||
{
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(300), delay - 300000);
|
||||
}
|
||||
else if (delay > 60000)
|
||||
{
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), delay - 60000);
|
||||
}
|
||||
else
|
||||
{
|
||||
// lower than 1 min, set to 1 min
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(60), 0);
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(60), 0);
|
||||
}
|
||||
|
||||
_log.info("Siege of " + getFort().getName() + " fort: " + getFort().getSiegeDate().getTime());
|
||||
@@ -892,7 +892,7 @@ public class FortSiege implements Siegable
|
||||
}
|
||||
|
||||
// Execute siege auto start
|
||||
_siegeStartTask = ThreadPoolManager.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
|
||||
_siegeStartTask = ThreadPool.schedule(new FortSiege.ScheduleStartSiegeTask(3600), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.InstanceReenterType;
|
||||
@@ -197,7 +197,7 @@ public final class Instance
|
||||
_checkTimeUpTask.cancel(true);
|
||||
}
|
||||
|
||||
_checkTimeUpTask = ThreadPoolManager.schedule(new CheckTimeUp(duration), 500);
|
||||
_checkTimeUpTask = ThreadPool.schedule(new CheckTimeUp(duration), 500);
|
||||
_instanceEndTime = System.currentTimeMillis() + duration + 500;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ public final class Instance
|
||||
a = n.getAttributes().getNamedItem("val");
|
||||
if (a != null)
|
||||
{
|
||||
_checkTimeUpTask = ThreadPoolManager.schedule(new CheckTimeUp(Integer.parseInt(a.getNodeValue()) * 60000), 15000);
|
||||
_checkTimeUpTask = ThreadPool.schedule(new CheckTimeUp(Integer.parseInt(a.getNodeValue()) * 60000), 15000);
|
||||
_instanceEndTime = System.currentTimeMillis() + (Long.parseLong(a.getNodeValue()) * 60000) + 15000;
|
||||
}
|
||||
break;
|
||||
@@ -845,11 +845,11 @@ public final class Instance
|
||||
cancelTimer();
|
||||
if (remaining >= 10000)
|
||||
{
|
||||
_checkTimeUpTask = ThreadPoolManager.schedule(new CheckTimeUp(remaining), interval);
|
||||
_checkTimeUpTask = ThreadPool.schedule(new CheckTimeUp(remaining), interval);
|
||||
}
|
||||
else
|
||||
{
|
||||
_checkTimeUpTask = ThreadPoolManager.schedule(new TimeUp(), interval);
|
||||
_checkTimeUpTask = ThreadPool.schedule(new TimeUp(), interval);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ public final class Instance
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
_ejectDeadTasks.put(player.getObjectId(), ThreadPoolManager.schedule(() ->
|
||||
_ejectDeadTasks.put(player.getObjectId(), ThreadPool.schedule(() ->
|
||||
{
|
||||
if (player.isDead() && (player.getInstanceId() == getId()))
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import com.l2jmobius.gameserver.instancemanager.MailManager;
|
||||
@@ -145,7 +145,7 @@ public class Message
|
||||
_attachments = msg.getAttachments();
|
||||
msg.removeAttachments();
|
||||
_attachments.setNewMessageId(_messageId);
|
||||
_unloadTask = ThreadPoolManager.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
_unloadTask = ThreadPool.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
}
|
||||
|
||||
public static PreparedStatement getStatement(Message msg, Connection con) throws SQLException
|
||||
@@ -330,7 +330,7 @@ public class Message
|
||||
{
|
||||
_attachments = new Mail(_senderId, _messageId);
|
||||
_attachments.restore();
|
||||
_unloadTask = ThreadPoolManager.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
_unloadTask = ThreadPool.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
}
|
||||
return _attachments;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ public class Message
|
||||
|
||||
_attachments = new Mail(_senderId, _messageId);
|
||||
_hasAttachments = true;
|
||||
_unloadTask = ThreadPoolManager.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
_unloadTask = ThreadPool.schedule(new AttachmentsUnloadTask(this), UNLOAD_ATTACHMENTS_INTERVAL + Rnd.get(UNLOAD_ATTACHMENTS_INTERVAL));
|
||||
return _attachments;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
|
||||
@@ -147,7 +147,7 @@ public class NevitSystem implements IUniqueId
|
||||
{
|
||||
if ((_adventTask == null) && (getAdventTime() < Config.NEVIT_ADVENT_TIME))
|
||||
{
|
||||
_adventTask = ThreadPoolManager.schedule(new AdventTask(), 30000);
|
||||
_adventTask = ThreadPool.schedule(new AdventTask(), 30000);
|
||||
getPlayer().sendPacket(new ExNevitAdventTimeChange(getAdventTime(), false));
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public class NevitSystem implements IUniqueId
|
||||
getPlayer().sendPacket(new ExNevitAdventEffect(time));
|
||||
getPlayer().sendPacket(SystemMessageId.THE_ANGEL_NEVIT_HAS_BLESSED_YOU_FROM_ABOVE_YOU_ARE_IMBUED_WITH_FULL_VITALITY_AS_WELL_AS_A_VITALITY_REPLENISHING_EFFECT_AND_SHOULD_YOU_DIE_YOU_WILL_NOT_LOSE_EXP);
|
||||
getPlayer().startAbnormalVisualEffect(true, AbnormalVisualEffect.NAVIT_ADVENT);
|
||||
_nevitEffectTask = ThreadPoolManager.schedule(new NevitEffectEnd(), time * 1000L);
|
||||
_nevitEffectTask = ThreadPool.schedule(new NevitEffectEnd(), time * 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SiegeScheduleData;
|
||||
import com.l2jmobius.gameserver.enums.SiegeTeleportWhoType;
|
||||
@@ -102,35 +102,35 @@ public class Siege implements Siegable
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HOUR_S_UNTIL_CASTLE_SIEGE_CONCLUSION);
|
||||
sm.addInt(2);
|
||||
announceToPlayer(sm, true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 3600000); // Prepare task for 1 hr left.
|
||||
}
|
||||
else if ((timeRemaining <= 3600000) && (timeRemaining > 600000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_CASTLE_SIEGE_CONCLUSION);
|
||||
sm.addInt((int) timeRemaining / 60000);
|
||||
announceToPlayer(sm, true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_CASTLE_SIEGE_CONCLUSION);
|
||||
sm.addInt((int) timeRemaining / 60000);
|
||||
announceToPlayer(sm, true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_MINUTE_S_UNTIL_CASTLE_SIEGE_CONCLUSION);
|
||||
sm.addInt((int) timeRemaining / 60000);
|
||||
announceToPlayer(sm, true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_CASTLE_SIEGE_WILL_END_IN_S1_SECOND_S);
|
||||
sm.addInt((int) timeRemaining / 1000);
|
||||
announceToPlayer(sm, true);
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining); // Prepare task for second count down
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(_castleInst), timeRemaining); // Prepare task for second count down
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,7 +169,7 @@ public class Siege implements Siegable
|
||||
final long regTimeRemaining = getTimeRegistrationOverDate().getTimeInMillis() - Calendar.getInstance().getTimeInMillis();
|
||||
if (regTimeRemaining > 0)
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), regTimeRemaining);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), regTimeRemaining);
|
||||
return;
|
||||
}
|
||||
endTimeRegistration(true);
|
||||
@@ -178,7 +178,7 @@ public class Siege implements Siegable
|
||||
final long timeRemaining = getSiegeDate().getTimeInMillis() - Calendar.getInstance().getTimeInMillis();
|
||||
if (timeRemaining > 86400000)
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 86400000); // Prepare task for 24 before siege start to end registration
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 86400000); // Prepare task for 24 before siege start to end registration
|
||||
}
|
||||
else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000))
|
||||
{
|
||||
@@ -187,23 +187,23 @@ public class Siege implements Siegable
|
||||
Broadcast.toAllOnlinePlayers(sm);
|
||||
_isRegistrationOver = true;
|
||||
clearSiegeWaitingClan();
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 13600000); // Prepare task for 1 hr left before siege start.
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 13600000); // Prepare task for 1 hr left before siege start.
|
||||
}
|
||||
else if ((timeRemaining <= 13600000) && (timeRemaining > 600000))
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 600000); // Prepare task for 10 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 300000); // Prepare task for 5 minute left.
|
||||
}
|
||||
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 10000); // Prepare task for 10 seconds count down
|
||||
}
|
||||
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
|
||||
{
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining); // Prepare task for second count down
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new ScheduleStartSiegeTask(_castleInst), timeRemaining); // Prepare task for second count down
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -514,7 +514,7 @@ public class Siege implements Siegable
|
||||
// Schedule a task to prepare auto siege end
|
||||
_siegeEndDate = Calendar.getInstance();
|
||||
_siegeEndDate.add(Calendar.MINUTE, SiegeManager.getInstance().getSiegeLength());
|
||||
ThreadPoolManager.schedule(new ScheduleEndSiegeTask(getCastle()), 1000); // Prepare auto end task
|
||||
ThreadPool.schedule(new ScheduleEndSiegeTask(getCastle()), 1000); // Prepare auto end task
|
||||
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_S1_SIEGE_HAS_STARTED);
|
||||
sm.addCastleId(getCastle().getResidenceId());
|
||||
@@ -1027,7 +1027,7 @@ public class Siege implements Siegable
|
||||
{
|
||||
_scheduledStartSiegeTask.cancel(false);
|
||||
}
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1344,7 +1344,7 @@ public class Siege implements Siegable
|
||||
if (_scheduledStartSiegeTask != null)
|
||||
{
|
||||
_scheduledStartSiegeTask.cancel(true);
|
||||
_scheduledStartSiegeTask = ThreadPoolManager.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
_scheduledStartSiegeTask = ThreadPool.schedule(new Siege.ScheduleStartSiegeTask(getCastle()), 1000);
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
package com.l2jmobius.gameserver.model.entity;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.Team;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -45,7 +45,7 @@ public class TvTEventTeleporter implements Runnable
|
||||
_coordinates = coordinates;
|
||||
_adminRemove = adminRemove;
|
||||
|
||||
ThreadPoolManager.schedule(this, fastSchedule ? 0 : (TvTEvent.isStarted() ? Config.TVT_EVENT_RESPAWN_TELEPORT_DELAY : Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY) * 1000);
|
||||
ThreadPool.schedule(this, fastSchedule ? 0 : (TvTEvent.isStarted() ? Config.TVT_EVENT_RESPAWN_TELEPORT_DELAY : Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY) * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-6
@@ -21,7 +21,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ public class TvTManager
|
||||
if (nextStartTime != null)
|
||||
{
|
||||
_task = new TvTStartTask(nextStartTime.getTimeInMillis());
|
||||
ThreadPoolManager.execute(_task);
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -123,7 +123,7 @@ public class TvTManager
|
||||
|
||||
// schedule registration end
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000L * Config.TVT_EVENT_PARTICIPATION_TIME));
|
||||
ThreadPoolManager.execute(_task);
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class TvTManager
|
||||
{
|
||||
TvTEvent.sysMsgToAllParticipants("TvT Event: Teleporting participants to an arena in " + Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY + " second(s).");
|
||||
_task.setStartTime(System.currentTimeMillis() + (60000L * Config.TVT_EVENT_RUNNING_TIME));
|
||||
ThreadPoolManager.execute(_task);
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class TvTManager
|
||||
if (_task.nextRun.cancel(false))
|
||||
{
|
||||
_task.setStartTime(System.currentTimeMillis());
|
||||
ThreadPoolManager.execute(_task);
|
||||
ThreadPool.execute(_task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class TvTManager
|
||||
|
||||
if (delay > 0)
|
||||
{
|
||||
nextRun = ThreadPoolManager.schedule(this, nextMsg * 1000);
|
||||
nextRun = ThreadPool.schedule(this, nextMsg * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -21,8 +21,8 @@ import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||
@@ -111,22 +111,22 @@ public final class AuctionableHall extends ClanHall
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (_paidUntil > currentTime)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), _paidUntil - currentTime);
|
||||
ThreadPool.schedule(new FeeTask(), _paidUntil - currentTime);
|
||||
}
|
||||
else if (!_paid && !forced)
|
||||
{
|
||||
if ((System.currentTimeMillis() + (3600000 * 24)) <= (_paidUntil + _chRate))
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), System.currentTimeMillis() + (3600000 * 24));
|
||||
ThreadPool.schedule(new FeeTask(), System.currentTimeMillis() + (3600000 * 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public final class AuctionableHall extends ClanHall
|
||||
|
||||
if (_paidUntil > _time)
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), _paidUntil - _time);
|
||||
ThreadPool.schedule(new FeeTask(), _paidUntil - _time);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public final class AuctionableHall extends ClanHall
|
||||
_paidUntil = _time + _chRate;
|
||||
}
|
||||
ClanTable.getInstance().getClan(getOwnerId()).getWarehouse().destroyItemByItemId("CH_rental_fee", Inventory.ADENA_ID, getLease(), null, null);
|
||||
ThreadPoolManager.schedule(new FeeTask(), _paidUntil - _time);
|
||||
ThreadPool.schedule(new FeeTask(), _paidUntil - _time);
|
||||
_paid = true;
|
||||
updateDb();
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public final class AuctionableHall extends ClanHall
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), 3000);
|
||||
ThreadPool.schedule(new FeeTask(), 3000);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -196,11 +196,11 @@ public final class AuctionableHall extends ClanHall
|
||||
Clan.broadcastToOnlineMembers(sm);
|
||||
if ((_time + (3600000 * 24)) <= (_paidUntil + _chRate))
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), _time + (3600000 * 24));
|
||||
ThreadPool.schedule(new FeeTask(), _time + (3600000 * 24));
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.schedule(new FeeTask(), (_paidUntil + _chRate) - _time);
|
||||
ThreadPool.schedule(new FeeTask(), (_paidUntil + _chRate) - _time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -30,8 +30,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
|
||||
@@ -86,7 +86,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
_hall = CHSiegeManager.getInstance().getSiegableHall(hallId);
|
||||
_hall.setSiege(this);
|
||||
|
||||
_siegeTask = ThreadPoolManager.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000);
|
||||
_siegeTask = ThreadPool.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000);
|
||||
_log.config(_hall.getName() + " siege scheduled for " + getSiegeDate().getTime() + ".");
|
||||
loadAttackers();
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
Broadcast.toAllOnlinePlayers(msg);
|
||||
_hall.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
|
||||
|
||||
_siegeTask = ThreadPoolManager.schedule(new SiegeStarts(), 3600000);
|
||||
_siegeTask = ThreadPool.schedule(new SiegeStarts(), 3600000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,7 +305,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
onSiegeEnds();
|
||||
_attackers.clear();
|
||||
_hall.updateNextSiege();
|
||||
_siegeTask = ThreadPoolManager.schedule(new PrepareOwner(), _hall.getSiegeDate().getTimeInMillis());
|
||||
_siegeTask = ThreadPool.schedule(new PrepareOwner(), _hall.getSiegeDate().getTimeInMillis());
|
||||
_hall.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST);
|
||||
sm.addString(_hall.getName());
|
||||
@@ -337,7 +337,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
_hall.updateSiegeStatus(SiegeStatus.RUNNING);
|
||||
onSiegeStarts();
|
||||
_siegeTask = ThreadPoolManager.schedule(new SiegeEnds(), _hall.getSiegeLenght());
|
||||
_siegeTask = ThreadPool.schedule(new SiegeEnds(), _hall.getSiegeLenght());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -399,7 +399,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
onSiegeEnds();
|
||||
|
||||
_siegeTask = ThreadPoolManager.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000);
|
||||
_siegeTask = ThreadPool.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000);
|
||||
_log.config("Siege of " + _hall.getName() + " scheduled for " + _hall.getSiegeDate().getTime() + ".");
|
||||
|
||||
_hall.updateSiegeStatus(SiegeStatus.REGISTERING);
|
||||
@@ -410,7 +410,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
public void updateSiege()
|
||||
{
|
||||
cancelSiegeTask();
|
||||
_siegeTask = ThreadPoolManager.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - 3600000);
|
||||
_siegeTask = ThreadPool.schedule(new PrepareOwner(), _hall.getNextSiegeTime() - 3600000);
|
||||
_log.config(_hall.getName() + " siege scheduled for " + _hall.getSiegeDate().getTime() + ".");
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.AnnouncementsTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.EventDroplist;
|
||||
@@ -92,7 +92,7 @@ public class LongTimeEvent extends Quest
|
||||
else if (_eventPeriod.getStartDate().after(new Date()))
|
||||
{
|
||||
final long delay = _eventPeriod.getStartDate().getTime() - System.currentTimeMillis();
|
||||
ThreadPoolManager.schedule(new ScheduleStart(), delay);
|
||||
ThreadPool.schedule(new ScheduleStart(), delay);
|
||||
_log.info("Event " + _eventName + " will be started at " + _eventPeriod.getStartDate());
|
||||
}
|
||||
else
|
||||
@@ -283,7 +283,7 @@ public class LongTimeEvent extends Quest
|
||||
AnnouncementsTable.getInstance().addAnnouncement(new EventAnnouncement(_eventPeriod, _onEnterMsg));
|
||||
|
||||
// Schedule event end (now only for message sending)
|
||||
ThreadPoolManager.schedule(new ScheduleEnd(), millisToEventEnd);
|
||||
ThreadPool.schedule(new ScheduleEnd(), millisToEventEnd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import java.util.Queue;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
|
||||
import com.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
|
||||
import com.l2jmobius.gameserver.model.events.returns.AbstractEventReturn;
|
||||
@@ -115,7 +115,7 @@ public final class EventDispatcher
|
||||
|
||||
if (hasListeners)
|
||||
{
|
||||
ThreadPoolManager.execute(() -> notifyEventToMultipleContainers(event, containers, null));
|
||||
ThreadPool.execute(() -> notifyEventToMultipleContainers(event, containers, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public final class EventDispatcher
|
||||
{
|
||||
if (Containers.Global().hasListener(event.getType()) || container.hasListener(event.getType()))
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> notifyEvent(event, container, null), delay);
|
||||
ThreadPool.schedule(() -> notifyEvent(event, container, null), delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.fishing;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.FishingMonstersData;
|
||||
import com.l2jmobius.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -106,7 +106,7 @@ public class L2Fishing implements Runnable
|
||||
|
||||
if (_fishAiTask == null)
|
||||
{
|
||||
_fishAiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
|
||||
_fishAiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemAuctionManager;
|
||||
import com.l2jmobius.gameserver.model.ItemInfo;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -395,7 +395,7 @@ public final class ItemAuction
|
||||
|
||||
public final void broadcastToAllBidders(L2GameServerPacket packet)
|
||||
{
|
||||
ThreadPoolManager.execute(() -> broadcastToAllBiddersInternal(packet));
|
||||
ThreadPool.execute(() -> broadcastToAllBiddersInternal(packet));
|
||||
}
|
||||
|
||||
public final void broadcastToAllBiddersInternal(L2GameServerPacket packet)
|
||||
|
||||
+8
-8
@@ -39,8 +39,8 @@ import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.instancemanager.ItemAuctionManager;
|
||||
@@ -323,17 +323,17 @@ public final class ItemAuctionInstance
|
||||
{
|
||||
if (currentAuction.getAuctionState() == ItemAuctionState.STARTED)
|
||||
{
|
||||
setStateTask(ThreadPoolManager.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
}
|
||||
else
|
||||
{
|
||||
setStateTask(ThreadPoolManager.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(currentAuction), Math.max(currentAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
}
|
||||
_log.log(Level.INFO, getClass().getSimpleName() + ": Schedule current auction " + currentAuction.getAuctionId() + " for instance " + _instanceId);
|
||||
}
|
||||
else
|
||||
{
|
||||
setStateTask(ThreadPoolManager.schedule(new ScheduleAuctionTask(nextAuction), Math.max(nextAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(new ScheduleAuctionTask(nextAuction), Math.max(nextAuction.getStartingTime() - System.currentTimeMillis(), 0L)));
|
||||
_log.log(Level.INFO, getClass().getSimpleName() + ": Schedule next auction " + nextAuction.getAuctionId() + " on " + DATE_FORMAT.format(new Date(nextAuction.getStartingTime())) + " for instance " + _instanceId);
|
||||
}
|
||||
}
|
||||
@@ -416,7 +416,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() == ItemAuctionExtendState.INITIAL)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_5_MIN);
|
||||
setStateTask(ThreadPoolManager.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -426,7 +426,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_3_MIN)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_3_MIN);
|
||||
setStateTask(ThreadPoolManager.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -436,7 +436,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_B)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_B);
|
||||
setStateTask(ThreadPoolManager.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -446,7 +446,7 @@ public final class ItemAuctionInstance
|
||||
if (_auction.getScheduledAuctionEndingExtendState() != ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_A)
|
||||
{
|
||||
_auction.setScheduledAuctionEndingExtendState(ItemAuctionExtendState.EXTEND_BY_CONFIG_PHASE_A);
|
||||
setStateTask(ThreadPoolManager.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
setStateTask(ThreadPool.schedule(this, Math.max(_auction.getEndingTime() - System.currentTimeMillis(), 0L)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -32,8 +32,8 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemOptionsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.OptionData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
@@ -1371,7 +1371,7 @@ public final class L2ItemInstance extends L2Object
|
||||
return;
|
||||
}
|
||||
_consumingMana = true;
|
||||
ThreadPoolManager.schedule(new ScheduleConsumeManaTask(this), MANA_CONSUMPTION_RATE);
|
||||
ThreadPool.schedule(new ScheduleConsumeManaTask(this), MANA_CONSUMPTION_RATE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1583,7 +1583,7 @@ public final class L2ItemInstance extends L2Object
|
||||
|
||||
public final void dropMe(L2Character dropper, int x, int y, int z)
|
||||
{
|
||||
ThreadPoolManager.execute(new ItemDropTask(this, dropper, x, y, z));
|
||||
ThreadPool.execute(new ItemDropTask(this, dropper, x, y, z));
|
||||
if ((dropper != null) && dropper.isPlayer())
|
||||
{
|
||||
// Notify to scripts
|
||||
@@ -1864,7 +1864,7 @@ public final class L2ItemInstance extends L2Object
|
||||
{
|
||||
_lifeTimeTask.cancel(false);
|
||||
}
|
||||
_lifeTimeTask = ThreadPoolManager.schedule(new ScheduleLifeTimeTask(this), getRemainingTime());
|
||||
_lifeTimeTask = ThreadPool.schedule(new ScheduleLifeTimeTask(this), getRemainingTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -37,8 +37,8 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -236,7 +236,7 @@ public class Olympiad extends ListenersContainer
|
||||
if (_validationEnd > Calendar.getInstance().getTimeInMillis())
|
||||
{
|
||||
loadNoblesRank();
|
||||
_scheduledValdationTask = ThreadPoolManager.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
_scheduledValdationTask = ThreadPool.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -420,7 +420,7 @@ public class Olympiad extends ListenersContainer
|
||||
_scheduledOlympiadEnd.cancel(true);
|
||||
}
|
||||
|
||||
_scheduledOlympiadEnd = ThreadPoolManager.schedule(new OlympiadEndTask(HEROS_TO_BE), getMillisToOlympiadEnd());
|
||||
_scheduledOlympiadEnd = ThreadPool.schedule(new OlympiadEndTask(HEROS_TO_BE), getMillisToOlympiadEnd());
|
||||
|
||||
updateCompStatus();
|
||||
}
|
||||
@@ -462,7 +462,7 @@ public class Olympiad extends ListenersContainer
|
||||
_validationEnd = validationEnd.getTimeInMillis() + VALIDATION_PERIOD;
|
||||
|
||||
loadNoblesRank();
|
||||
_scheduledValdationTask = ThreadPoolManager.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
_scheduledValdationTask = ThreadPool.schedule(new ValidationEndTask(), getMillisToValidationEnd());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@ public class Olympiad extends ListenersContainer
|
||||
_log.info("Olympiad System: Event starts/started : " + _compStart.getTime());
|
||||
}
|
||||
|
||||
_scheduledCompStart = ThreadPoolManager.schedule(() ->
|
||||
_scheduledCompStart = ThreadPool.schedule(() ->
|
||||
{
|
||||
if (isOlympiadEnd())
|
||||
{
|
||||
@@ -523,19 +523,19 @@ public class Olympiad extends ListenersContainer
|
||||
_log.info("Olympiad System: Olympiad Game Started");
|
||||
_logResults.info("Result,Player1,Player2,Player1 HP,Player2 HP,Player1 Damage,Player2 Damage,Points,Classed");
|
||||
|
||||
_gameManager = ThreadPoolManager.scheduleAtFixedRate(OlympiadGameManager.getInstance(), 30000, 30000);
|
||||
_gameManager = ThreadPool.scheduleAtFixedRate(OlympiadGameManager.getInstance(), 30000, 30000);
|
||||
if (Config.ALT_OLY_ANNOUNCE_GAMES)
|
||||
{
|
||||
_gameAnnouncer = ThreadPoolManager.scheduleAtFixedRate(new OlympiadAnnouncer(), 30000, 500);
|
||||
_gameAnnouncer = ThreadPool.scheduleAtFixedRate(new OlympiadAnnouncer(), 30000, 500);
|
||||
}
|
||||
|
||||
final long regEnd = getMillisToCompEnd() - 600000;
|
||||
if (regEnd > 0)
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> Broadcast.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.THE_GRAND_OLYMPIAD_REGISTRATION_PERIOD_HAS_ENDED)), regEnd);
|
||||
ThreadPool.schedule(() -> Broadcast.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.THE_GRAND_OLYMPIAD_REGISTRATION_PERIOD_HAS_ENDED)), regEnd);
|
||||
}
|
||||
|
||||
_scheduledCompEnd = ThreadPoolManager.schedule(() ->
|
||||
_scheduledCompEnd = ThreadPool.schedule(() ->
|
||||
{
|
||||
if (isOlympiadEnd())
|
||||
{
|
||||
@@ -590,7 +590,7 @@ public class Olympiad extends ListenersContainer
|
||||
_scheduledOlympiadEnd.cancel(true);
|
||||
}
|
||||
|
||||
_scheduledOlympiadEnd = ThreadPoolManager.schedule(new OlympiadEndTask(HEROS_TO_BE), 0);
|
||||
_scheduledOlympiadEnd = ThreadPool.schedule(new OlympiadEndTask(HEROS_TO_BE), 0);
|
||||
}
|
||||
|
||||
protected long getMillisToValidationEnd()
|
||||
@@ -769,7 +769,7 @@ public class Olympiad extends ListenersContainer
|
||||
|
||||
private void scheduleWeeklyChange()
|
||||
{
|
||||
_scheduledWeeklyTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_scheduledWeeklyTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
addWeeklyPoints();
|
||||
_log.info("Olympiad System: Added weekly points to nobles");
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2OlympiadStadiumZone;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -160,7 +160,7 @@ public final class OlympiadGameTask implements Runnable
|
||||
_game = game;
|
||||
_state = GameState.BEGIN;
|
||||
_needAnnounce = false;
|
||||
ThreadPoolManager.execute(this);
|
||||
ThreadPool.execute(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -315,7 +315,7 @@ public final class OlympiadGameTask implements Runnable
|
||||
return;
|
||||
}
|
||||
}
|
||||
ThreadPoolManager.schedule(this, delay * 1000);
|
||||
ThreadPool.schedule(this, delay * 1000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -335,7 +335,7 @@ public final class OlympiadGameTask implements Runnable
|
||||
|
||||
_log.log(Level.WARNING, "Exception in " + _state + ", trying to port players back: " + e.getMessage(), e);
|
||||
_state = GameState.GAME_STOPPED;
|
||||
ThreadPoolManager.schedule(this, 1000);
|
||||
ThreadPool.schedule(this, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import com.l2jmobius.gameserver.model.L2Party;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -405,7 +405,7 @@ public class OlympiadManager
|
||||
if ((team != null) && team.contains(objId))
|
||||
{
|
||||
_teamsBasedRegisters.remove(team);
|
||||
ThreadPoolManager.execute(new AnnounceUnregToTeam(team));
|
||||
ThreadPool.execute(new AnnounceUnregToTeam(team));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -437,7 +437,7 @@ public class OlympiadManager
|
||||
if ((team != null) && team.contains(objId))
|
||||
{
|
||||
_teamsBasedRegisters.remove(team);
|
||||
ThreadPoolManager.execute(new AnnounceUnregToTeam(team));
|
||||
ThreadPool.execute(new AnnounceUnregToTeam(team));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.handler.IPunishmentHandler;
|
||||
import com.l2jmobius.gameserver.handler.PunishmentHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
|
||||
@@ -147,7 +147,7 @@ public class PunishmentTask implements Runnable
|
||||
onStart();
|
||||
if (_expirationTime > 0) // Has expiration?
|
||||
{
|
||||
_task = ThreadPoolManager.schedule(this, _expirationTime - System.currentTimeMillis());
|
||||
_task = ThreadPool.schedule(this, _expirationTime - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user