Save instance time even if player is not online.
This commit is contained in:
parent
3cd9404a34
commit
95186fa890
@ -842,12 +842,15 @@ public final class Kamaloka extends AbstractInstance
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setReenterPenalty(plr.getObjectId(), world.getTemplateId(), reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.finishInstance();
|
||||
}
|
||||
}
|
||||
|
@ -842,12 +842,15 @@ public final class Kamaloka extends AbstractInstance
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setReenterPenalty(plr.getObjectId(), world.getTemplateId(), reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.finishInstance();
|
||||
}
|
||||
}
|
||||
|
@ -842,12 +842,15 @@ public final class Kamaloka extends AbstractInstance
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setReenterPenalty(plr.getObjectId(), world.getTemplateId(), reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.finishInstance();
|
||||
}
|
||||
}
|
||||
|
@ -842,12 +842,15 @@ public final class Kamaloka extends AbstractInstance
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setReenterPenalty(plr.getObjectId(), world.getTemplateId(), reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.finishInstance();
|
||||
}
|
||||
}
|
||||
|
@ -615,12 +615,15 @@ public class HallOfErosionAttack extends AbstractNpcAI
|
||||
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(plr.getObjectId(), INSTANCEID, reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
inst.setDuration(5 * 60000);
|
||||
inst.setEmptyDestroyTime(0);
|
||||
|
@ -449,12 +449,15 @@ public class HallOfSufferingAttack extends AbstractNpcAI
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance player : tmpworld.getAllowed())
|
||||
{
|
||||
if ((player != null) && player.isOnline())
|
||||
if (player != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, reenter.getTimeInMillis());
|
||||
if (player.isOnline())
|
||||
{
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
startQuestTimer("spawnBossGuards", BOSS_MINION_SPAWN_TIME, npc, null);
|
||||
startQuestTimer("isTwinSeparated", 10000, npc, null);
|
||||
}
|
||||
|
@ -449,12 +449,15 @@ public class HallOfSufferingDefence extends AbstractNpcAI
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance player : tmpworld.getAllowed())
|
||||
{
|
||||
if ((player != null) && player.isOnline())
|
||||
if (player != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, reenter.getTimeInMillis());
|
||||
if (player.isOnline())
|
||||
{
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
startQuestTimer("spawnBossGuards", BOSS_MINION_SPAWN_TIME, npc, null);
|
||||
startQuestTimer("isTwinSeparated", 10000, npc, null);
|
||||
}
|
||||
|
@ -524,13 +524,16 @@ public class HeartInfinityAttack extends AbstractNpcAI
|
||||
|
||||
for (L2PcInstance player : tmpworld.getAllowed())
|
||||
{
|
||||
if ((player != null) && player.isOnline())
|
||||
if (player != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, reenter.getTimeInMillis());
|
||||
if (player.isOnline())
|
||||
{
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.getId() == EKIMUS)
|
||||
{
|
||||
|
@ -188,13 +188,16 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
||||
{
|
||||
for (L2PcInstance player : world.getAllowed())
|
||||
{
|
||||
if ((player != null) && player.isOnline())
|
||||
if (player != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(player.getObjectId(), world.getTemplateId(), time);
|
||||
if (player.isOnline())
|
||||
{
|
||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_S_ENTRY_HAS_BEEN_RESTRICTED_YOU_CAN_CHECK_THE_NEXT_POSSIBLE_ENTRY_TIME_BY_USING_THE_COMMAND_INSTANCEZONE).addString(InstanceManager.getInstance().getInstanceIdName(world.getTemplateId())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handleRemoveBuffs(L2PcInstance player, InstanceWorld world)
|
||||
{
|
||||
|
@ -632,12 +632,15 @@ public final class Kamaloka extends AbstractInstance
|
||||
// set instance reenter time for all allowed players
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(plr.getObjectId(), world.getTemplateId(), reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// destroy instance after EXIT_TIME
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
|
@ -294,12 +294,15 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(plr.getObjectId(), TEMPLATE_ID, reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
inst.setDuration(5 * 60000);
|
||||
inst.setEmptyDestroyTime(0);
|
||||
|
@ -263,12 +263,15 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
|
||||
for (L2PcInstance plr : world.getAllowed())
|
||||
{
|
||||
if ((plr != null) && plr.isOnline())
|
||||
if (plr != null)
|
||||
{
|
||||
InstanceManager.getInstance().setInstanceTime(plr.getObjectId(), TEMPLATE_ID, reenter.getTimeInMillis());
|
||||
if (plr.isOnline())
|
||||
{
|
||||
plr.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
inst.setDuration(5 * 60000);
|
||||
inst.setEmptyDestroyTime(0);
|
||||
|
Loading…
Reference in New Issue
Block a user