Some code formatting.

This commit is contained in:
MobiusDev
2016-03-19 08:47:52 +00:00
parent 9a9a5dd414
commit 345b88ad95
106 changed files with 308 additions and 308 deletions

View File

@@ -124,7 +124,7 @@ public abstract class AbstractNpcAI extends Quest
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId), radius);
}
public void spawnMinions(final L2Npc npc, final String spawnName)
public void spawnMinions(L2Npc npc, String spawnName)
{
for (MinionHolder is : npc.getTemplate().getParameters().getMinionList(spawnName))
{

View File

@@ -148,7 +148,7 @@ final class CastleChamberlain extends AbstractNpcAI
return packet;
}
private final String funcConfirmHtml(final L2PcInstance player, final L2Npc npc, final Castle castle, final int func, final int level)
private final String funcConfirmHtml(L2PcInstance player, L2Npc npc, Castle castle, int func, int level)
{
if (isOwner(player, npc) && player.hasClanPrivilege(ClanPrivilege.CS_SET_FUNCTIONS))
{
@@ -177,7 +177,7 @@ final class CastleChamberlain extends AbstractNpcAI
return "chamberlain-21.html";
}
private final void funcReplace(final Castle castle, final NpcHtmlMessage html, final int func, final String str)
private final void funcReplace(Castle castle, NpcHtmlMessage html, int func, String str)
{
final CastleFunction function = castle.getFunction(func);
if (function == null)
@@ -199,7 +199,7 @@ final class CastleChamberlain extends AbstractNpcAI
}
}
private final int getFunctionFee(final int func, final int level)
private final int getFunctionFee(int func, int level)
{
int fee = 0;
switch (func)
@@ -233,7 +233,7 @@ final class CastleChamberlain extends AbstractNpcAI
return fee;
}
private final long getFunctionRatio(final int func)
private final long getFunctionRatio(int func)
{
long ratio = 0;
switch (func)
@@ -267,7 +267,7 @@ final class CastleChamberlain extends AbstractNpcAI
return ratio;
}
private final int getDoorUpgradePrice(final int type, final int level)
private final int getDoorUpgradePrice(int type, int level)
{
int price = 0;
switch (type)
@@ -342,7 +342,7 @@ final class CastleChamberlain extends AbstractNpcAI
return price;
}
private final int getTrapUpgradePrice(final int level)
private final int getTrapUpgradePrice(int level)
{
int price = 0;
switch (level)
@@ -371,7 +371,7 @@ final class CastleChamberlain extends AbstractNpcAI
return price;
}
private final boolean isDomainFortressInContractStatus(final int castleId)
private final boolean isDomainFortressInContractStatus(int castleId)
{
final int numFort = ((castleId == 1) || (castleId == 5)) ? 2 : 1;
final List<Integer> fortList = FORTRESS.get(castleId);
@@ -386,7 +386,7 @@ final class CastleChamberlain extends AbstractNpcAI
return false;
}
private final boolean isOwner(final L2PcInstance player, final L2Npc npc)
private final boolean isOwner(L2PcInstance player, L2Npc npc)
{
return player.canOverrideCond(PcCondOverride.CASTLE_CONDITIONS) || ((player.getClan() != null) && (player.getClanId() == npc.getCastle().getOwnerId()));
}

View File

@@ -301,7 +301,7 @@ public final class MentorGuide extends AbstractNpcAI implements IXmlReader
mentee.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOUR_MENTOR_S1_HAS_CONNECTED).addCharName(player));
mentee.sendPacket(new ExMentorList(mentee.getPlayerInstance()));
});
if (MentorManager.getInstance().hasOnlineMentees(player.getObjectId()))
{
// Starting buffs for Mentor

View File

@@ -577,7 +577,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
}
@Override
public final Location getInnerSpawnLoc(final L2PcInstance player)
public final Location getInnerSpawnLoc(L2PcInstance player)
{
Location loc = null;
if (player.getClanId() == _hall.getOwnerId())

View File

@@ -29,7 +29,7 @@ import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
public class L2StaticObjectInstanceAction implements IActionHandler
{
@Override
public boolean action(final L2PcInstance activeChar, final L2Object target, final boolean interact)
public boolean action(L2PcInstance activeChar, final L2Object target, final boolean interact)
{
final L2StaticObjectInstance staticObject = (L2StaticObjectInstance) target;
if (staticObject.getType() < 0)

View File

@@ -393,7 +393,7 @@ public class NpcViewMod implements IBypassHandler
* @param sb
* @param dropItem
*/
private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, final DecimalFormat amountFormat, final DecimalFormat chanceFormat, final StringBuilder sb, final GeneralDropItem dropItem)
private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, DecimalFormat amountFormat, DecimalFormat chanceFormat, StringBuilder sb, GeneralDropItem dropItem)
{
final L2Item item = ItemTable.getInstance().getTemplate(dropItem.getItemId());
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");

View File

@@ -155,7 +155,7 @@ public class Observation implements IBypassHandler
return false;
}
private static final void doObserve(final L2PcInstance player, final L2Npc npc, final Location pos, final long cost)
private static final void doObserve(L2PcInstance player, L2Npc npc, Location pos, long cost)
{
if (player.reduceAdena("Broadcast", cost, npc, true))
{

View File

@@ -256,7 +256,7 @@ public class QuestLink implements IBypassHandler
* @param player the L2PcInstance that talk with the {@code npc}.
* @param npc the L2NpcInstance that chats with the {@code player}.
*/
private static void showQuestWindow(final L2PcInstance player, L2Npc npc)
private static void showQuestWindow(L2PcInstance player, L2Npc npc)
{
//@formatter:off
final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream()

View File

@@ -228,7 +228,7 @@ public final class Fishing extends AbstractEffect
* @param waterZone the water zone
* @return the bait z or {@link Integer#MIN_VALUE} when you cannot fish here
*/
private static int computeBaitZ(final L2PcInstance player, final int baitX, final int baitY, final L2FishingZone fishingZone, final L2WaterZone waterZone)
private static int computeBaitZ(L2PcInstance player, int baitX, int baitY, L2FishingZone fishingZone, L2WaterZone waterZone)
{
if ((fishingZone == null))
{

View File

@@ -67,7 +67,7 @@ public final class MarkRetriever extends AbstractEffect
double damage = Formulas.calcMagicDam(activeChar, effected, info.getSkill(), shld, sps, bss, mcrit);
int count = 0;
List<BuffInfo> effects = effected.getEffectList().getEffects();
final List<BuffInfo> effects = effected.getEffectList().getEffects();
for (BuffInfo buff : effects)
{
if ((buff.getSkill().getId() == 11259) || (buff.getSkill().getId() == 11261) || (buff.getSkill().getId() == 11262))

View File

@@ -63,7 +63,7 @@ public class EventItem implements IItemHandler
return used;
}
private final boolean useBlockCheckerItem(final L2PcInstance castor, L2ItemInstance item)
private final boolean useBlockCheckerItem(L2PcInstance castor, L2ItemInstance item)
{
final int blockCheckerArena = castor.getBlockCheckerArena();
if (blockCheckerArena == -1)

View File

@@ -120,7 +120,7 @@ public class AreaFriendly implements ITargetTypeHandler
if (target.isPlayable())
{
L2PcInstance targetPlayer = target.getActingPlayer();
final L2PcInstance targetPlayer = target.getActingPlayer();
if (activeChar == targetPlayer)
{

View File

@@ -523,7 +523,7 @@ abstract class Chamber extends AbstractInstance
}
@Override
public String onAttack(final L2Npc npc, final L2PcInstance attacker, final int damage, final boolean isPet, final Skill skill)
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, Skill skill)
{
if (!npc.isBusy() && (npc.getCurrentHp() < (npc.getMaxHp() / 10)))
{

View File

@@ -119,7 +119,7 @@ public class Q00015_SweetWhispers extends Quest
}
case M_NECROMANCER:
{
int cond = qs.getCond();
final int cond = qs.getCond();
if (cond == 1)
{
htmltext = "31518-00.html";

View File

@@ -54,7 +54,7 @@ public class Q00180_InfernalFlamesBurningInCrystalPrison extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -55,7 +55,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -51,7 +51,7 @@ public class Q00471_BreakingThroughTheEmeraldSquare extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -51,7 +51,7 @@ public class Q00472_ChallengeSteamCorridor extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -51,7 +51,7 @@ public class Q00473_InTheCoralGarden extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -69,7 +69,7 @@ public class Q00755_InNeedOfPetras extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -50,7 +50,7 @@ public class Q00756_TopQualityPetra extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
switch (event)

View File

@@ -76,7 +76,7 @@ public class Q00943_FillingTheEnergyOfDestruction extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -142,7 +142,7 @@ public class Q10325_SearchingForNewPower extends Quest
}
case State.STARTED:
{
int cond = qs.getCond();
final int cond = qs.getCond();
switch (npc.getId())
{
case GALLINT:

View File

@@ -270,11 +270,11 @@ public class Q10363_RequestOfTheSeeker extends Quest
else
{
showOnScreenMsg(caster, NpcStringId.DON_T_TOY_WITH_THE_DEAD, ExShowScreenMessage.TOP_CENTER, 10000);
L2Npc Spirit1 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT1, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0));
final L2Npc Spirit1 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT1, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0));
Spirit1.setCurrentHp(Spirit1.getMaxHp() / 2);
addAttackDesire(Spirit1, caster);
startQuestTimer("life_over", 20000, Spirit1, caster);
L2Npc Spirit2 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT2, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0));
final L2Npc Spirit2 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT2, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0));
Spirit2.setCurrentHp(Spirit2.getMaxHp() / 2);
addAttackDesire(Spirit2, caster);
startQuestTimer("life_over", 20000, Spirit2, caster);

View File

@@ -48,7 +48,7 @@ public class Q10381_ToTheSeedOfHellfire extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -51,7 +51,7 @@ public class Q10382_DayOfLiberation extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -63,7 +63,7 @@ public class Q10383_FergasonsOffer extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)

View File

@@ -55,7 +55,7 @@ public class Q10384_AnAudienceWithTauti extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)

View File

@@ -47,7 +47,7 @@ public class Q10386_MysteriousJourney extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{

View File

@@ -45,7 +45,7 @@ public class Q10388_ConspiracyBehindDoor extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)

View File

@@ -48,7 +48,7 @@ public class Q10453_StoppingTheWindDragon extends Quest
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{