Minor code improvements.

This commit is contained in:
MobiusDev
2016-12-11 20:32:47 +00:00
parent 6a2ccc62e4
commit 70f0330eb0
182 changed files with 1006 additions and 1328 deletions

View File

@@ -784,13 +784,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
npc.doCast(ICE_BALL.getSkill());
}
}
else
else if (canReachMostHated && SkillCaster.checkUseConditions(npc, ICE_BALL.getSkill()))
{
if (canReachMostHated && SkillCaster.checkUseConditions(npc, ICE_BALL.getSkill()))
{
npc.setTarget(mostHated);
npc.doCast(ICE_BALL.getSkill());
}
npc.setTarget(mostHated);
npc.doCast(ICE_BALL.getSkill());
}
}
else if (getRandom(10000) < 800)
@@ -803,13 +800,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
}
else
else if (canReachMostHated && SkillCaster.checkUseConditions(npc, SUMMON_ELEMENTAL.getSkill()))
{
if (canReachMostHated && SkillCaster.checkUseConditions(npc, SUMMON_ELEMENTAL.getSkill()))
{
npc.setTarget(mostHated);
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
npc.setTarget(mostHated);
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
}
else if (getRandom(10000) < 1500)
@@ -871,13 +865,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
npc.doCast(ICE_BALL.getSkill());
}
}
else
else if (canReachMostHated && SkillCaster.checkUseConditions(npc, ICE_BALL.getSkill()))
{
if (canReachMostHated && SkillCaster.checkUseConditions(npc, ICE_BALL.getSkill()))
{
npc.setTarget(mostHated);
npc.doCast(ICE_BALL.getSkill());
}
npc.setTarget(mostHated);
npc.doCast(ICE_BALL.getSkill());
}
}
else if (getRandom(10000) < 1333)
@@ -890,13 +881,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
}
else
else if (canReachMostHated && SkillCaster.checkUseConditions(npc, SUMMON_ELEMENTAL.getSkill()))
{
if (canReachMostHated && SkillCaster.checkUseConditions(npc, SUMMON_ELEMENTAL.getSkill()))
{
npc.setTarget(mostHated);
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
npc.setTarget(mostHated);
npc.doCast(SUMMON_ELEMENTAL.getSkill());
}
}
else if (getRandom(10000) < 1500)

View File

@@ -140,16 +140,13 @@ public final class IstinaCavern extends AbstractInstance
}
}
}
else
else if (event.equals("enterInstanceCommon"))
{
if (event.equals("enterInstanceCommon"))
{
enterInstance(player, npc, TEMPLATE_ID_COMMON);
}
else if (event.equals("enterInstanceExtreme"))
{
enterInstance(player, npc, TEMPLATE_ID_EXTREME);
}
enterInstance(player, npc, TEMPLATE_ID_COMMON);
}
else if (event.equals("enterInstanceExtreme"))
{
enterInstance(player, npc, TEMPLATE_ID_EXTREME);
}
return htmltext;
}

View File

@@ -584,20 +584,17 @@ public final class KartiasLabyrinth extends AbstractInstance
npc.deleteMe();
}
}
else // Mini bosses
else if (npc.isScriptValue(1))
{
if (npc.isScriptValue(1))
{
npc.setScriptValue(2);
addMoveToDesire(npc, instance.getTemplateParameters().getLocation("bossEscapeLoc2"), 23);
}
else if (npc.isScriptValue(2))
{
instance.setParameter("MINIBOSS_SURVIVED", true);
instance.openCloseDoor(instance.getTemplateParameters().getInt("thirdDoorId"), true);
instance.setStatus(3); // Used for notify helper's AI
npc.deleteMe();
}
npc.setScriptValue(2);
addMoveToDesire(npc, instance.getTemplateParameters().getLocation("bossEscapeLoc2"), 23);
}
else if (npc.isScriptValue(2))
{
instance.setParameter("MINIBOSS_SURVIVED", true);
instance.openCloseDoor(instance.getTemplateParameters().getInt("thirdDoorId"), true);
instance.setStatus(3); // Used for notify helper's AI
npc.deleteMe();
}
}
super.onMoveFinished(npc);

View File

@@ -406,7 +406,7 @@ public final class LastImperialTomb extends AbstractInstance
case "FRINTEZZA_INTRO_19":
{
final Instance world = player.getInstanceWorld();
Map<L2Npc, Integer> portraits = new HashMap<>();
final Map<L2Npc, Integer> portraits = new HashMap<>();
for (int i = 0; i < PORTRAIT_SPAWNS.length; i++)
{
final L2Npc portrait = addSpawn(PORTRAIT_SPAWNS[i][0], PORTRAIT_SPAWNS[i][1], PORTRAIT_SPAWNS[i][2], PORTRAIT_SPAWNS[i][3], PORTRAIT_SPAWNS[i][4], false, 0, false, world.getId());