Code style changes.
This commit is contained in:
@@ -241,7 +241,7 @@ final class Alarm extends AbstractNpcAI
|
||||
* @param memoState the memo state, if memo state is less than zero, only quest state is checked
|
||||
* @return {@code true} if the player has the memo state, {@code false} otherwise
|
||||
*/
|
||||
private static final boolean verifyMemoState(L2PcInstance player, int questId, int memoState)
|
||||
private static boolean verifyMemoState(L2PcInstance player, int questId, int memoState)
|
||||
{
|
||||
QuestState qs = null;
|
||||
switch (questId)
|
||||
@@ -266,7 +266,7 @@ final class Alarm extends AbstractNpcAI
|
||||
* @param questId the quest ID
|
||||
* @param memoState the memo state
|
||||
*/
|
||||
private static final void setMemoState(L2PcInstance player, int questId, int memoState)
|
||||
private static void setMemoState(L2PcInstance player, int questId, int memoState)
|
||||
{
|
||||
QuestState qs = null;
|
||||
switch (questId)
|
||||
@@ -295,7 +295,7 @@ final class Alarm extends AbstractNpcAI
|
||||
* @param slot the slot
|
||||
* @return the memo state ex
|
||||
*/
|
||||
private static final int getMemoStateEx(L2PcInstance player, int questId, int slot)
|
||||
private static int getMemoStateEx(L2PcInstance player, int questId, int slot)
|
||||
{
|
||||
QuestState qs = null;
|
||||
switch (questId)
|
||||
@@ -321,7 +321,7 @@ final class Alarm extends AbstractNpcAI
|
||||
* @param slot the slot
|
||||
* @param memoStateEx the memo state ex
|
||||
*/
|
||||
private static final void setMemoStateEx(L2PcInstance player, int questId, int slot, int memoStateEx)
|
||||
private static void setMemoStateEx(L2PcInstance player, int questId, int slot, int memoStateEx)
|
||||
{
|
||||
QuestState qs = null;
|
||||
switch (questId)
|
||||
|
@@ -58,16 +58,16 @@ public final class AwakeningMaster extends AbstractNpcAI
|
||||
private static final int AEORE_MASTER = 33404;
|
||||
// Items
|
||||
private static final int SCROLL_OF_AFTERLIFE = 17600;
|
||||
private final static int ABELIUS_POWER = 32264;
|
||||
private final static int SAPYROS_POWER = 32265;
|
||||
private final static int ASHAGEN_POWER = 32266;
|
||||
private final static int CRANIGG_POWER = 32267;
|
||||
private final static int SOLTKREIG_POWER = 32268;
|
||||
private final static int NAVIAROPE_POWER = 32269;
|
||||
private final static int LEISTER_POWER = 32270;
|
||||
private final static int LAKCIS_POWER = 32271;
|
||||
private static final int ABELIUS_POWER = 32264;
|
||||
private static final int SAPYROS_POWER = 32265;
|
||||
private static final int ASHAGEN_POWER = 32266;
|
||||
private static final int CRANIGG_POWER = 32267;
|
||||
private static final int SOLTKREIG_POWER = 32268;
|
||||
private static final int NAVIAROPE_POWER = 32269;
|
||||
private static final int LEISTER_POWER = 32270;
|
||||
private static final int LAKCIS_POWER = 32271;
|
||||
// Other
|
||||
private final static int AWAKENING_END_USM_ID = 10;
|
||||
private static final int AWAKENING_END_USM_ID = 10;
|
||||
|
||||
private AwakeningMaster()
|
||||
{
|
||||
|
@@ -56,7 +56,7 @@ final class BlackJudge extends AbstractNpcAI
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = null;
|
||||
final int level = ((player.getExpertiseLevel() < 5) ? player.getExpertiseLevel() : 5);
|
||||
final int level = (player.getExpertiseLevel() < 5) ? player.getExpertiseLevel() : 5;
|
||||
switch (event)
|
||||
{
|
||||
case "remove_info":
|
||||
|
@@ -140,7 +140,7 @@ final class CastleAmbassador extends AbstractNpcAI
|
||||
|
||||
if (player.isClanLeader() && (player.getClanId() == fortOwner))
|
||||
{
|
||||
htmltext = (fortresss.isBorderFortress()) ? "ambassador-01.html" : "ambassador.html";
|
||||
htmltext = fortresss.isBorderFortress() ? "ambassador-01.html" : "ambassador.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -65,7 +65,7 @@ final class CastleBlacksmith extends AbstractNpcAI
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return (hasRights(player, npc)) ? npc.getId() + "-01.html" : "no.html";
|
||||
return hasRights(player, npc) ? npc.getId() + "-01.html" : "no.html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@@ -725,7 +725,7 @@ final class CastleChamberlain extends AbstractNpcAI
|
||||
{
|
||||
if (isOwner(player, npc) && player.hasClanPrivilege(ClanPrivilege.CS_TAXES))
|
||||
{
|
||||
final long amount = (st.hasMoreTokens()) ? Long.parseLong(st.nextToken()) : 0;
|
||||
final long amount = st.hasMoreTokens() ? Long.parseLong(st.nextToken()) : 0;
|
||||
if ((amount > 0) && (amount < Inventory.MAX_ADENA))
|
||||
{
|
||||
if (player.getAdena() >= amount)
|
||||
@@ -750,10 +750,10 @@ final class CastleChamberlain extends AbstractNpcAI
|
||||
{
|
||||
if (isOwner(player, npc) && player.hasClanPrivilege(ClanPrivilege.CS_TAXES))
|
||||
{
|
||||
final long amount = (st.hasMoreTokens()) ? Long.parseLong(st.nextToken()) : 0;
|
||||
final long amount = st.hasMoreTokens() ? Long.parseLong(st.nextToken()) : 0;
|
||||
if (amount <= castle.getTreasury())
|
||||
{
|
||||
castle.addToTreasuryNoTax((-1) * amount);
|
||||
castle.addToTreasuryNoTax(-1 * amount);
|
||||
giveAdena(player, amount, false);
|
||||
htmltext = "chamberlain-01.html";
|
||||
}
|
||||
@@ -851,12 +851,12 @@ final class CastleChamberlain extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
final boolean open = (Integer.parseInt(st.nextToken()) == 1);
|
||||
final boolean open = Integer.parseInt(st.nextToken()) == 1;
|
||||
while (st.hasMoreTokens())
|
||||
{
|
||||
castle.openCloseDoor(player, Integer.parseInt(st.nextToken()), open);
|
||||
}
|
||||
htmltext = (open ? "chamberlain-05.html" : "chamberlain-06.html");
|
||||
htmltext = open ? "chamberlain-05.html" : "chamberlain-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -972,13 +972,13 @@ final class CastleChamberlain extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "chamberlain-21.html";
|
||||
}
|
||||
else if (castle.getFunction(Castle.FUNC_TELEPORT) == null)
|
||||
else if (castle.getFunction(Castle.FUNC_TELEPORT) != null)
|
||||
{
|
||||
htmltext = "castlefuncdisabled.html";
|
||||
htmltext = npc.getCastle().getName() + "-t" + castle.getFunction(Castle.FUNC_TELEPORT).getLvl() + ".html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = npc.getCastle().getName() + "-t" + castle.getFunction(Castle.FUNC_TELEPORT).getLvl() + ".html";
|
||||
htmltext = "castlefuncdisabled.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1164,7 +1164,7 @@ final class CastleChamberlain extends AbstractNpcAI
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return (isOwner(player, npc)) ? "chamberlain-01.html" : "chamberlain-04.html";
|
||||
return isOwner(player, npc) ? "chamberlain-01.html" : "chamberlain-04.html";
|
||||
}
|
||||
|
||||
// @formatter:off
|
||||
|
@@ -68,16 +68,13 @@ final class CastleSiegeManager extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "CastleSiegeManager-02.html";
|
||||
}
|
||||
else if (npc.getConquerableHall() != null)
|
||||
{
|
||||
npc.getConquerableHall().showSiegeInfo(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.getConquerableHall() != null)
|
||||
{
|
||||
npc.getConquerableHall().showSiegeInfo(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.getCastle().getSiege().listRegisterClan(player);
|
||||
}
|
||||
npc.getCastle().getSiege().listRegisterClan(player);
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ final class CastleTeleporter extends AbstractNpcAI
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final Siege siege = npc.getCastle().getSiege();
|
||||
return (npc.isScriptValue(0)) ? (siege.isInProgress() && (siege.getControlTowerCount() == 0)) ? "teleporter-02.html" : "teleporter-01.html" : "teleporter-03.html";
|
||||
return npc.isScriptValue(0) ? (siege.isInProgress() && (siege.getControlTowerCount() == 0)) ? "teleporter-02.html" : "teleporter-01.html" : "teleporter-03.html";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@@ -66,7 +66,7 @@ final class CastleWarehouse extends AbstractNpcAI
|
||||
}
|
||||
case "warehouse-04.html":
|
||||
{
|
||||
htmltext = (!npc.isMyLord(player)) ? "warehouse-no.html" : getHtm(player.getHtmlPrefix(), "warehouse-04.html").replace("%blood%", Integer.toString(player.getClan().getBloodAllianceCount()));
|
||||
htmltext = !npc.isMyLord(player) ? "warehouse-no.html" : getHtm(player.getHtmlPrefix(), "warehouse-04.html").replace("%blood%", Integer.toString(player.getClan().getBloodAllianceCount()));
|
||||
break;
|
||||
}
|
||||
case "Receive":
|
||||
|
@@ -119,7 +119,7 @@ final class DragonVortex extends AbstractNpcAI
|
||||
if (!unspawnedRaids.isEmpty())
|
||||
{
|
||||
final int unspawnedRaidsSize = unspawnedRaids.size();
|
||||
final int chanceIncrease = (raidChanceIncrease / unspawnedRaidsSize);
|
||||
final int chanceIncrease = raidChanceIncrease / unspawnedRaidsSize;
|
||||
int raidChanceValue = 0;
|
||||
|
||||
for (int[] unspawnedRaidsList : unspawnedRaids)
|
||||
@@ -172,7 +172,7 @@ final class DragonVortex extends AbstractNpcAI
|
||||
for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(npcId))
|
||||
{
|
||||
final L2Npc spawnedWarpgate = spawn.getLastSpawn();
|
||||
if ((spawnedWarpgate != null))
|
||||
if (spawnedWarpgate != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -135,33 +135,29 @@ final class ForgeOfTheGods extends AbstractNpcAI
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[2], LAVASAURUSES[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
// if (_npcsAlive < 32)
|
||||
else if ((_npcCount > BONUS_UPPER_LV05) && (rand <= FORGE_BONUS02))
|
||||
{
|
||||
if ((_npcCount > BONUS_UPPER_LV05) && (rand <= FORGE_BONUS02))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[1], npc, true);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV04)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[4], LAVASAURUSES[3]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV03)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[3], LAVASAURUSES[2]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV02)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[2], LAVASAURUSES[1]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV01)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[1], LAVASAURUSES[0]);
|
||||
}
|
||||
else if ((_npcCount >= MOBCOUNT_BONUS_MIN) && (rand <= FORGE_BONUS01))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[0], npc, true);
|
||||
}
|
||||
mob = addSpawn(LAVASAURUSES[1], npc, true);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV04)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[4], LAVASAURUSES[3]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV03)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[3], LAVASAURUSES[2]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV02)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[2], LAVASAURUSES[1]);
|
||||
}
|
||||
else if (_npcCount > BONUS_UPPER_LV01)
|
||||
{
|
||||
mob = spawnLavasaurus(npc, rand, LAVASAURUSES[1], LAVASAURUSES[0]);
|
||||
}
|
||||
else if ((_npcCount >= MOBCOUNT_BONUS_MIN) && (rand <= FORGE_BONUS01))
|
||||
{
|
||||
mob = addSpawn(LAVASAURUSES[0], npc, true);
|
||||
}
|
||||
if (mob != null)
|
||||
{
|
||||
|
@@ -106,7 +106,7 @@ final class FortressSiegeManager extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "FortressSiegeManager-10.html";
|
||||
}
|
||||
else if ((clan.getLevel() < FortSiegeManager.getInstance().getSiegeClanMinLevel()))
|
||||
else if (clan.getLevel() < FortSiegeManager.getInstance().getSiegeClanMinLevel())
|
||||
{
|
||||
htmltext = "FortressSiegeManager-04.html";
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ final class Hardin extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "33870-01.html";
|
||||
}
|
||||
else if ((player.getRace() != Race.ERTHEIA) && (CategoryData.getInstance().isInCategory(CategoryType.AWAKEN_GROUP, player.getBaseClassId())))
|
||||
else if ((player.getRace() != Race.ERTHEIA) && CategoryData.getInstance().isInCategory(CategoryType.AWAKEN_GROUP, player.getBaseClassId()))
|
||||
{
|
||||
htmltext = "33870-02.html";
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ final class KetraOrcSupport extends AbstractNpcAI
|
||||
{
|
||||
if (hasQuestItems(player, KETRA_MARKS[i]))
|
||||
{
|
||||
return (i + 1);
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@@ -112,7 +112,7 @@ final class LaVieEnRose extends AbstractNpcAI
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", (5 * 60 * 1000), npc, null, true);
|
||||
startQuestTimer("SPAM_TEXT", 5 * 60 * 1000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,7 @@ public final class MentorGuide extends AbstractNpcAI implements IXmlReader
|
||||
private static final int DIPLOMA = 33805;
|
||||
|
||||
// Skills
|
||||
private final static SkillHolder[] MENTEE_BUFFS =
|
||||
private static final SkillHolder[] MENTEE_BUFFS =
|
||||
{
|
||||
new SkillHolder(9227, 1), // Mentor's Poem of Horn
|
||||
new SkillHolder(9228, 1), // Mentor's Poem of Drum
|
||||
|
@@ -208,7 +208,7 @@ final class Minigame extends AbstractNpcAI
|
||||
|
||||
if (npc.getTarget() == null)
|
||||
{
|
||||
htmltext = (miniGameStarted ? "32758-08.html" : "32758.html");
|
||||
htmltext = miniGameStarted ? "32758-08.html" : "32758.html";
|
||||
}
|
||||
else if (npc.getTarget() == talker)
|
||||
{
|
||||
@@ -291,23 +291,20 @@ final class Minigame extends AbstractNpcAI
|
||||
startQuestTimer("end", 4000, room.getManager(), null);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (room.getAttemptNumber() == MAX_ATTEMPTS)
|
||||
{
|
||||
if (room.getAttemptNumber() == MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.getParticipant().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == room);
|
||||
startQuestTimer("end", 4000, room.getManager(), null);
|
||||
}
|
||||
else if (room.getAttemptNumber() < MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.setAttemptNumber(room.getAttemptNumber() + 1);
|
||||
}
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.getParticipant().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == room);
|
||||
startQuestTimer("end", 4000, room.getManager(), null);
|
||||
}
|
||||
else if (room.getAttemptNumber() < MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.setAttemptNumber(room.getAttemptNumber() + 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -76,12 +76,9 @@ class NpcBufferAI implements Runnable
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (Util.checkIfInRange(skill.getAffectRange(), _npc, player, true) && !player.isDead())
|
||||
{
|
||||
if (Util.checkIfInRange(skill.getAffectRange(), _npc, player, true) && !player.isDead())
|
||||
{
|
||||
skill.applyEffects(player, player);
|
||||
}
|
||||
skill.applyEffects(player, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -66,14 +66,14 @@ public final class Raina extends AbstractNpcAI
|
||||
private static final int RAINA = 33491;
|
||||
// Items
|
||||
private static final int SUBCLASS_CERTIFICATE = 30433;
|
||||
private final static int ABELIUS_POWER = 32264;
|
||||
private final static int SAPYROS_POWER = 32265;
|
||||
private final static int ASHAGEN_POWER = 32266;
|
||||
private final static int CRANIGG_POWER = 32267;
|
||||
private final static int SOLTKREIG_POWER = 32268;
|
||||
private final static int NAVIAROPE_POWER = 32269;
|
||||
private final static int LEISTER_POWER = 32270;
|
||||
private final static int LAKCIS_POWER = 32271;
|
||||
private static final int ABELIUS_POWER = 32264;
|
||||
private static final int SAPYROS_POWER = 32265;
|
||||
private static final int ASHAGEN_POWER = 32266;
|
||||
private static final int CRANIGG_POWER = 32267;
|
||||
private static final int SOLTKREIG_POWER = 32268;
|
||||
private static final int NAVIAROPE_POWER = 32269;
|
||||
private static final int LEISTER_POWER = 32270;
|
||||
private static final int LAKCIS_POWER = 32271;
|
||||
// Misc
|
||||
private static final Set<PlayerClass> mainSubclassSet;
|
||||
private static final Set<PlayerClass> neverSubclassed = EnumSet.of(PlayerClass.Overlord, PlayerClass.Warsmith);
|
||||
@@ -529,7 +529,7 @@ public final class Raina extends AbstractNpcAI
|
||||
case 5: // Reawaken (change dual class)
|
||||
{
|
||||
final int classId = event.getReply();
|
||||
if (player.isTransformed() || player.hasSummon() || (!player.hasDualClass() || !player.isDualClassActive() || (player.getClassId().level() != ClassLevel.AWAKEN.ordinal())))
|
||||
if (player.isTransformed() || player.hasSummon() || !player.hasDualClass() || !player.isDualClassActive() || (player.getClassId().level() != ClassLevel.AWAKEN.ordinal()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -549,7 +549,7 @@ public final class Raina extends AbstractNpcAI
|
||||
break;
|
||||
}
|
||||
|
||||
player.reduceAdena((getClass().getSimpleName() + "_Reawaken"), REAWAKEN_PRICE[index], npc, true);
|
||||
player.reduceAdena(getClass().getSimpleName() + "_Reawaken", REAWAKEN_PRICE[index], npc, true);
|
||||
takeItems(player, getCloakId(player), 1);
|
||||
|
||||
final int classIndex = player.getClassIndex();
|
||||
|
@@ -48,11 +48,11 @@ final class Sirra extends AbstractNpcAI
|
||||
|
||||
if ((world != null) && (world.getTemplateId() == FREYA_INSTID))
|
||||
{
|
||||
return (world.isStatus(0)) ? "32762-easy.html" : "32762-easyfight.html";
|
||||
return world.isStatus(0) ? "32762-easy.html" : "32762-easyfight.html";
|
||||
}
|
||||
else if ((world != null) && (world.getTemplateId() == FREYA_HARD_INSTID))
|
||||
{
|
||||
return (world.isStatus(0)) ? "32762-hard.html" : "32762-hardfight.html";
|
||||
return world.isStatus(0) ? "32762-hard.html" : "32762-hardfight.html";
|
||||
}
|
||||
return "32762.html";
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ final class DelusionTeleport extends AbstractNpcAI
|
||||
if (npc.getId() == NPCS[0]) // Pathfinder Worker
|
||||
{
|
||||
final L2TownZone town = TownManager.getTown(npc.getX(), npc.getY(), npc.getZ());
|
||||
final int townId = ((town == null) ? 0 : town.getTownId());
|
||||
final int townId = (town == null) ? 0 : town.getTownId();
|
||||
player.getVariables().set(DELUSION_RETURN, townId);
|
||||
player.teleToLocation(HALL_LOCATIONS[getRandom(HALL_LOCATIONS.length)], false);
|
||||
}
|
||||
|
@@ -28,14 +28,14 @@ import ai.npc.AbstractNpcAI;
|
||||
final class DimensionalWarpTeleport extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private final static int RESED = 33974;
|
||||
private static final int RESED = 33974;
|
||||
// Misc
|
||||
private final static int MIN_LEVEL = 99;
|
||||
private static final int MIN_LEVEL = 99;
|
||||
// Items
|
||||
private final static int WARP_CRYSTAL = 39597;
|
||||
private final static int WARP_CRYSTAL_COUNT = 3;
|
||||
private static final int WARP_CRYSTAL = 39597;
|
||||
private static final int WARP_CRYSTAL_COUNT = 3;
|
||||
// Location
|
||||
private final static Location DIMENSIONAL_WARP = new Location(-76785, -217420, 4016);
|
||||
private static final Location DIMENSIONAL_WARP = new Location(-76785, -217420, 4016);
|
||||
|
||||
private DimensionalWarpTeleport()
|
||||
{
|
||||
@@ -47,7 +47,7 @@ final class DimensionalWarpTeleport extends AbstractNpcAI
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ((hasQuestItems(player, WARP_CRYSTAL)) && (player.getLevel() >= MIN_LEVEL) && (getQuestItemsCount(player, WARP_CRYSTAL) >= WARP_CRYSTAL_COUNT) && (player.isAwaken()))
|
||||
if (hasQuestItems(player, WARP_CRYSTAL) && (player.getLevel() >= MIN_LEVEL) && (getQuestItemsCount(player, WARP_CRYSTAL) >= WARP_CRYSTAL_COUNT) && player.isAwaken())
|
||||
{
|
||||
takeItems(player, WARP_CRYSTAL, 3);
|
||||
player.teleToLocation(DIMENSIONAL_WARP);
|
||||
|
@@ -28,11 +28,11 @@ import ai.npc.AbstractNpcAI;
|
||||
final class HarnakUnderground extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private final static int HADEL = 33344;
|
||||
private static final int HADEL = 33344;
|
||||
// Misc
|
||||
private final static int MIN_LEVEL = 85;
|
||||
private static final int MIN_LEVEL = 85;
|
||||
// Location
|
||||
private final static Location HARNAK_UNDERGROUND = new Location(-114700, 147909, -7720);
|
||||
private static final Location HARNAK_UNDERGROUND = new Location(-114700, 147909, -7720);
|
||||
|
||||
private HarnakUnderground()
|
||||
{
|
||||
@@ -44,7 +44,7 @@ final class HarnakUnderground extends AbstractNpcAI
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ((player.getLevel() >= MIN_LEVEL) && (player.isAwaken()))
|
||||
if ((player.getLevel() >= MIN_LEVEL) && player.isAwaken())
|
||||
{
|
||||
player.teleToLocation(HARNAK_UNDERGROUND);
|
||||
}
|
||||
|
@@ -28,13 +28,13 @@ import ai.npc.AbstractNpcAI;
|
||||
final class KargosTeleport extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private final static int KARGOS = 33821;
|
||||
private static final int KARGOS = 33821;
|
||||
// Items
|
||||
private final static int PAGAN_MARK = 8067;
|
||||
private final static int VISITOR_MARK = 8064;
|
||||
private static final int PAGAN_MARK = 8067;
|
||||
private static final int VISITOR_MARK = 8064;
|
||||
// Locations
|
||||
private final static Location PAGAN_TEMPLE = new Location(-16350, -37579, -10725);
|
||||
private final static Location PAGAN_ROOM = new Location(-12766, -35840, -10851);
|
||||
private static final Location PAGAN_TEMPLE = new Location(-16350, -37579, -10725);
|
||||
private static final Location PAGAN_ROOM = new Location(-12766, -35840, -10851);
|
||||
|
||||
private KargosTeleport()
|
||||
{
|
||||
|
@@ -29,7 +29,7 @@ import ai.npc.AbstractNpcAI;
|
||||
final class MithrilMinesTeleporter extends AbstractNpcAI
|
||||
{
|
||||
// NPC
|
||||
private final static int TELEPORT_CRYSTAL = 32652;
|
||||
private static final int TELEPORT_CRYSTAL = 32652;
|
||||
// Location
|
||||
private static final Location[] LOCS =
|
||||
{
|
||||
|
@@ -31,7 +31,7 @@ import quests.Q00240_ImTheOnlyOneYouCanTrust.Q00240_ImTheOnlyOneYouCanTrust;
|
||||
final class StakatoNestTeleporter extends AbstractNpcAI
|
||||
{
|
||||
// Locations
|
||||
private final static Location[] LOCS =
|
||||
private static final Location[] LOCS =
|
||||
{
|
||||
new Location(80456, -52322, -5640),
|
||||
new Location(88718, -46214, -4640),
|
||||
@@ -40,7 +40,7 @@ final class StakatoNestTeleporter extends AbstractNpcAI
|
||||
new Location(87682, -43291, -4128)
|
||||
};
|
||||
// NPC
|
||||
private final static int KINTAIJIN = 32640;
|
||||
private static final int KINTAIJIN = 32640;
|
||||
|
||||
private StakatoNestTeleporter()
|
||||
{
|
||||
@@ -77,7 +77,7 @@ final class StakatoNestTeleporter extends AbstractNpcAI
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState accessQuest = player.getQuestState(Q00240_ImTheOnlyOneYouCanTrust.class.getSimpleName());
|
||||
return (((accessQuest != null) && accessQuest.isCompleted()) ? "32640.htm" : "32640-no.htm");
|
||||
return ((accessQuest != null) && accessQuest.isCompleted()) ? "32640.htm" : "32640-no.htm";
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@@ -29,7 +29,7 @@ import ai.npc.AbstractNpcAI;
|
||||
final class StrongholdsTeleports extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private final static int[] NPCs =
|
||||
private static final int[] NPCs =
|
||||
{
|
||||
32181,
|
||||
32184,
|
||||
|
@@ -30,14 +30,14 @@ import ai.npc.AbstractNpcAI;
|
||||
final class TeleportWithCharm extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private final static int WHIRPY = 30540;
|
||||
private final static int TAMIL = 30576;
|
||||
private static final int WHIRPY = 30540;
|
||||
private static final int TAMIL = 30576;
|
||||
// Items
|
||||
private final static int ORC_GATEKEEPER_CHARM = 1658;
|
||||
private final static int DWARF_GATEKEEPER_TOKEN = 1659;
|
||||
private static final int ORC_GATEKEEPER_CHARM = 1658;
|
||||
private static final int DWARF_GATEKEEPER_TOKEN = 1659;
|
||||
// Locations
|
||||
private final static Location ORC_TELEPORT = new Location(-80826, 149775, -3043);
|
||||
private final static Location DWARF_TELEPORT = new Location(-80826, 149775, -3043);
|
||||
private static final Location ORC_TELEPORT = new Location(-80826, 149775, -3043);
|
||||
private static final Location DWARF_TELEPORT = new Location(-80826, 149775, -3043);
|
||||
|
||||
private TeleportWithCharm()
|
||||
{
|
||||
|
@@ -188,7 +188,7 @@ final class HealerTrainer extends AbstractNpcAI
|
||||
itemId = -1;
|
||||
}
|
||||
}
|
||||
return (player.getInventory().getInventoryItemCount(itemId, -1) > 0);
|
||||
return player.getInventory().getInventoryItemCount(itemId, -1) > 0;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
|
@@ -91,12 +91,9 @@ final class FirstClassTransferTalk extends AbstractNpcAI
|
||||
htmltext += "mystic.html";
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (npc instanceof L2VillageMasterFighterInstance)
|
||||
{
|
||||
if (npc instanceof L2VillageMasterFighterInstance)
|
||||
{
|
||||
htmltext += "fighter.html";
|
||||
}
|
||||
htmltext += "fighter.html";
|
||||
}
|
||||
}
|
||||
else if (player.getClassId().level() == 1)
|
||||
|
@@ -284,23 +284,17 @@ final class WyvernManager extends AbstractNpcAI
|
||||
{
|
||||
htmltext = "wyvernmanager-02.html";
|
||||
}
|
||||
else if (Config.ALLOW_WYVERN_ALWAYS)
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
}
|
||||
else if (MANAGERS.get(npc.getId()) == ManagerType.CASTLE)
|
||||
{
|
||||
htmltext = "wyvernmanager-dusk.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Config.ALLOW_WYVERN_ALWAYS)
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MANAGERS.get(npc.getId()) == ManagerType.CASTLE)
|
||||
{
|
||||
htmltext = "wyvernmanager-dusk.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
}
|
||||
}
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
Reference in New Issue
Block a user