Partial sync latest Test changes to HighFive.
This commit is contained in:
@@ -19,6 +19,7 @@ package instances;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.enums.InstanceReenterType;
|
||||
@@ -42,6 +43,8 @@ import ai.npc.AbstractNpcAI;
|
||||
*/
|
||||
public abstract class AbstractInstance extends AbstractNpcAI
|
||||
{
|
||||
public final Logger _log = Logger.getLogger(getClass().getSimpleName());
|
||||
|
||||
public AbstractInstance(String name, String desc)
|
||||
{
|
||||
super(name, desc);
|
||||
@@ -52,6 +55,11 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
||||
super(name, "instances");
|
||||
}
|
||||
|
||||
protected void enterInstance(L2PcInstance player, String template, int templateId)
|
||||
{
|
||||
enterInstance(player, new InstanceWorld(), template, templateId);
|
||||
}
|
||||
|
||||
protected void enterInstance(L2PcInstance player, InstanceWorld instance, String template, int templateId)
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
@@ -72,7 +80,7 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkConditions(player, templateId))
|
||||
if (checkConditions(player))
|
||||
{
|
||||
instance.setInstanceId(InstanceManager.getInstance().createDynamicInstance(template));
|
||||
instance.setTemplateId(templateId);
|
||||
@@ -188,11 +196,6 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
||||
|
||||
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)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -208,7 +208,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditions(L2PcInstance player, int templateId)
|
||||
protected boolean checkConditions(L2PcInstance player)
|
||||
{
|
||||
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||
{
|
||||
@@ -221,8 +221,8 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
return false;
|
||||
}
|
||||
|
||||
final boolean is83 = templateId == TEMPLATE_ID_83;
|
||||
final boolean isNight = templateId == TEMPLATE_ID_60_NIGHT;
|
||||
final boolean is83 = InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() == TEMPLATE_ID_83 ? true : false;
|
||||
final boolean isNight = InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() == TEMPLATE_ID_60_NIGHT ? true : false;
|
||||
final L2Party party = player.getParty();
|
||||
final boolean isInCC = party.isInCommandChannel();
|
||||
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
|
||||
@@ -35,10 +35,6 @@ import quests.Q10296_SevenSignsPowerOfTheSeal.Q10296_SevenSignsPowerOfTheSeal;
|
||||
*/
|
||||
public final class ElcadiasTent extends AbstractInstance
|
||||
{
|
||||
protected class ETWorld extends InstanceWorld
|
||||
{
|
||||
}
|
||||
|
||||
// NPCs
|
||||
private static final int ELCADIA = 32784;
|
||||
private static final int GRUFF_LOOKING_MAN = 32862;
|
||||
@@ -71,7 +67,7 @@ public final class ElcadiasTent extends AbstractInstance
|
||||
|| ((ForbiddenBook != null) && ForbiddenBook.isCompleted() && (Monastery == null)) //
|
||||
|| ((PowerOfSeal != null) && PowerOfSeal.isStarted()))
|
||||
{
|
||||
enterInstance(talker, new ETWorld(), "ElcadiasTent.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "ElcadiasTent.xml", TEMPLATE_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -30,11 +30,6 @@ import instances.AbstractInstance;
|
||||
*/
|
||||
public final class HideoutOfTheDawn extends AbstractInstance
|
||||
{
|
||||
protected class HotDWorld extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPCs
|
||||
private static final int WOOD = 32593;
|
||||
private static final int JAINA = 32617;
|
||||
@@ -58,7 +53,7 @@ public final class HideoutOfTheDawn extends AbstractInstance
|
||||
{
|
||||
case WOOD:
|
||||
{
|
||||
enterInstance(talker, new HotDWorld(), "HideoutOfTheDawn.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "HideoutOfTheDawn.xml", TEMPLATE_ID);
|
||||
return "32593-01.htm";
|
||||
}
|
||||
case JAINA:
|
||||
|
||||
@@ -31,11 +31,6 @@ import quests.Q10284_AcquisitionOfDivineSword.Q10284_AcquisitionOfDivineSword;
|
||||
*/
|
||||
public final class JiniaGuildHideout1 extends AbstractInstance
|
||||
{
|
||||
protected class JGH1World extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int RAFFORTY = 32020;
|
||||
// Location
|
||||
@@ -56,7 +51,7 @@ public final class JiniaGuildHideout1 extends AbstractInstance
|
||||
final QuestState qs = talker.getQuestState(Q10284_AcquisitionOfDivineSword.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(1))
|
||||
{
|
||||
enterInstance(talker, new JGH1World(), "JiniaGuildHideout1.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "JiniaGuildHideout1.xml", TEMPLATE_ID);
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
return super.onTalk(npc, talker);
|
||||
|
||||
@@ -31,11 +31,6 @@ import quests.Q10285_MeetingSirra.Q10285_MeetingSirra;
|
||||
*/
|
||||
public final class JiniaGuildHideout2 extends AbstractInstance
|
||||
{
|
||||
protected class JGH2World extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int RAFFORTY = 32020;
|
||||
// Location
|
||||
@@ -56,7 +51,7 @@ public final class JiniaGuildHideout2 extends AbstractInstance
|
||||
final QuestState qs = talker.getQuestState(Q10285_MeetingSirra.class.getSimpleName());
|
||||
if ((qs != null) && qs.isMemoState(1))
|
||||
{
|
||||
enterInstance(talker, new JGH2World(), "JiniaGuildHideout2.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "JiniaGuildHideout2.xml", TEMPLATE_ID);
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
return super.onTalk(npc, talker);
|
||||
|
||||
@@ -31,11 +31,6 @@ import quests.Q10286_ReunionWithSirra.Q10286_ReunionWithSirra;
|
||||
*/
|
||||
public final class JiniaGuildHideout3 extends AbstractInstance
|
||||
{
|
||||
protected class JGH3World extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int RAFFORTY = 32020;
|
||||
// Location
|
||||
@@ -56,7 +51,7 @@ public final class JiniaGuildHideout3 extends AbstractInstance
|
||||
final QuestState qs = talker.getQuestState(Q10286_ReunionWithSirra.class.getSimpleName());
|
||||
if ((qs != null) && qs.isMemoState(1))
|
||||
{
|
||||
enterInstance(talker, new JGH3World(), "JiniaGuildHideout3.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "JiniaGuildHideout3.xml", TEMPLATE_ID);
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
return super.onTalk(npc, talker);
|
||||
|
||||
@@ -31,11 +31,6 @@ import quests.Q10287_StoryOfThoseLeft.Q10287_StoryOfThoseLeft;
|
||||
*/
|
||||
public final class JiniaGuildHideout4 extends AbstractInstance
|
||||
{
|
||||
protected class JGH4World extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int RAFFORTY = 32020;
|
||||
// Location
|
||||
@@ -56,7 +51,7 @@ public final class JiniaGuildHideout4 extends AbstractInstance
|
||||
final QuestState qs = talker.getQuestState(Q10287_StoryOfThoseLeft.class.getSimpleName());
|
||||
if ((qs != null) && qs.isMemoState(1))
|
||||
{
|
||||
enterInstance(talker, new JGH4World(), "JiniaGuildHideout4.xml", TEMPLATE_ID);
|
||||
enterInstance(talker, "JiniaGuildHideout4.xml", TEMPLATE_ID);
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
return super.onTalk(npc, talker);
|
||||
|
||||
@@ -34,11 +34,6 @@ import instances.AbstractInstance;
|
||||
*/
|
||||
public final class PailakaSongOfIceAndFire extends AbstractInstance
|
||||
{
|
||||
protected class PSoIWorld extends InstanceWorld
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// NPCs
|
||||
private static final int ADLER1 = 32497;
|
||||
private static final int GARGOS = 18607;
|
||||
@@ -85,7 +80,7 @@ public final class PailakaSongOfIceAndFire extends AbstractInstance
|
||||
{
|
||||
case "enter":
|
||||
{
|
||||
enterInstance(player, new PSoIWorld(), "PailakaSongOfIceAndFire.xml", TEMPLATE_ID);
|
||||
enterInstance(player, "PailakaSongOfIceAndFire.xml", TEMPLATE_ID);
|
||||
break;
|
||||
}
|
||||
case "GARGOS_LAUGH":
|
||||
|
||||
Reference in New Issue
Block a user