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