Fixed Krofin Nest 110 entry.
Contributed by Horus.
This commit is contained in:
@@ -136,26 +136,29 @@ public class KrofinNest extends AbstractInstance
|
|||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
switch (event)
|
if (event.contains("enterInstance"))
|
||||||
{
|
{
|
||||||
case "enterInstance":
|
if (event.contains("110"))
|
||||||
{
|
{
|
||||||
// Cannot enter if player finished another instance.
|
// Cannot enter if player finished another instance.
|
||||||
final int templateId = event.contains("110") ? TEMPLATE_IDS[1] : TEMPLATE_IDS[0];
|
final long currentTime = Chronos.currentTimeMillis();
|
||||||
if ((Chronos.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(player, templateId == TEMPLATE_IDS[1] ? TEMPLATE_IDS[0] : TEMPLATE_IDS[1])))
|
if ((currentTime < InstanceManager.getInstance().getInstanceTime(player, 291)))
|
||||||
{
|
{
|
||||||
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
|
player.sendPacket(new SystemMessage(SystemMessageId.SINCE_C1_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_THIS_DUNGEON).addString(player.getName()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
enterInstance(player, npc, TEMPLATE_IDS[1]);
|
||||||
enterInstance(player, npc, templateId);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enterInstance(player, npc, TEMPLATE_IDS[0]);
|
||||||
|
}
|
||||||
if (player.getInstanceWorld() != null)
|
if (player.getInstanceWorld() != null)
|
||||||
{
|
{
|
||||||
startQuestTimer("check_status", 1000, null, player);
|
startQuestTimer("check_status", 1000, null, player);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
case "check_status":
|
else if (event.equals("check_status"))
|
||||||
{
|
{
|
||||||
final Instance world = player.getInstanceWorld();
|
final Instance world = player.getInstanceWorld();
|
||||||
if (!isInInstance(world))
|
if (!isInInstance(world))
|
||||||
@@ -221,11 +224,9 @@ public class KrofinNest extends AbstractInstance
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
|
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon)
|
||||||
|
Reference in New Issue
Block a user