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