GameTimeController class is a task manager.
This commit is contained in:
@@ -120,6 +120,7 @@ import org.l2jmobius.gameserver.network.ClientNetworkManager;
|
||||
import org.l2jmobius.gameserver.script.EventDroplist;
|
||||
import org.l2jmobius.gameserver.script.faenor.FaenorScriptEngine;
|
||||
import org.l2jmobius.gameserver.scripting.ScriptEngineManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.TaskManager;
|
||||
import org.l2jmobius.gameserver.ui.Gui;
|
||||
@@ -198,7 +199,7 @@ public class GameServer
|
||||
TeleportLocationTable.getInstance();
|
||||
PartyMatchWaitingList.getInstance();
|
||||
PartyMatchRoomList.getInstance();
|
||||
GameTimeController.getInstance();
|
||||
GameTimeTaskManager.getInstance();
|
||||
CharNameTable.getInstance();
|
||||
ExperienceData.getInstance();
|
||||
|
||||
|
@@ -46,6 +46,7 @@ import org.l2jmobius.gameserver.network.serverpackets.RecipeShopItemInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
public class RecipeController
|
||||
@@ -355,7 +356,7 @@ public class RecipeController
|
||||
if (!_items.isEmpty())
|
||||
{
|
||||
// divided by RATE_CONSUMABLES_COST to remove craft time increase on higher consumables rates
|
||||
_delay = (int) ((Config.ALT_GAME_CREATION_SPEED * _player.getMReuseRate(_skill) * GameTimeController.TICKS_PER_SECOND) / Config.RATE_CONSUMABLE_COST) * GameTimeController.MILLIS_IN_TICK;
|
||||
_delay = (int) ((Config.ALT_GAME_CREATION_SPEED * _player.getMReuseRate(_skill) * GameTimeTaskManager.TICKS_PER_SECOND) / Config.RATE_CONSUMABLE_COST) * GameTimeTaskManager.MILLIS_IN_TICK;
|
||||
|
||||
// Show crafting animation.
|
||||
_player.broadcastPacket(new MagicSkillUse(_player, _player, _skillId, _skillLevel, _delay, 0));
|
||||
|
@@ -43,6 +43,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.loginserverpackets.game.ServerStatus;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerClose;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
@@ -317,7 +318,7 @@ public class Shutdown extends Thread
|
||||
|
||||
try
|
||||
{
|
||||
GameTimeController.getInstance().stopTimer();
|
||||
GameTimeTaskManager.getInstance().stopTimer();
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
@@ -20,7 +20,6 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ATTACK;
|
||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_FOLLOW;
|
||||
import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@@ -42,6 +41,7 @@ import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopRotation;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.CreatureFollowTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* Mother class of all objects AI in the world.<br>
|
||||
@@ -445,7 +445,7 @@ abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_clientMovingToPawnOffset == offset)
|
||||
{
|
||||
if (GameTimeController.getGameTicks() < _moveToPawnTimeout)
|
||||
if (GameTimeTaskManager.getGameTicks() < _moveToPawnTimeout)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -455,7 +455,7 @@ abstract class AbstractAI implements Ctrl
|
||||
else if (_actor.isOnGeodataPath())
|
||||
{
|
||||
// minimum time to calculate new route is 2 seconds
|
||||
if (GameTimeController.getGameTicks() < (_moveToPawnTimeout + 10))
|
||||
if (GameTimeTaskManager.getGameTicks() < (_moveToPawnTimeout + 10))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -468,8 +468,8 @@ abstract class AbstractAI implements Ctrl
|
||||
|
||||
setTarget(pawn);
|
||||
|
||||
_moveToPawnTimeout = GameTimeController.getGameTicks();
|
||||
_moveToPawnTimeout += /* 1000 */ 200 / GameTimeController.MILLIS_IN_TICK;
|
||||
_moveToPawnTimeout = GameTimeTaskManager.getGameTicks();
|
||||
_moveToPawnTimeout += /* 1000 */ 200 / GameTimeTaskManager.MILLIS_IN_TICK;
|
||||
|
||||
if ((pawn == null) || (_accessor == null))
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ import java.util.Collection;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.data.sql.TerritoryTable;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.instancemanager.DimensionalRiftManager;
|
||||
@@ -57,6 +56,7 @@ import org.l2jmobius.gameserver.model.quest.EventType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackableThinkTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* This class manages AI of Attackable.
|
||||
@@ -359,7 +359,7 @@ public class AttackableAI extends CreatureAI
|
||||
protected void onIntentionAttack(Creature target)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event
|
||||
super.onIntentionAttack(target);
|
||||
@@ -656,7 +656,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
}
|
||||
|
||||
if (_attackTimeout < GameTimeController.getGameTicks())
|
||||
if (_attackTimeout < GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
// Check if the actor is running
|
||||
if (_actor.isRunning())
|
||||
@@ -665,13 +665,13 @@ public class AttackableAI extends CreatureAI
|
||||
_actor.setWalking();
|
||||
|
||||
// Calculate a new attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
}
|
||||
|
||||
// Check if target is dead or if timeout is expired to stop this attack
|
||||
final Creature originalAttackTarget = getAttackTarget();
|
||||
if ((originalAttackTarget == null) || originalAttackTarget.isAlikeDead() || ((originalAttackTarget instanceof PlayerInstance) && (((PlayerInstance) originalAttackTarget).isInOfflineMode() || !((PlayerInstance) originalAttackTarget).isOnline())) || (_attackTimeout < GameTimeController.getGameTicks()))
|
||||
if ((originalAttackTarget == null) || originalAttackTarget.isAlikeDead() || ((originalAttackTarget instanceof PlayerInstance) && (((PlayerInstance) originalAttackTarget).isInOfflineMode() || !((PlayerInstance) originalAttackTarget).isOnline())) || (_attackTimeout < GameTimeTaskManager.getGameTicks()))
|
||||
{
|
||||
// Stop hating this target after the attack timeout or if target is dead
|
||||
if (originalAttackTarget != null)
|
||||
@@ -942,7 +942,7 @@ public class AttackableAI extends CreatureAI
|
||||
return;
|
||||
}
|
||||
// Else, if this is close enough to attack
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// check for close combat skills && heal/buff skills
|
||||
if (!_actor.isMuted() /* && _rnd.nextInt(100) <= 5 */)
|
||||
@@ -1044,7 +1044,7 @@ public class AttackableAI extends CreatureAI
|
||||
protected void onEvtAttacked(Creature attacker)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the _globalAggro to 0 to permit attack even just after spawn
|
||||
if (_globalAggro < 0)
|
||||
|
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
@@ -44,6 +43,7 @@ import org.l2jmobius.gameserver.model.actor.instance.FolkInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FortSiegeGuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -258,7 +258,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
protected void onIntentionAttack(Creature target)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event
|
||||
// if (_actor.getTarget() != null)
|
||||
@@ -372,18 +372,18 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
private void thinkAttack()
|
||||
{
|
||||
// Check if the actor is running
|
||||
if ((_attackTimeout < GameTimeController.getGameTicks()) && _actor.isRunning())
|
||||
if ((_attackTimeout < GameTimeTaskManager.getGameTicks()) && _actor.isRunning())
|
||||
{
|
||||
// Set the actor movement type to walk and send Server->Client packet ChangeMoveType to all others PlayerInstance
|
||||
_actor.setWalking();
|
||||
|
||||
// Calculate a new attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
final Creature attackTarget = getAttackTarget();
|
||||
// Check if target is dead or if timeout is expired to stop this attack
|
||||
if ((attackTarget == null) || attackTarget.isAlikeDead() || (_attackTimeout < GameTimeController.getGameTicks()))
|
||||
if ((attackTarget == null) || attackTarget.isAlikeDead() || (_attackTimeout < GameTimeTaskManager.getGameTicks()))
|
||||
{
|
||||
// Stop hating this target after the attack timeout or if target is dead
|
||||
if (attackTarget != null)
|
||||
@@ -766,7 +766,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
attackTarget = hated;
|
||||
}
|
||||
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// check for close combat skills && heal/buff skills
|
||||
if (!_actor.isMuted() && (Rnd.get(100) <= 5))
|
||||
@@ -864,7 +864,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
protected void onEvtAttacked(Creature attacker)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the _globalAggro to 0 to permit attack even just after spawn
|
||||
if (_globalAggro < 0)
|
||||
|
@@ -26,7 +26,6 @@ import java.util.concurrent.Future;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
@@ -40,6 +39,7 @@ import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeGuardInstance;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* This class manages AI of Attackable.
|
||||
@@ -211,7 +211,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
protected void onIntentionAttack(Creature target)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event
|
||||
// if (_actor.getTarget() != null)
|
||||
@@ -463,7 +463,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
setAttackTarget(hated);
|
||||
}
|
||||
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// check for close combat skills && heal/buff skills
|
||||
if (!_actor.isMuted() && (Rnd.get(100) <= 5))
|
||||
@@ -525,19 +525,19 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
private void thinkAttack()
|
||||
{
|
||||
// Check if the actor is running
|
||||
if ((_attackTimeout < GameTimeController.getGameTicks()) && _actor.isRunning())
|
||||
if ((_attackTimeout < GameTimeTaskManager.getGameTicks()) && _actor.isRunning())
|
||||
{
|
||||
// Set the actor movement type to walk and send Server->Client packet ChangeMoveType to all others PlayerInstance
|
||||
_actor.setWalking();
|
||||
|
||||
// Calculate a new attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
final Creature attackTarget = getAttackTarget();
|
||||
|
||||
// Check if target is dead or if timeout is expired to stop this attack
|
||||
if ((attackTarget == null) || attackTarget.isAlikeDead() || (_attackTimeout < GameTimeController.getGameTicks()))
|
||||
if ((attackTarget == null) || attackTarget.isAlikeDead() || (_attackTimeout < GameTimeTaskManager.getGameTicks()))
|
||||
{
|
||||
// Stop hating this target after the attack timeout or if target is dead
|
||||
if (attackTarget != null)
|
||||
@@ -671,7 +671,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
protected void onEvtAttacked(Creature attacker)
|
||||
{
|
||||
// Calculate the attack timeout
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeController.getGameTicks();
|
||||
_attackTimeout = MAX_ATTACK_TIMEOUT + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the _globalAggro to 0 to permit attack even just after spawn
|
||||
if (_globalAggro < 0)
|
||||
|
@@ -21,12 +21,12 @@ import java.util.Calendar;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.Shutdown;
|
||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ public class AdminShutdown implements IAdminCommandHandler
|
||||
private void sendHtmlForm(PlayerInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
|
||||
final int t = GameTimeController.getInstance().getGameTime();
|
||||
final int t = GameTimeTaskManager.getInstance().getGameTime();
|
||||
final int h = t / 60;
|
||||
final int m = t % 60;
|
||||
final SimpleDateFormat format = new SimpleDateFormat("h:mm");
|
||||
|
@@ -18,7 +18,6 @@ package org.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
@@ -38,6 +37,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
public class ScrollOfEscape implements IItemHandler
|
||||
{
|
||||
@@ -207,7 +207,7 @@ public class ScrollOfEscape implements IItemHandler
|
||||
// Continue execution later.
|
||||
final EscapeFinalizer escapeFinalizer = new EscapeFinalizer(player, itemId);
|
||||
player.setSkillCast(ThreadPool.schedule(escapeFinalizer, hitTime));
|
||||
player.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (hitTime / GameTimeController.MILLIS_IN_TICK));
|
||||
player.setSkillCastEndTime(10 + GameTimeTaskManager.getGameTicks() + (hitTime / GameTimeTaskManager.MILLIS_IN_TICK));
|
||||
}
|
||||
|
||||
static class EscapeFinalizer implements Runnable
|
||||
|
@@ -18,7 +18,6 @@ package org.l2jmobius.gameserver.handler.usercommandhandlers;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.handler.IUserCommandHandler;
|
||||
@@ -30,6 +29,7 @@ import org.l2jmobius.gameserver.instancemanager.events.VIP;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
public class Escape implements IUserCommandHandler
|
||||
@@ -143,7 +143,7 @@ public class Escape implements IUserCommandHandler
|
||||
// Continue execution later.
|
||||
final EscapeFinalizer escapeFinalizer = new EscapeFinalizer(player);
|
||||
player.setSkillCast(ThreadPool.schedule(escapeFinalizer, unstuckTimer));
|
||||
player.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (unstuckTimer / GameTimeController.MILLIS_IN_TICK));
|
||||
player.setSkillCastEndTime(10 + GameTimeTaskManager.getGameTicks() + (unstuckTimer / GameTimeTaskManager.MILLIS_IN_TICK));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.handler.usercommandhandlers;
|
||||
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.handler.IUserCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
public class Time implements IUserCommandHandler
|
||||
{
|
||||
@@ -37,7 +37,7 @@ public class Time implements IUserCommandHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
final int t = GameTimeController.getInstance().getGameTime();
|
||||
final int t = GameTimeTaskManager.getInstance().getGameTime();
|
||||
final String h = "" + ((t / 60) % 24);
|
||||
String m;
|
||||
if ((t % 60) < 10)
|
||||
@@ -50,7 +50,7 @@ public class Time implements IUserCommandHandler
|
||||
}
|
||||
|
||||
SystemMessage sm;
|
||||
if (GameTimeController.getInstance().isNight())
|
||||
if (GameTimeTaskManager.getInstance().isNight())
|
||||
{
|
||||
sm = new SystemMessage(SystemMessageId.THE_CURRENT_TIME_IS_S1_S2_IN_THE_NIGHT);
|
||||
sm.addString(h);
|
||||
|
@@ -20,7 +20,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
|
||||
@@ -40,6 +39,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ConfirmDlg;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
public class Wedding implements IVoicedCommandHandler
|
||||
@@ -374,7 +374,7 @@ public class Wedding implements IVoicedCommandHandler
|
||||
// Continue execution later.
|
||||
final EscapeFinalizer escapeFinalizer = new EscapeFinalizer(activeChar, partner.getX(), partner.getY(), partner.getZ(), partner.isIn7sDungeon());
|
||||
activeChar.setSkillCast(ThreadPool.schedule(escapeFinalizer, teleportTimer));
|
||||
activeChar.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + (teleportTimer / GameTimeController.MILLIS_IN_TICK));
|
||||
activeChar.setSkillCastEndTime(10 + GameTimeTaskManager.getGameTicks() + (teleportTimer / GameTimeTaskManager.MILLIS_IN_TICK));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.enums.RaidBossStatus;
|
||||
@@ -41,6 +40,7 @@ import org.l2jmobius.gameserver.model.actor.instance.RaidBossInstance;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* @author godson
|
||||
@@ -180,7 +180,7 @@ public class DayNightSpawnManager
|
||||
{
|
||||
try
|
||||
{
|
||||
changeMode(GameTimeController.getInstance().isNight() ? 1 : 0);
|
||||
changeMode(GameTimeTaskManager.getInstance().isNight() ? 1 : 0);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -290,7 +290,7 @@ public class DayNightSpawnManager
|
||||
return _bosses.get(spawnDat);
|
||||
}
|
||||
|
||||
if (GameTimeController.getInstance().isNight())
|
||||
if (GameTimeTaskManager.getInstance().isNight())
|
||||
{
|
||||
final RaidBossInstance raidboss = (RaidBossInstance) spawnDat.doSpawn();
|
||||
_bosses.put(spawnDat, raidboss);
|
||||
|
@@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -38,6 +37,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExOlympiadSpelledInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicEffectIcons;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PartySpelled;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
public abstract class Effect
|
||||
{
|
||||
@@ -158,7 +158,7 @@ public abstract class Effect
|
||||
{
|
||||
if (_periodfirsttime == 0)
|
||||
{
|
||||
setPeriodStartTicks(GameTimeController.getGameTicks());
|
||||
setPeriodStartTicks(GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -207,7 +207,7 @@ public abstract class Effect
|
||||
_abnormalEffect = template.abnormalEffect;
|
||||
_stackType = template.stackType;
|
||||
_stackOrder = template.stackOrder;
|
||||
_periodStartTicks = GameTimeController.getGameTicks();
|
||||
_periodStartTicks = GameTimeTaskManager.getGameTicks();
|
||||
_periodfirsttime = 0;
|
||||
scheduleEffect();
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public abstract class Effect
|
||||
{
|
||||
if (_currentFuture != null)
|
||||
{
|
||||
_periodStartTicks = GameTimeController.getGameTicks() - (newfirsttime * GameTimeController.TICKS_PER_SECOND);
|
||||
_periodStartTicks = GameTimeTaskManager.getGameTicks() - (newfirsttime * GameTimeTaskManager.TICKS_PER_SECOND);
|
||||
_currentFuture.cancel(false);
|
||||
_currentFuture = null;
|
||||
_currentTask = null;
|
||||
@@ -249,7 +249,7 @@ public abstract class Effect
|
||||
|
||||
public int getTime()
|
||||
{
|
||||
return (GameTimeController.getGameTicks() - _periodStartTicks) / GameTimeController.TICKS_PER_SECOND;
|
||||
return (GameTimeTaskManager.getGameTicks() - _periodStartTicks) / GameTimeTaskManager.TICKS_PER_SECOND;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model;
|
||||
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* A datatype used to retain a fish information.
|
||||
@@ -75,7 +75,7 @@ public class Fish
|
||||
|
||||
public int getType(boolean isLureNight)
|
||||
{
|
||||
if (!GameTimeController.getInstance().isNight() && isLureNight)
|
||||
if (!GameTimeTaskManager.getInstance().isNight() && isLureNight)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ import java.util.concurrent.Future;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -48,6 +47,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PartySmallWindowAll;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PartySmallWindowDelete;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PartySmallWindowDeleteAll;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -128,7 +128,7 @@ public class Party
|
||||
public void setPendingInvitation(boolean value)
|
||||
{
|
||||
_pendingInvitation = value;
|
||||
_pendingInviteTimeout = GameTimeController.getGameTicks() + (PlayerInstance.REQUEST_TIMEOUT * GameTimeController.TICKS_PER_SECOND);
|
||||
_pendingInviteTimeout = GameTimeTaskManager.getGameTicks() + (PlayerInstance.REQUEST_TIMEOUT * GameTimeTaskManager.TICKS_PER_SECOND);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +138,7 @@ public class Party
|
||||
*/
|
||||
public boolean isInvitationRequestExpired()
|
||||
{
|
||||
return (_pendingInviteTimeout <= GameTimeController.getGameTicks());
|
||||
return (_pendingInviteTimeout <= GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -32,7 +32,6 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.ai.AttackableAI;
|
||||
import org.l2jmobius.gameserver.ai.CreatureAI;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
@@ -132,6 +131,7 @@ import org.l2jmobius.gameserver.network.serverpackets.TargetUnselected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocationInVehicle;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -841,7 +841,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Verify if the bow can be use
|
||||
if (_disableBowAttackEndTime <= GameTimeController.getGameTicks())
|
||||
if (_disableBowAttackEndTime <= GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
// Verify if PlayerInstance owns enough MP
|
||||
final int saMpConsume = (int) getStat().calcStat(Stat.MP_CONSUME, 0, null, null);
|
||||
@@ -858,7 +858,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
getStatus().reduceMp(mpConsume);
|
||||
|
||||
// Set the period of bow non re-use
|
||||
_disableBowAttackEndTime = (5 * GameTimeController.TICKS_PER_SECOND) + GameTimeController.getGameTicks();
|
||||
_disableBowAttackEndTime = (5 * GameTimeTaskManager.TICKS_PER_SECOND) + GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -870,7 +870,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
else if (this instanceof NpcInstance)
|
||||
{
|
||||
if (_disableBowAttackEndTime > GameTimeController.getGameTicks())
|
||||
if (_disableBowAttackEndTime > GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -917,8 +917,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// the hit is calculated to happen halfway to the animation - might need further tuning e.g. in bow case
|
||||
final int timeAtk = calculateTimeBetweenAttacks(target, weaponItem);
|
||||
final int timeToHit = timeAtk / 2;
|
||||
_attackEndTime = GameTimeController.getGameTicks();
|
||||
_attackEndTime += (timeAtk / GameTimeController.MILLIS_IN_TICK);
|
||||
_attackEndTime = GameTimeTaskManager.getGameTicks();
|
||||
_attackEndTime += (timeAtk / GameTimeTaskManager.MILLIS_IN_TICK);
|
||||
_attackEndTime -= 1;
|
||||
int ssGrade = 0;
|
||||
if (weaponItem != null)
|
||||
@@ -1086,7 +1086,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
ThreadPool.schedule(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk);
|
||||
|
||||
// Calculate and set the disable delay of the bow in function of the Attack Speed
|
||||
_disableBowAttackEndTime = ((sAtk + reuse) / GameTimeController.MILLIS_IN_TICK) + GameTimeController.getGameTicks();
|
||||
_disableBowAttackEndTime = ((sAtk + reuse) / GameTimeTaskManager.MILLIS_IN_TICK) + GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Add this hit to the Server-Client packet Attack
|
||||
attack.addHit(target, damage1, miss1, crit1, shld1);
|
||||
@@ -1524,14 +1524,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
if (skill.isPotion())
|
||||
{
|
||||
// Set the _castEndTime and _castInterruptTim. +10 ticks for lag situations, will be reseted in onMagicFinalizer
|
||||
_castPotionEndTime = 10 + GameTimeController.getGameTicks() + ((coolTime + hitTime) / GameTimeController.MILLIS_IN_TICK);
|
||||
_castPotionInterruptTime = -2 + GameTimeController.getGameTicks() + (hitTime / GameTimeController.MILLIS_IN_TICK);
|
||||
_castPotionEndTime = 10 + GameTimeTaskManager.getGameTicks() + ((coolTime + hitTime) / GameTimeTaskManager.MILLIS_IN_TICK);
|
||||
_castPotionInterruptTime = -2 + GameTimeTaskManager.getGameTicks() + (hitTime / GameTimeTaskManager.MILLIS_IN_TICK);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the _castEndTime and _castInterruptTim. +10 ticks for lag situations, will be reseted in onMagicFinalizer
|
||||
_castEndTime = 10 + GameTimeController.getGameTicks() + ((coolTime + hitTime) / GameTimeController.MILLIS_IN_TICK);
|
||||
_castInterruptTime = -2 + GameTimeController.getGameTicks() + (hitTime / GameTimeController.MILLIS_IN_TICK);
|
||||
_castEndTime = 10 + GameTimeTaskManager.getGameTicks() + ((coolTime + hitTime) / GameTimeTaskManager.MILLIS_IN_TICK);
|
||||
_castInterruptTime = -2 + GameTimeTaskManager.getGameTicks() + (hitTime / GameTimeTaskManager.MILLIS_IN_TICK);
|
||||
}
|
||||
|
||||
// Init the reuse time of the skill
|
||||
@@ -2134,7 +2134,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
{
|
||||
return _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || (_attackEndTime > GameTimeController.getGameTicks()) || _isFakeDeath || _isParalyzed || _isAttackDisabled;
|
||||
return _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || (_attackEndTime > GameTimeTaskManager.getGameTicks()) || _isFakeDeath || _isParalyzed || _isAttackDisabled;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4840,7 +4840,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return _castEndTime > GameTimeController.getGameTicks();
|
||||
return _castEndTime > GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4849,7 +4849,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public boolean isCastingPotionNow()
|
||||
{
|
||||
return _castPotionEndTime > GameTimeController.getGameTicks();
|
||||
return _castPotionEndTime > GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4858,7 +4858,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public boolean canAbortCast()
|
||||
{
|
||||
return _castInterruptTime > GameTimeController.getGameTicks();
|
||||
return _castInterruptTime > GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4867,7 +4867,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public boolean isAttackingNow()
|
||||
{
|
||||
return _attackEndTime > GameTimeController.getGameTicks();
|
||||
return _attackEndTime > GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5052,7 +5052,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
}
|
||||
|
||||
final double distPassed = (speed * (gameTicks - m._moveTimestamp)) / GameTimeController.TICKS_PER_SECOND;
|
||||
final double distPassed = (speed * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
||||
if ((((dx * dx) + (dy * dy)) < 10000) && ((dz * dz) > 2500)) // close enough, allows error between client and server geodata if it cannot be avoided
|
||||
{
|
||||
distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy));
|
||||
@@ -5561,7 +5561,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
|
||||
// Calculate the number of ticks between the current position and the destination
|
||||
// One tick added for rounding reasons
|
||||
final int ticksToMove = 1 + (int) ((GameTimeController.TICKS_PER_SECOND * distance) / speed);
|
||||
final int ticksToMove = 1 + (int) ((GameTimeTaskManager.TICKS_PER_SECOND * distance) / speed);
|
||||
m._target = target;
|
||||
m._xDestination = x;
|
||||
m._yDestination = y;
|
||||
@@ -5576,17 +5576,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
setHeading(Util.calculateHeadingFrom(cos, sin));
|
||||
}
|
||||
|
||||
m._moveStartTime = GameTimeController.getGameTicks();
|
||||
m._moveStartTime = GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
GameTimeController.getInstance().registerMovingObject(this);
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
|
||||
if ((ticksToMove * GameTimeTaskManager.MILLIS_IN_TICK) > 3000)
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
@@ -5654,19 +5654,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
|
||||
// Calculate the number of ticks between the current position and the destination
|
||||
// One tick added for rounding reasons
|
||||
final int ticksToMove = 1 + (int) ((GameTimeController.TICKS_PER_SECOND * distance) / speed);
|
||||
final int ticksToMove = 1 + (int) ((GameTimeTaskManager.TICKS_PER_SECOND * distance) / speed);
|
||||
m._heading = 0; // initial value for coordinate sync
|
||||
m._moveStartTime = GameTimeController.getGameTicks();
|
||||
m._moveStartTime = GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
GameTimeController.getInstance().registerMovingObject(this);
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
|
||||
// Create a task to notify the AI that Creature arrives at a check point of the movement
|
||||
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
|
||||
if ((ticksToMove * GameTimeTaskManager.MILLIS_IN_TICK) > 3000)
|
||||
{
|
||||
ThreadPool.schedule(new NotifyAITask(CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.knownlist.BoatKnownList;
|
||||
@@ -37,6 +36,7 @@ import org.l2jmobius.gameserver.network.serverpackets.OnVehicleCheckLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleDeparture;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* @author Maktakien
|
||||
@@ -92,14 +92,14 @@ public class BoatInstance extends Creature
|
||||
m._zDestination = z; // this is what was requested from client
|
||||
m._heading = 0;
|
||||
m.onGeodataPathIndex = -1; // Initialize not on geodata path
|
||||
m._moveStartTime = GameTimeController.getGameTicks();
|
||||
m._moveStartTime = GameTimeTaskManager.getGameTicks();
|
||||
|
||||
// Set the Creature _move object to MoveData object
|
||||
_move = m;
|
||||
|
||||
// Add the Creature to movingObjects of the GameTimeController
|
||||
// The GameTimeController manage objects movement
|
||||
GameTimeController.getInstance().registerMovingObject(this);
|
||||
GameTimeTaskManager.getInstance().registerMovingObject(this);
|
||||
}
|
||||
|
||||
public void evtArrived()
|
||||
|
@@ -39,7 +39,6 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.LoginServerThread;
|
||||
import org.l2jmobius.gameserver.RecipeController;
|
||||
import org.l2jmobius.gameserver.ai.CreatureAI;
|
||||
@@ -220,6 +219,7 @@ import org.l2jmobius.gameserver.network.serverpackets.TradePressOwnOk;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.PvpFlagTaskManager;
|
||||
@@ -765,12 +765,12 @@ public class PlayerInstance extends Playable
|
||||
|
||||
public boolean isSpawnProtected()
|
||||
{
|
||||
return (_protectEndTime != 0) && (_protectEndTime > GameTimeController.getGameTicks());
|
||||
return (_protectEndTime != 0) && (_protectEndTime > GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
public boolean isTeleportProtected()
|
||||
{
|
||||
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > GameTimeController.getGameTicks());
|
||||
return (_teleportProtectEndTime != 0) && (_teleportProtectEndTime > GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4209,7 +4209,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
_protectEndTime = protect ? GameTimeController.getGameTicks() + (Config.PLAYER_SPAWN_PROTECTION * GameTimeController.TICKS_PER_SECOND) : 0;
|
||||
_protectEndTime = protect ? GameTimeTaskManager.getGameTicks() + (Config.PLAYER_SPAWN_PROTECTION * GameTimeTaskManager.TICKS_PER_SECOND) : 0;
|
||||
if (protect)
|
||||
{
|
||||
ThreadPool.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_SPAWN_PROTECTION - 1) * 1000);
|
||||
@@ -4222,7 +4222,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public void setTeleportProtection(boolean protect)
|
||||
{
|
||||
_teleportProtectEndTime = protect ? GameTimeController.getGameTicks() + (Config.PLAYER_TELEPORT_PROTECTION * GameTimeController.TICKS_PER_SECOND) : 0;
|
||||
_teleportProtectEndTime = protect ? GameTimeTaskManager.getGameTicks() + (Config.PLAYER_TELEPORT_PROTECTION * GameTimeTaskManager.TICKS_PER_SECOND) : 0;
|
||||
if (protect)
|
||||
{
|
||||
ThreadPool.schedule(new TeleportProtectionFinalizer(this), (Config.PLAYER_TELEPORT_PROTECTION - 1) * 1000);
|
||||
@@ -4274,7 +4274,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public void setRecentFakeDeath(boolean protect)
|
||||
{
|
||||
_recentFakeDeathEndTime = protect ? GameTimeController.getGameTicks() + (Config.PLAYER_FAKEDEATH_UP_PROTECTION * GameTimeController.TICKS_PER_SECOND) : 0;
|
||||
_recentFakeDeathEndTime = protect ? GameTimeTaskManager.getGameTicks() + (Config.PLAYER_FAKEDEATH_UP_PROTECTION * GameTimeTaskManager.TICKS_PER_SECOND) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4283,7 +4283,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public boolean isRecentFakeDeath()
|
||||
{
|
||||
return _recentFakeDeathEndTime > GameTimeController.getGameTicks();
|
||||
return _recentFakeDeathEndTime > GameTimeTaskManager.getGameTicks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6987,7 +6987,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public boolean isProcessingRequest()
|
||||
{
|
||||
return (_activeRequester != null) || (_requestExpireTime > GameTimeController.getGameTicks());
|
||||
return (_activeRequester != null) || (_requestExpireTime > GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6996,7 +6996,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public boolean isProcessingTransaction()
|
||||
{
|
||||
return (_activeRequester != null) || (_activeTradeList != null) || (_requestExpireTime > GameTimeController.getGameTicks());
|
||||
return (_activeRequester != null) || (_activeTradeList != null) || (_requestExpireTime > GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7005,7 +7005,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public void onTransactionRequest(PlayerInstance partner)
|
||||
{
|
||||
_requestExpireTime = GameTimeController.getGameTicks() + (REQUEST_TIMEOUT * GameTimeController.TICKS_PER_SECOND);
|
||||
_requestExpireTime = GameTimeTaskManager.getGameTicks() + (REQUEST_TIMEOUT * GameTimeTaskManager.TICKS_PER_SECOND);
|
||||
if (partner != null)
|
||||
{
|
||||
partner.setActiveRequester(this);
|
||||
@@ -7520,7 +7520,7 @@ public class PlayerInstance extends Playable
|
||||
@Override
|
||||
public boolean isInvul()
|
||||
{
|
||||
return _isInvul || _isTeleporting || (_protectEndTime > GameTimeController.getGameTicks()) || (_teleportProtectEndTime > GameTimeController.getGameTicks());
|
||||
return _isInvul || _isTeleporting || (_protectEndTime > GameTimeTaskManager.getGameTicks()) || (_teleportProtectEndTime > GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12734,7 +12734,7 @@ public class PlayerInstance extends Playable
|
||||
final double dx = m._xDestination - getX();
|
||||
final double dy = m._yDestination - getY();
|
||||
final double dz = m._zDestination - getZ();
|
||||
final int distPassed = ((int) getStat().getMoveSpeed() * (gameTicks - m._moveTimestamp)) / GameTimeController.TICKS_PER_SECOND;
|
||||
final int distPassed = ((int) getStat().getMoveSpeed() * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
||||
final double distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy) + (dz * dz));
|
||||
if (distFraction > 1)
|
||||
{
|
||||
@@ -14655,7 +14655,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public boolean isRequestExpired()
|
||||
{
|
||||
return (_requestExpireTime <= GameTimeController.getGameTicks());
|
||||
return (_requestExpireTime <= GameTimeTaskManager.getGameTicks());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.skills.conditions;
|
||||
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.skills.Env;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* @author mkizub
|
||||
@@ -45,7 +45,7 @@ public class ConditionGameTime extends Condition
|
||||
{
|
||||
case NIGHT:
|
||||
{
|
||||
return GameTimeController.getInstance().isNight() == _required;
|
||||
return GameTimeTaskManager.getInstance().isNight() == _required;
|
||||
}
|
||||
}
|
||||
return !_required;
|
||||
|
@@ -25,8 +25,8 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* @author Nik
|
||||
@@ -56,7 +56,7 @@ public class hitConditionBonus
|
||||
}
|
||||
|
||||
// Get weather bonus
|
||||
if (GameTimeController.getInstance().isNight())
|
||||
if (GameTimeTaskManager.getInstance().isNight())
|
||||
{
|
||||
mod += darkBonus;
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ import java.util.regex.PatternSyntaxException;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.communitybbs.Manager.MailBBSManager;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.data.sql.AnnouncementsTable;
|
||||
@@ -91,6 +90,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ShortCutInit;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SignsSky;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@@ -457,7 +457,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
final Skill skill = SkillTable.getInstance().getSkill(294, 1);
|
||||
if ((skill != null) && (player.getSkillLevel(294) == 1))
|
||||
{
|
||||
if (GameTimeController.getInstance().isNight())
|
||||
if (GameTimeTaskManager.getInstance().isNight())
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.IT_IS_NOW_MIDNIGHT_AND_THE_EFFECT_OF_S1_CAN_BE_FELT);
|
||||
sm.addSkillName(294);
|
||||
|
@@ -21,7 +21,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
@@ -46,6 +45,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ChairSit;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopManageList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.Ride;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
public class RequestActionUse implements IClientIncomingPacket
|
||||
{
|
||||
@@ -168,7 +168,7 @@ public class RequestActionUse implements IClientIncomingPacket
|
||||
{
|
||||
if (pet.isAttackingDisabled())
|
||||
{
|
||||
if (pet.getAttackEndTime() > GameTimeController.getGameTicks())
|
||||
if (pet.getAttackEndTime() > GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
pet.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
}
|
||||
|
@@ -17,9 +17,9 @@
|
||||
package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.4.2.5.2.6 $ $Date: 2005/03/27 15:29:39 $
|
||||
@@ -82,7 +82,7 @@ public class CharSelected implements IClientOutgoingPacket
|
||||
packet.writeD(0x00); // c3 work
|
||||
|
||||
// extra info
|
||||
packet.writeD(GameTimeController.getInstance().getGameTime()); // in-game time
|
||||
packet.writeD(GameTimeTaskManager.getInstance().getGameTime()); // in-game time
|
||||
|
||||
packet.writeD(0x00); //
|
||||
|
||||
|
@@ -17,8 +17,8 @@
|
||||
package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
public class ClientSetTime implements IClientOutgoingPacket
|
||||
{
|
||||
@@ -26,7 +26,7 @@ public class ClientSetTime implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.CLIENT_SET_TIME.writeId(packet);
|
||||
packet.writeD(GameTimeController.getInstance().getGameTime()); // time in client minutes
|
||||
packet.writeD(GameTimeTaskManager.getInstance().getGameTime()); // time in client minutes
|
||||
packet.writeD(6); // constant to match the server time( this determines the speed of the client clock)
|
||||
return true;
|
||||
}
|
||||
|
@@ -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 org.l2jmobius.gameserver;
|
||||
package org.l2jmobius.gameserver.taskmanager;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -31,17 +31,16 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.util.UnboundArrayList;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.1.4.8 $ $Date: 2005/04/06 16:13:24 $
|
||||
* Game Time task manager class.
|
||||
* @author Forsaiken
|
||||
*/
|
||||
public class GameTimeController
|
||||
public class GameTimeTaskManager
|
||||
{
|
||||
static final Logger LOGGER = Logger.getLogger(GameTimeController.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(GameTimeTaskManager.class.getName());
|
||||
|
||||
public static final int TICKS_PER_SECOND = 10;
|
||||
public static final int MILLIS_IN_TICK = 1000 / TICKS_PER_SECOND;
|
||||
|
||||
private static GameTimeController INSTANCE = new GameTimeController();
|
||||
|
||||
protected static int _gameTicks;
|
||||
protected static long _gameStartTime;
|
||||
protected static boolean _isNight = false;
|
||||
@@ -51,16 +50,7 @@ public class GameTimeController
|
||||
protected static TimerThread _timer;
|
||||
private final ScheduledFuture<?> _timerWatcher;
|
||||
|
||||
/**
|
||||
* one ingame day is 240 real minutes
|
||||
* @return
|
||||
*/
|
||||
public static GameTimeController getInstance()
|
||||
{
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private GameTimeController()
|
||||
private GameTimeTaskManager()
|
||||
{
|
||||
_gameStartTime = Chronos.currentTimeMillis() - 3600000; // offset so that the server starts a day begin
|
||||
_gameTicks = 3600000 / MILLIS_IN_TICK; // offset so that the server starts a day begin
|
||||
@@ -154,7 +144,7 @@ public class GameTimeController
|
||||
_timer.interrupt();
|
||||
}
|
||||
|
||||
class TimerThread extends Thread
|
||||
private class TimerThread extends Thread
|
||||
{
|
||||
protected Exception _error;
|
||||
|
||||
@@ -203,7 +193,7 @@ public class GameTimeController
|
||||
}
|
||||
}
|
||||
|
||||
class TimerWatcher implements Runnable
|
||||
private class TimerWatcher implements Runnable
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
@@ -226,7 +216,7 @@ public class GameTimeController
|
||||
/**
|
||||
* Update the _knownObject and _knowPlayers of each Creature that finished its movement and of their already known WorldObject then notify AI with EVT_ARRIVED.
|
||||
*/
|
||||
class MovingObjectArrived implements Runnable
|
||||
private class MovingObjectArrived implements Runnable
|
||||
{
|
||||
private final List<Creature> _finished;
|
||||
|
||||
@@ -253,7 +243,7 @@ public class GameTimeController
|
||||
}
|
||||
}
|
||||
|
||||
class BroadcastSunState implements Runnable
|
||||
private class BroadcastSunState implements Runnable
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
@@ -270,4 +260,14 @@ public class GameTimeController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final GameTimeTaskManager getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final GameTimeTaskManager INSTANCE = new GameTimeTaskManager();
|
||||
}
|
||||
}
|
@@ -22,11 +22,11 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.util.StringUtil;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.PunishLevel;
|
||||
import org.l2jmobius.gameserver.network.ConnectionState;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
* Flood protector implementation.
|
||||
@@ -49,7 +49,7 @@ public class FloodProtectorAction
|
||||
/**
|
||||
* Next game tick when new request is allowed.
|
||||
*/
|
||||
private volatile float _nextGameTick = GameTimeController.getGameTicks();
|
||||
private volatile float _nextGameTick = GameTimeTaskManager.getGameTicks();
|
||||
/**
|
||||
* Request counter.
|
||||
*/
|
||||
@@ -96,12 +96,12 @@ public class FloodProtectorAction
|
||||
|
||||
if (!config.ALTERNATIVE_METHOD)
|
||||
{
|
||||
final int curTick = GameTimeController.getGameTicks();
|
||||
final int curTick = GameTimeTaskManager.getGameTicks();
|
||||
if ((curTick < _nextGameTick) || _punishmentInProgress)
|
||||
{
|
||||
if (config.LOG_FLOODING && !_logged)
|
||||
{
|
||||
LOGGER.warning(" called command " + command + " ~ " + ((config.FLOOD_PROTECTION_INTERVAL - (_nextGameTick - curTick)) * GameTimeController.MILLIS_IN_TICK) + " ms after previous command");
|
||||
LOGGER.warning(" called command " + command + " ~ " + ((config.FLOOD_PROTECTION_INTERVAL - (_nextGameTick - curTick)) * GameTimeTaskManager.MILLIS_IN_TICK) + " ms after previous command");
|
||||
_logged = true;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public class FloodProtectorAction
|
||||
|
||||
if ((_count.get() > 0) && config.LOG_FLOODING)
|
||||
{
|
||||
LOGGER(" issued ", String.valueOf(_count), " extra requests within ~", String.valueOf(config.FLOOD_PROTECTION_INTERVAL * GameTimeController.MILLIS_IN_TICK), " ms");
|
||||
LOGGER(" issued ", String.valueOf(_count), " extra requests within ~", String.valueOf(config.FLOOD_PROTECTION_INTERVAL * GameTimeTaskManager.MILLIS_IN_TICK), " ms");
|
||||
}
|
||||
|
||||
_nextGameTick = curTick + config.FLOOD_PROTECTION_INTERVAL;
|
||||
@@ -157,12 +157,12 @@ public class FloodProtectorAction
|
||||
return true;
|
||||
}
|
||||
|
||||
final int curTick = GameTimeController.getGameTicks();
|
||||
final int curTick = GameTimeTaskManager.getGameTicks();
|
||||
if ((curTick < _nextGameTick) || _punishmentInProgress)
|
||||
{
|
||||
if (config.LOG_FLOODING && !_logged)
|
||||
{
|
||||
LOGGER.warning(" called command " + command + " ~ " + ((config.FLOOD_PROTECTION_INTERVAL - (_nextGameTick - curTick)) * GameTimeController.MILLIS_IN_TICK) + " ms after previous command");
|
||||
LOGGER.warning(" called command " + command + " ~ " + ((config.FLOOD_PROTECTION_INTERVAL - (_nextGameTick - curTick)) * GameTimeTaskManager.MILLIS_IN_TICK) + " ms after previous command");
|
||||
_logged = true;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class FloodProtectorAction
|
||||
{
|
||||
if (config.LOG_FLOODING)
|
||||
{
|
||||
LOGGER.warning(" issued " + commandCount + " extra requests within ~ " + (config.FLOOD_PROTECTION_INTERVAL * GameTimeController.MILLIS_IN_TICK) + " ms");
|
||||
LOGGER.warning(" issued " + commandCount + " extra requests within ~ " + (config.FLOOD_PROTECTION_INTERVAL * GameTimeTaskManager.MILLIS_IN_TICK) + " ms");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,6 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.LoginServerThread;
|
||||
import org.l2jmobius.gameserver.Shutdown;
|
||||
import org.l2jmobius.gameserver.cache.HtmCache;
|
||||
@@ -81,6 +80,7 @@ import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.GMAudit;
|
||||
|
||||
public class GameStatusThread extends Thread
|
||||
@@ -965,7 +965,7 @@ public class GameStatusThread extends Thread
|
||||
|
||||
private String gameTime()
|
||||
{
|
||||
final int t = GameTimeController.getInstance().getGameTime();
|
||||
final int t = GameTimeTaskManager.getInstance().getGameTime();
|
||||
final int h = t / 60;
|
||||
final int m = t % 60;
|
||||
final SimpleDateFormat format = new SimpleDateFormat("H:mm");
|
||||
|
Reference in New Issue
Block a user