Fixed Zaken enter instance method.
This commit is contained in:
parent
c4ec3855a5
commit
9be2cb4243
@ -184,11 +184,6 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
|||||||
|
|
||||||
protected abstract void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance);
|
protected abstract void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance);
|
||||||
|
|
||||||
protected boolean checkConditions(L2PcInstance player, int templateId)
|
|
||||||
{
|
|
||||||
return checkConditions(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean checkConditions(L2PcInstance player)
|
protected boolean checkConditions(L2PcInstance player)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -206,8 +206,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
|||||||
teleportPlayer(player, ENTER_LOC[getRandom(ENTER_LOC.length)], world.getInstanceId(), false);
|
teleportPlayer(player, ENTER_LOC[getRandom(ENTER_LOC.length)], world.getInstanceId(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private boolean checkConditions(L2PcInstance player, int templateId)
|
||||||
protected boolean checkConditions(L2PcInstance player, int templateId)
|
|
||||||
{
|
{
|
||||||
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||||
{
|
{
|
||||||
@ -290,17 +289,26 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
|||||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("enter60"))
|
if (event.equals("enter60"))
|
||||||
|
{
|
||||||
|
if (checkConditions(player, TEMPLATE_ID_60))
|
||||||
{
|
{
|
||||||
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay60.xml", TEMPLATE_ID_60);
|
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay60.xml", TEMPLATE_ID_60);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (event.equals("enter60night"))
|
else if (event.equals("enter60night"))
|
||||||
|
{
|
||||||
|
if (checkConditions(player, TEMPLATE_ID_60_NIGHT))
|
||||||
{
|
{
|
||||||
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldNight60.xml", TEMPLATE_ID_60_NIGHT);
|
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldNight60.xml", TEMPLATE_ID_60_NIGHT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (event.equals("enter83"))
|
else if (event.equals("enter83"))
|
||||||
|
{
|
||||||
|
if (checkConditions(player, TEMPLATE_ID_83))
|
||||||
{
|
{
|
||||||
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay83.xml", TEMPLATE_ID_83);
|
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay83.xml", TEMPLATE_ID_83);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||||
|
Loading…
Reference in New Issue
Block a user