Code style changes.
This commit is contained in:
@@ -215,8 +215,8 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
final boolean is83 = templateId == TEMPLATE_ID_83;
|
||||
final L2Party party = player.getParty();
|
||||
final boolean isInCC = party.isInCommandChannel();
|
||||
final List<L2PcInstance> members = (isInCC) ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
final boolean isPartyLeader = (isInCC) ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
|
||||
final List<L2PcInstance> members = isInCC ? party.getCommandChannel().getMembers() : party.getMembers();
|
||||
final boolean isPartyLeader = isInCC ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
|
||||
|
||||
if (!isPartyLeader)
|
||||
{
|
||||
@@ -244,7 +244,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
return false;
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(groupMembers.getObjectId(), (is83 ? TEMPLATE_ID_83 : TEMPLATE_ID_60)))
|
||||
if (System.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(groupMembers.getObjectId(), is83 ? TEMPLATE_ID_83 : TEMPLATE_ID_60))
|
||||
{
|
||||
broadcastSystemMessage(player, groupMembers, SystemMessageId.C1_MAY_NOT_RE_ENTER_YET, true);
|
||||
return false;
|
||||
@@ -291,7 +291,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof CavernOfThePirateCaptainWorld))
|
||||
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
|
||||
{
|
||||
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
|
||||
|
||||
@@ -365,7 +365,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof CavernOfThePirateCaptainWorld))
|
||||
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
|
||||
{
|
||||
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
|
||||
|
||||
@@ -373,7 +373,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
{
|
||||
for (L2PcInstance playersInside : world.playersInside)
|
||||
{
|
||||
if ((playersInside != null) && ((playersInside.getInstanceId() == world.getInstanceId()) && playersInside.isInsideRadius(npc, 1500, true, true)))
|
||||
if ((playersInside != null) && (playersInside.getInstanceId() == world.getInstanceId()) && playersInside.isInsideRadius(npc, 1500, true, true))
|
||||
{
|
||||
final long time = System.currentTimeMillis() - world.storeTime;
|
||||
if (time <= 300000) // 5 minutes
|
||||
@@ -407,7 +407,7 @@ public final class CavernOfThePirateCaptain extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof CavernOfThePirateCaptainWorld))
|
||||
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
|
||||
{
|
||||
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
|
||||
final boolean isBlue = npc.getVariables().getInt("isBlue", 0) == 1;
|
||||
|
@@ -196,12 +196,12 @@ abstract class Chamber extends AbstractInstance
|
||||
|
||||
private boolean isBigChamber()
|
||||
{
|
||||
return ((INSTANCEID == 131) || (INSTANCEID == 132));
|
||||
return (INSTANCEID == 131) || (INSTANCEID == 132);
|
||||
}
|
||||
|
||||
private boolean isBossRoom(CDWorld world)
|
||||
{
|
||||
return (world.currentRoom == (ROOM_ENTER_POINTS.length - 1));
|
||||
return world.currentRoom == (ROOM_ENTER_POINTS.length - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -435,7 +435,7 @@ abstract class Chamber extends AbstractInstance
|
||||
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
if (world != null)
|
||||
{
|
||||
world.removeAllowed((player.getObjectId()));
|
||||
world.removeAllowed(player.getObjectId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ abstract class Chamber extends AbstractInstance
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
if ((tmpworld != null) && (tmpworld instanceof CDWorld))
|
||||
if (tmpworld instanceof CDWorld)
|
||||
{
|
||||
final CDWorld world = (CDWorld) tmpworld;
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
|
@@ -133,7 +133,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
private static final int CONT_CRYSTAL = 9690; // Contaminated Crystal
|
||||
private static final int RED_CORAL = 9692; // Red Coral
|
||||
private static final int CRYSTALFOOD = 9693; // Food item for Crystal Golems
|
||||
final private static int RACE_KEY = 9694; // Race Key for Emerald doors
|
||||
private static final int RACE_KEY = 9694; // Race Key for Emerald doors
|
||||
private static final int BOSS_CRYSTAL_1 = 9695; // Clear Crystal
|
||||
private static final int BOSS_CRYSTAL_2 = 9696; // Clear Crystal
|
||||
private static final int BOSS_CRYSTAL_3 = 9697; // Clear Crystal
|
||||
@@ -165,7 +165,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
private static final int KECHIGUARD = 25533;
|
||||
private static final int BAYLOR = 29099;
|
||||
private static final int DARNEL = 25531;
|
||||
private final static int ALARMID = 18474;
|
||||
private static final int ALARMID = 18474;
|
||||
// private static final int[] BOSSCR = {9695,9696,9697};
|
||||
private static final int[] CGMOBS =
|
||||
{
|
||||
@@ -216,7 +216,6 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
private static final Location START_LOC = new Location(143348, 148707, -11972);
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 10;
|
||||
private static final boolean debug = false;
|
||||
private static final int DOOR1 = 24220021;
|
||||
private static final int DOOR2 = 24220024;
|
||||
private static final int DOOR3 = 24220023;
|
||||
@@ -230,7 +229,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
20107
|
||||
};
|
||||
// @formatter:off
|
||||
private final static int[][] ALARMSPAWN =
|
||||
private static final int[][] ALARMSPAWN =
|
||||
{
|
||||
{153572, 141277, -12738},
|
||||
{153572, 142852, -12738},
|
||||
@@ -512,7 +511,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
@Override
|
||||
protected boolean checkConditions(L2PcInstance player)
|
||||
{
|
||||
if (debug || player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -565,10 +564,6 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
|
||||
private boolean checkOracleConditions(L2PcInstance player)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
final L2Party party = player.getParty();
|
||||
if (party == null)
|
||||
{
|
||||
@@ -1054,11 +1049,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
}
|
||||
else if (!world.copys.isEmpty())
|
||||
{
|
||||
boolean notAOE = true;
|
||||
if ((skill != null) && ((skill.getTargetType() == L2TargetType.AREA) || (skill.getTargetType() == L2TargetType.FRONT_AREA) || (skill.getTargetType() == L2TargetType.BEHIND_AREA) || (skill.getTargetType() == L2TargetType.AURA) || (skill.getTargetType() == L2TargetType.FRONT_AURA) || (skill.getTargetType() == L2TargetType.BEHIND_AURA)))
|
||||
{
|
||||
notAOE = false;
|
||||
}
|
||||
boolean notAOE = (skill == null) || ((skill.getTargetType() != L2TargetType.AREA) && (skill.getTargetType() != L2TargetType.FRONT_AREA) && (skill.getTargetType() != L2TargetType.BEHIND_AREA) && (skill.getTargetType() != L2TargetType.AURA) && (skill.getTargetType() != L2TargetType.FRONT_AURA) && (skill.getTargetType() != L2TargetType.BEHIND_AURA));
|
||||
if (notAOE)
|
||||
{
|
||||
for (L2Npc copy : world.copys)
|
||||
@@ -1208,7 +1199,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
else if (event.equalsIgnoreCase("spawn_oracle"))
|
||||
{
|
||||
addSpawn(32271, 153572, 142075, -9728, 10800, false, 0, false, world.getInstanceId());
|
||||
addSpawn((getRandom(10) < 5 ? 29116 : 29117), npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false, world.getInstanceId()); // Baylor's Chest
|
||||
addSpawn(getRandom(10) < 5 ? 29116 : 29117, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false, world.getInstanceId()); // Baylor's Chest
|
||||
addSpawn(ORACLE_GUIDE_4, 153572, 142075, -12738, 10800, false, 0, false, world.getInstanceId());
|
||||
cancelQuestTimer("baylor_despawn", npc, null);
|
||||
cancelQuestTimers("baylor_skill");
|
||||
@@ -1749,7 +1740,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
|
||||
final Instance baylorInstance = InstanceManager.getInstance().getInstance(npc.getInstanceId());
|
||||
baylorInstance.setDuration(300000);
|
||||
this.startQuestTimer("spawn_oracle", 1000, npc, null);
|
||||
startQuestTimer("spawn_oracle", 1000, npc, null);
|
||||
giveRewards(player, npc.getInstanceId(), -1, true);
|
||||
}
|
||||
}
|
||||
@@ -1908,18 +1899,13 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
{
|
||||
world._raiders.clear();
|
||||
final L2Party party = player.getParty();
|
||||
if (party == null)
|
||||
if (party != null)
|
||||
{
|
||||
world._raiders.add(player);
|
||||
world._raiders.addAll(party.getMembers());
|
||||
}
|
||||
else
|
||||
{
|
||||
for (L2PcInstance partyMember : party.getMembers())
|
||||
{
|
||||
// int rnd = getRandom(100);
|
||||
// partyMember.destroyItemByItemId("Quest", (rnd < 33 ? BOSS_CRYSTAL_1:(rnd < 67 ? BOSS_CRYSTAL_2:BOSS_CRYSTAL_3)), 1, partyMember, true); Crystals are no longer beign cunsumed while entering to Baylor Lair.
|
||||
world._raiders.add(partyMember);
|
||||
}
|
||||
world._raiders.add(player);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1976,7 +1962,7 @@ public final class CrystalCaverns extends AbstractInstance
|
||||
if (trap.getId() == DOOR_OPENING_TRAP[0])
|
||||
{
|
||||
openDoor(24220001, ((CCWorld) tmpworld).getInstanceId());
|
||||
runEmeraldRooms(((CCWorld) tmpworld), ROOM1_SPAWNS, 1);
|
||||
runEmeraldRooms((CCWorld) tmpworld, ROOM1_SPAWNS, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -794,12 +794,9 @@ public final class DarkCloudMansion extends AbstractInstance
|
||||
decayedSamples += 1;
|
||||
mob.count = 2;
|
||||
}
|
||||
else
|
||||
else if (mob.count == 2)
|
||||
{
|
||||
if (mob.count == 2)
|
||||
{
|
||||
decayedSamples += 1;
|
||||
}
|
||||
decayedSamples += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,16 +816,13 @@ public final class DarkCloudMansion extends AbstractInstance
|
||||
startQuestTimer("respawnFifth", 6000, npc, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ((FifthRoom.reset == 0) && (FifthRoom.founded == 3))
|
||||
{
|
||||
if ((FifthRoom.reset == 0) && (FifthRoom.founded == 3))
|
||||
for (DMCNpc mob : FifthRoom.npcList)
|
||||
{
|
||||
for (DMCNpc mob : FifthRoom.npcList)
|
||||
{
|
||||
mob.npc.decayMe();
|
||||
}
|
||||
endInstance(world);
|
||||
mob.npc.decayMe();
|
||||
}
|
||||
endInstance(world);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -185,7 +185,6 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
private static final int MAX_PLAYERS = 45;
|
||||
private static final int TIME_BETWEEN_DEMON_SPAWNS = 20000;
|
||||
private static final int MAX_DEMONS = 24;
|
||||
private static final boolean debug = false;
|
||||
private final Map<Integer, L2Territory> _spawnZoneList = new HashMap<>();
|
||||
private final Map<Integer, List<FETSpawn>> _spawnList = new HashMap<>();
|
||||
private final List<Integer> _mustKillMobsId = new ArrayList<>();
|
||||
@@ -436,17 +435,12 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
{
|
||||
_log.log(Level.WARNING, "[Final Emperial Tomb] Could not parse final_emperial_tomb.xml file: " + e.getMessage(), e);
|
||||
}
|
||||
if (debug)
|
||||
{
|
||||
_log.info("[Final Emperial Tomb] Loaded " + _spawnZoneList.size() + " spawn zones data.");
|
||||
_log.info("[Final Emperial Tomb] Loaded " + spawnCount + " spawns data.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditions(L2PcInstance player)
|
||||
{
|
||||
if (debug || player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -585,10 +579,6 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
{
|
||||
try
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
_log.info("[Final Emperial Tomb] Starting " + world.getStatus() + ". status.");
|
||||
}
|
||||
world.npcList.clear();
|
||||
switch (world.getStatus())
|
||||
{
|
||||
@@ -731,10 +721,6 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
{
|
||||
if ((InstanceManager.getInstance().getWorld(_world.getInstanceId()) != _world) || _world.portraits.isEmpty())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
_log.info("[Final Emperial Tomb] Instance is deleted or all Portraits is killed.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (int i : _world.portraits.values())
|
||||
@@ -1480,10 +1466,6 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
if (npc.getId() == HALL_ALARM)
|
||||
{
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(new StatusTask(world, 0), 2000);
|
||||
if (debug)
|
||||
{
|
||||
_log.info("[Final Emperial Tomb] Hall alarm is disabled, doors will open!");
|
||||
}
|
||||
}
|
||||
else if (npc.getId() == DARK_CHOIR_PLAYER)
|
||||
{
|
||||
@@ -1491,10 +1473,6 @@ public final class FinalEmperialTomb extends AbstractInstance
|
||||
if (world.darkChoirPlayerCount < 1)
|
||||
{
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(new StatusTask(world, 2), 2000);
|
||||
if (debug)
|
||||
{
|
||||
_log.info("[Final Emperial Tomb] All Dark Choir Players are killed, doors will open!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (npc.getId() == SCARLET2)
|
||||
|
@@ -542,7 +542,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(killer);
|
||||
if ((tmpworld instanceof HuRWorld))
|
||||
if (tmpworld instanceof HuRWorld)
|
||||
{
|
||||
final HuRWorld world = (HuRWorld) tmpworld;
|
||||
if (world.isStatus(0))
|
||||
@@ -708,7 +708,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
case KRAKIA_LOTUS:
|
||||
case WEISS_ELE:
|
||||
{
|
||||
if ((npc.getId() != world.currentNpc))
|
||||
if (npc.getId() != world.currentNpc)
|
||||
{
|
||||
for (L2Npc livingNpc : world.spawnedNpc)
|
||||
{
|
||||
|
@@ -119,7 +119,7 @@ public final class IceQueensCastle extends AbstractInstance
|
||||
case "TIMER_PC_LEAVE":
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10285_MeetingSirra.class.getSimpleName());
|
||||
if ((qs != null))
|
||||
if (qs != null)
|
||||
{
|
||||
qs.setMemoState(3);
|
||||
qs.setCond(10, true);
|
||||
@@ -165,7 +165,7 @@ public final class IceQueensCastle extends AbstractInstance
|
||||
public String onSpellFinished(L2Npc npc, L2PcInstance player, Skill skill)
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
if ((tmpworld != null) && (tmpworld instanceof IQCWorld) && (skill == ETHERNAL_BLIZZARD.getSkill()) && (((IQCWorld) tmpworld).player != null))
|
||||
if ((tmpworld instanceof IQCWorld) && (skill == ETHERNAL_BLIZZARD.getSkill()) && (((IQCWorld) tmpworld).player != null))
|
||||
{
|
||||
startQuestTimer("TIMER_SCENE_21", 1000, npc, ((IQCWorld) tmpworld).player);
|
||||
}
|
||||
|
@@ -203,7 +203,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof IQCNBWorld))
|
||||
if (tmpworld instanceof IQCNBWorld)
|
||||
{
|
||||
final IQCNBWorld world = (IQCNBWorld) tmpworld;
|
||||
switch (event)
|
||||
@@ -339,7 +339,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
}
|
||||
}
|
||||
|
||||
final L2RaidBossInstance glakias = (L2RaidBossInstance) addSpawn((world.isHardCore ? GLAKIAS_HARD : GLAKIAS_EASY), GLAKIAS_SPAWN, false, 0, true, world.getInstanceId());
|
||||
final L2RaidBossInstance glakias = (L2RaidBossInstance) addSpawn(world.isHardCore ? GLAKIAS_HARD : GLAKIAS_EASY, GLAKIAS_SPAWN, false, 0, true, world.getInstanceId());
|
||||
startQuestTimer("LEADER_DELAY", 5000, glakias, null);
|
||||
|
||||
if (world.isHardCore)
|
||||
@@ -382,7 +382,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
world.setStatus(4);
|
||||
world.freya.deleteMe();
|
||||
world.canSpawnMobs = true;
|
||||
world.freya = (L2GrandBossInstance) addSpawn((world.isHardCore ? FREYA_STAND_HARD : FREYA_STAND_EASY), FREYA_SPAWN, false, 0, true, world.getInstanceId());
|
||||
world.freya = (L2GrandBossInstance) addSpawn(world.isHardCore ? FREYA_STAND_HARD : FREYA_STAND_EASY, FREYA_SPAWN, false, 0, true, world.getInstanceId());
|
||||
world.controller.getVariables().set("FREYA_MOVE", 0);
|
||||
notifyEvent("START_SPAWN", world.controller, null);
|
||||
startQuestTimer("START_MOVE", 10000, world.controller, null);
|
||||
@@ -426,7 +426,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
final Skill skill = (world.isHardCore ? BLIZZARD_HARD.getSkill() : BLIZZARD_EASY.getSkill());
|
||||
final Skill skill = world.isHardCore ? BLIZZARD_HARD.getSkill() : BLIZZARD_EASY.getSkill();
|
||||
world.freya.doCast(skill);
|
||||
manageScreenMsg(world, NpcStringId.STRONG_MAGIC_POWER_CAN_BE_FELT_FROM_SOMEWHERE);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
|
||||
for (Location loc : KNIGHTS_LOC)
|
||||
{
|
||||
final L2Attackable knight = (L2Attackable) addSpawn((world.isHardCore ? KNIGHT_HARD : KNIGHT_EASY), loc, false, 0, false, world.getInstanceId());
|
||||
final L2Attackable knight = (L2Attackable) addSpawn(world.isHardCore ? KNIGHT_HARD : KNIGHT_EASY, loc, false, 0, false, world.getInstanceId());
|
||||
knight.disableCoreAI(true);
|
||||
knight.setDisplayEffect(1);
|
||||
knight.getSpawn().setLocation(loc);
|
||||
@@ -525,7 +525,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
knight.getSpawn().setLocation(loc);
|
||||
world.spawnedMobs.add(knight);
|
||||
|
||||
startQuestTimer("ICE_RUPTURE", ((world.isHardCore ? getRandom(5, 10) : getRandom(15, 20)) * 1000), knight, null);
|
||||
startQuestTimer("ICE_RUPTURE", (world.isHardCore ? getRandom(5, 10) : getRandom(15, 20)) * 1000, knight, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -628,7 +628,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
|
||||
for (L2PcInstance players : world.playersInside)
|
||||
{
|
||||
if ((players != null))
|
||||
if (players != null)
|
||||
{
|
||||
players.broadcastPacket(ExChangeClientEffectInfo.STATIC_FREYA_DEFAULT);
|
||||
}
|
||||
@@ -656,7 +656,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
|
||||
for (L2Character characters : npc.getKnownList().getKnownPlayersInRadius(1000))
|
||||
{
|
||||
if ((characters != null))
|
||||
if (characters != null)
|
||||
{
|
||||
mob.addDamageHate(characters, 0, getRandom(10000, 20000));
|
||||
}
|
||||
@@ -819,13 +819,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (canReachMostHated && npc.checkDoCastConditions(ICE_BALL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
if (canReachMostHated && npc.checkDoCastConditions(ICE_BALL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
}
|
||||
else if (getRandom(10000) < 800)
|
||||
@@ -838,13 +835,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (canReachMostHated && npc.checkDoCastConditions(SUMMON_ELEMENTAL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
if (canReachMostHated && npc.checkDoCastConditions(SUMMON_ELEMENTAL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
}
|
||||
else if ((getRandom(10000) < 1500) && !npc.isAffectedBySkill(SELF_NOVA.getSkillId()) && npc.checkDoCastConditions(SELF_NOVA.getSkill()) && !npc.isCastingNow())
|
||||
@@ -898,13 +892,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (canReachMostHated && npc.checkDoCastConditions(ICE_BALL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
if (canReachMostHated && npc.checkDoCastConditions(ICE_BALL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(ICE_BALL.getSkill());
|
||||
}
|
||||
}
|
||||
else if (getRandom(10000) < 1333)
|
||||
@@ -917,13 +908,10 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (canReachMostHated && npc.checkDoCastConditions(SUMMON_ELEMENTAL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
if (canReachMostHated && npc.checkDoCastConditions(SUMMON_ELEMENTAL.getSkill()) && !npc.isCastingNow())
|
||||
{
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
npc.setTarget(mostHated);
|
||||
npc.doCast(SUMMON_ELEMENTAL.getSkill());
|
||||
}
|
||||
}
|
||||
else if (getRandom(10000) < 1500)
|
||||
@@ -1083,7 +1071,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
manageRandomAttack(((IQCNBWorld) tmpworld), breath);
|
||||
manageRandomAttack((IQCNBWorld) tmpworld, breath);
|
||||
}
|
||||
((IQCNBWorld) tmpworld).spawnedMobs.add(breath);
|
||||
startQuestTimer("BLIZZARD", 20000, breath, null);
|
||||
@@ -1154,7 +1142,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
world.freya.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, MIDDLE_POINT);
|
||||
}
|
||||
|
||||
if ((knightCount < 10) && (world.isStatus(2)))
|
||||
if ((knightCount < 10) && world.isStatus(2))
|
||||
{
|
||||
knightCount++;
|
||||
var.set("KNIGHT_COUNT", knightCount);
|
||||
@@ -1168,7 +1156,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
|
||||
if (spawnedBy != null)
|
||||
{
|
||||
startQuestTimer("SPAWN_KNIGHT", ((world.isHardCore ? getRandom(30, 60) : getRandom(50, 60)) * 1000), spawnedBy, null);
|
||||
startQuestTimer("SPAWN_KNIGHT", (world.isHardCore ? getRandom(30, 60) : getRandom(50, 60)) * 1000, spawnedBy, null);
|
||||
}
|
||||
world.spawnedMobs.remove(npc);
|
||||
break;
|
||||
@@ -1310,7 +1298,7 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
}
|
||||
|
||||
Collections.shuffle(players);
|
||||
final L2PcInstance target = (!players.isEmpty()) ? players.get(0) : null;
|
||||
final L2PcInstance target = !players.isEmpty() ? players.get(0) : null;
|
||||
if (target != null)
|
||||
{
|
||||
addAttackDesire(mob, target);
|
||||
|
@@ -1217,7 +1217,7 @@ public final class Kamaloka extends AbstractInstance
|
||||
* @param index (0-18) index of the kamaloka in arrays
|
||||
* @return true if party allowed to enter
|
||||
*/
|
||||
private static final boolean checkPartyConditions(L2PcInstance player, int index)
|
||||
private static boolean checkPartyConditions(L2PcInstance player, int index)
|
||||
{
|
||||
final L2Party party = player.getParty();
|
||||
// player must be in party
|
||||
@@ -1294,7 +1294,7 @@ public final class Kamaloka extends AbstractInstance
|
||||
* Removing all buffs from player and pet except BUFFS_WHITELIST
|
||||
* @param ch player
|
||||
*/
|
||||
private static final void removeBuffs(L2Character ch)
|
||||
private static void removeBuffs(L2Character ch)
|
||||
{
|
||||
final Function<BuffInfo, Boolean> removeBuffs = info ->
|
||||
{
|
||||
|
@@ -216,7 +216,7 @@ public final class KartiasLabyrinth extends AbstractInstance
|
||||
}
|
||||
case "request_zellaka_party":
|
||||
{
|
||||
if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
|
||||
if ((player.getParty() == null) || !player.getParty().isLeader(player))
|
||||
{
|
||||
htmltext = "33647-7.htm";
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public final class KartiasLabyrinth extends AbstractInstance
|
||||
}
|
||||
case "request_pelline_party":
|
||||
{
|
||||
if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
|
||||
if ((player.getParty() == null) || !player.getParty().isLeader(player))
|
||||
{
|
||||
htmltext = "33647-7.htm";
|
||||
}
|
||||
@@ -268,7 +268,7 @@ public final class KartiasLabyrinth extends AbstractInstance
|
||||
}
|
||||
case "request_kalios_party":
|
||||
{
|
||||
if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
|
||||
if ((player.getParty() == null) || !player.getParty().isLeader(player))
|
||||
{
|
||||
htmltext = "33647-7.htm";
|
||||
}
|
||||
@@ -732,11 +732,7 @@ public final class KartiasLabyrinth extends AbstractInstance
|
||||
entryResetTime.set(Calendar.HOUR, 6);
|
||||
entryResetTime.set(Calendar.MINUTE, 30);
|
||||
entryResetTime.set(Calendar.AM_PM, Calendar.AM);
|
||||
if (lastEntry < entryResetTime.getTimeInMillis())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return lastEntry < entryResetTime.getTimeInMillis();
|
||||
}
|
||||
|
||||
private String removeVanguard(L2PcInstance player, int removedNpcId)
|
||||
|
@@ -486,12 +486,9 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
world.incStatus();
|
||||
}
|
||||
else
|
||||
else if (getRandomBoolean())
|
||||
{
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
npc.dropItem(killer, BELIS_MARK, 1);
|
||||
}
|
||||
npc.dropItem(killer, BELIS_MARK, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ public final class MithrilMine extends AbstractInstance
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10284_AcquisitionOfDivineSword.class.getSimpleName());
|
||||
if ((qs != null))
|
||||
if (qs != null)
|
||||
{
|
||||
if (qs.isMemoState(2))
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public final class MithrilMine extends AbstractInstance
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
final MMWorld _world = ((MMWorld) world);
|
||||
final MMWorld _world = (MMWorld) world;
|
||||
|
||||
if (npc.getId() == KEGOR)
|
||||
{
|
||||
|
@@ -165,7 +165,7 @@ public final class NightmareKamaloka extends AbstractInstance
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final InstanceWorld tmpWorld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
if ((tmpWorld != null) && (tmpWorld instanceof NKWorld))
|
||||
if (tmpWorld instanceof NKWorld)
|
||||
{
|
||||
final NKWorld world = (NKWorld) tmpWorld;
|
||||
switch (npc.getId())
|
||||
|
@@ -205,7 +205,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
final InstanceWorld inst = InstanceManager.getInstance().getWorld(player.getInstanceId());
|
||||
if (inst instanceof NornilsWorld)
|
||||
{
|
||||
final NornilsWorld world = ((NornilsWorld) inst);
|
||||
final NornilsWorld world = (NornilsWorld) inst;
|
||||
world.removeAllowed(player.getObjectId());
|
||||
teleportPlayer(player, EXIT_PPL, 0);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
}
|
||||
// Creating new instance
|
||||
final String result = checkConditions(npc, player);
|
||||
if (!(result.equalsIgnoreCase("ok")))
|
||||
if (!result.equalsIgnoreCase("ok"))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
final InstanceWorld inst = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
if (inst instanceof NornilsWorld)
|
||||
{
|
||||
final NornilsWorld world = ((NornilsWorld) inst);
|
||||
final NornilsWorld world = (NornilsWorld) inst;
|
||||
if (npc.equals(world.first_npc) && !world.spawned_1)
|
||||
{
|
||||
world.spawned_1 = true;
|
||||
@@ -308,7 +308,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
final InstanceWorld inst = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
if (inst instanceof NornilsWorld)
|
||||
{
|
||||
final NornilsWorld world = ((NornilsWorld) inst);
|
||||
final NornilsWorld world = (NornilsWorld) inst;
|
||||
if (!world.spawned_2)
|
||||
{
|
||||
world.spawned_2 = true;
|
||||
@@ -326,7 +326,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
final InstanceWorld inst = InstanceManager.getInstance().getWorld(cha.getInstanceId());
|
||||
if (inst instanceof NornilsWorld)
|
||||
{
|
||||
final NornilsWorld world = ((NornilsWorld) inst);
|
||||
final NornilsWorld world = (NornilsWorld) inst;
|
||||
if (!world.spawned_3)
|
||||
{
|
||||
world.spawned_3 = true;
|
||||
@@ -344,7 +344,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
final InstanceWorld inst = InstanceManager.getInstance().getWorld(cha.getInstanceId());
|
||||
if (inst instanceof NornilsWorld)
|
||||
{
|
||||
final NornilsWorld world = ((NornilsWorld) inst);
|
||||
final NornilsWorld world = (NornilsWorld) inst;
|
||||
if (!world.spawned_4)
|
||||
{
|
||||
world.spawned_4 = true;
|
||||
@@ -367,7 +367,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
}
|
||||
}
|
||||
|
||||
private static final String checkConditions(L2Npc npc, L2PcInstance player)
|
||||
private static String checkConditions(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final L2Party party = player.getParty();
|
||||
// player must be in party
|
||||
@@ -428,7 +428,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
return "ok";
|
||||
}
|
||||
|
||||
private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
|
||||
private static void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
|
||||
{
|
||||
final int chance = getRandom(100);
|
||||
for (int[] element : drop)
|
||||
@@ -440,7 +440,7 @@ public final class NornilsGarden extends AbstractInstance
|
||||
}
|
||||
}
|
||||
|
||||
private static final void giveBuffs(L2Character ch)
|
||||
private static void giveBuffs(L2Character ch)
|
||||
{
|
||||
if (skill1 != null)
|
||||
{
|
||||
|
@@ -121,7 +121,7 @@ public final class PailakaDevilsLegacy extends AbstractInstance
|
||||
htmltext = "32498-02.htm";
|
||||
}
|
||||
}
|
||||
else if ((tmpworld != null) && (tmpworld instanceof DIWorld))
|
||||
else if (tmpworld instanceof DIWorld)
|
||||
{
|
||||
final DIWorld world = (DIWorld) tmpworld;
|
||||
|
||||
@@ -177,7 +177,7 @@ public final class PailakaDevilsLegacy extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof DIWorld))
|
||||
if (tmpworld instanceof DIWorld)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
@@ -265,7 +265,7 @@ public final class PailakaDevilsLegacy extends AbstractInstance
|
||||
{
|
||||
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
|
||||
|
||||
if ((tmpworld != null) && (tmpworld instanceof DIWorld))
|
||||
if (tmpworld instanceof DIWorld)
|
||||
{
|
||||
final DIWorld world = (DIWorld) tmpworld;
|
||||
|
||||
@@ -285,7 +285,7 @@ public final class PailakaDevilsLegacy extends AbstractInstance
|
||||
@Override
|
||||
public String onEnterZone(L2Character character, L2ZoneType zone)
|
||||
{
|
||||
if ((character.isPlayer()) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
|
||||
if (character.isPlayer() && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
|
||||
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
|
||||
@@ -303,7 +303,7 @@ public final class PailakaDevilsLegacy extends AbstractInstance
|
||||
{
|
||||
for (L2Summon summon : character.getServitors().values())
|
||||
{
|
||||
if (((summon.getTemplate().getId() == TIGRESS_LVL1) || (summon.getTemplate().getId() == TIGRESS_LVL2)))
|
||||
if ((summon.getTemplate().getId() == TIGRESS_LVL1) || (summon.getTemplate().getId() == TIGRESS_LVL2))
|
||||
{
|
||||
if (!summon.isDead())
|
||||
{
|
||||
|
@@ -172,7 +172,7 @@ public final class PailakaSongOfIceAndFire extends AbstractInstance
|
||||
@Override
|
||||
public String onExitZone(L2Character character, L2ZoneType zone)
|
||||
{
|
||||
if ((character.isPlayer()) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
|
||||
if (character.isPlayer() && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
|
||||
{
|
||||
final InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
|
||||
if ((world != null) && (world.getTemplateId() == TEMPLATE_ID))
|
||||
|
@@ -75,7 +75,7 @@ public final class SanctumOftheLordsOfDawn extends AbstractInstance
|
||||
static final class HSWorld extends InstanceWorld
|
||||
{
|
||||
int doorst = 0;
|
||||
final static Map<Integer, List<L2Npc>> _save_point = new HashMap<>();
|
||||
static final Map<Integer, List<L2Npc>> _save_point = new HashMap<>();
|
||||
|
||||
static Map<Integer, List<L2Npc>> getMonsters()
|
||||
{
|
||||
|
@@ -201,17 +201,17 @@ public class TalkingIsland extends AbstractInstance
|
||||
{
|
||||
final QuestState qs = player.getQuestState(Q10385_RedThreadOfFate.class.getSimpleName());
|
||||
String htmltext = null;
|
||||
if ((qs != null))
|
||||
if (qs != null)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case DARIN:
|
||||
{
|
||||
if ((qs.isCond(19)) && qs.isMemoState(0))
|
||||
if (qs.isCond(19) && qs.isMemoState(0))
|
||||
{
|
||||
htmltext = "33748-01.html";
|
||||
}
|
||||
else if ((qs.isCond(19)) && qs.isMemoState(1))
|
||||
else if (qs.isCond(19) && qs.isMemoState(1))
|
||||
{
|
||||
htmltext = "33748-04.html";
|
||||
}
|
||||
|
Reference in New Issue
Block a user