Separated multiple variable declarations.

This commit is contained in:
MobiusDev
2018-09-09 23:01:15 +00:00
parent d33bfa17b2
commit 0f430720db
881 changed files with 3909 additions and 1507 deletions

View File

@@ -128,7 +128,8 @@ public final class Parade extends AbstractNpcAI
public Parade()
{
// Starts at 8:00 and repeats every 6 hours.
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000;
final long diff = timeLeftMilli(8, 0, 0);
final long cycle = 3600000;
ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle);
// Test - Starts 3 minutes after server startup and repeats every 20 minutes.

View File

@@ -287,7 +287,8 @@ public final class TalentShow extends AbstractNpcAI
final int gameTime = GameTimeController.getInstance().getGameTime();
final int hours = (gameTime / 60) % 24;
final int minutes = gameTime % 60;
int hourDiff, minDiff;
int hourDiff;
int minDiff;
hourDiff = 20 - hours;
if (hourDiff < 0)
{

View File

@@ -57,7 +57,9 @@ public class HeartInfinityDefence extends AbstractNpcAI
public List<L2Npc> deadTumors = new ArrayList<>();
protected L2Npc deadTumor;
public long startTime = 0;
protected ScheduledFuture<?> finishTask = null, timerTask = null, wagonSpawnTask = null;
protected ScheduledFuture<?> finishTask = null;
protected ScheduledFuture<?> timerTask = null;
protected ScheduledFuture<?> wagonSpawnTask = null;
public HIDWorld()
{

View File

@@ -264,7 +264,8 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
private static Map<L2Clan, Integer> _pendingItemToGet = new HashMap<>();
protected static SiegableHall _rainbow;
protected static ScheduledFuture<?> _nextSiege, _siegeEnd;
protected static ScheduledFuture<?> _nextSiege;
protected static ScheduledFuture<?> _siegeEnd;
private static String _registrationEnds;
public RainbowSpringsChateau()

View File

@@ -279,7 +279,9 @@ public final class NpcLocationInfo extends AbstractNpcAI
if (CommonUtil.contains(NPCRADAR, npcId))
{
int x = 0, y = 0, z = 0;
int x = 0;
int y = 0;
int z = 0;
final L2Spawn spawn = SpawnTable.getInstance().getAnySpawn(npcId);
if (spawn != null)
{

View File

@@ -144,8 +144,10 @@ public final class SubClassSkills extends AbstractNpcAI
st = newQuestState(player);
}
String qName, qValue;
int id, index;
String qName;
String qValue;
int id;
int index;
for (int i = VARS.length; --i >= 0;)
{
for (int j = Config.MAX_SUBCLASS; j > 0; j--)

View File

@@ -771,7 +771,8 @@ public class AdminEditChar implements IAdminCommandHandler
{
final String val = command.substring(20);
final int level = Integer.parseInt(val);
long newexp, oldexp = 0;
long newexp = 0;
long oldexp = 0;
oldexp = pet.getStat().getExp();
newexp = pet.getStat().getExpForLevel(level);
if (oldexp > newexp)
@@ -1230,7 +1231,8 @@ public class AdminEditChar implements IAdminCommandHandler
int CharactersFound = 0;
L2GameClient client;
String name, ip = "0.0.0.0";
String name;
String ip = "0.0.0.0";
final StringBuilder replyMSG = new StringBuilder(1000);
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
adminReply.setFile(activeChar, "data/html/admin/ipfind.htm");

View File

@@ -509,7 +509,8 @@ public class AdminEffects implements IAdminCommandHandler
try
{
L2Object obj = activeChar.getTarget();
int level = 1, hittime = 1;
int level = 1;
int hittime = 1;
final int skill = Integer.parseInt(st.nextToken());
if (st.hasMoreTokens())
{

View File

@@ -139,7 +139,8 @@ public class AdminElement implements IAdminCommandHandler
if (itemInstance != null)
{
String old, current;
String old;
String current;
final Elementals element = itemInstance.getElemental(type);
if (element == null)
{

View File

@@ -178,7 +178,10 @@ public class AdminQuest implements IAdminCommandHandler
{
final String questName = command.substring("admin_quest_info ".length());
final Quest quest = QuestManager.getInstance().getQuest(questName);
String events = "", npcs = "", items = "", timers = "";
String events = "";
String npcs = "";
String items = "";
String timers = "";
int counter = 0;
if (quest == null)
{

View File

@@ -208,7 +208,9 @@ public class AdminTeleport implements IAdminCommandHandler
else if (command.startsWith("admin_go"))
{
int intVal = 150;
int x = activeChar.getX(), y = activeChar.getY(), z = activeChar.getZ();
int x = activeChar.getX();
int y = activeChar.getY();
int z = activeChar.getZ();
try
{
final String val = command.substring(8);

View File

@@ -38,7 +38,8 @@ public class VoiceCommand implements IBypassHandler
// only voice commands allowed
if ((command.length() > 7) && (command.charAt(6) == '.'))
{
final String vc, vparams;
final String vc;
final String vparams;
final int endOfCommand = command.indexOf(" ", 7);
if (endOfCommand > 0)
{

View File

@@ -253,7 +253,8 @@ public class Debug implements ITelnetCommand
static String getServerStatus()
{
int playerCount = 0, objectCount = 0;
int playerCount = 0;
int objectCount = 0;
final int max = LoginServerThread.getInstance().getMaxPlayer();
playerCount = L2World.getInstance().getPlayers().size();

View File

@@ -43,7 +43,9 @@ public class ChangePassword implements IVoicedCommandHandler
final StringTokenizer st = new StringTokenizer(target);
try
{
String curpass = null, newpass = null, repeatnewpass = null;
String curpass = null;
String newpass = null;
String repeatnewpass = null;
if (st.hasMoreTokens())
{
curpass = st.nextToken();

View File

@@ -396,7 +396,8 @@ public final class FinalEmperialTomb extends AbstractInstance implements IGameXm
if ("point".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
int x, y;
int x;
int y;
att = attrs.getNamedItem("x");
if (att != null)
{

View File

@@ -381,7 +381,9 @@ public class Q00255_Tutorial extends Quest
}
else if ((event_id == 8) && (player.getLevel() < 6))
{
int x = 0, y = 0, z = 0;
int x = 0;
int y = 0;
int z = 0;
for (String[] element : CEEa)
{
if (classId == Integer.valueOf(element[0]))
@@ -557,7 +559,9 @@ public class Q00255_Tutorial extends Quest
// Question mark clicked
else if (event.startsWith("QM"))
{
int x = 0, y = 0, z = 0;
int x = 0;
int y = 0;
int z = 0;
switch (Integer.valueOf(event.substring(2)))
{
case 1:

View File

@@ -228,7 +228,8 @@ public final class Q00378_GrandFeast extends Quest
if (hasQuestItems(player, RITRONS_DESSERT_RECIPE))
{
takeItems(player, RITRONS_DESSERT_RECIPE, 1);
int item = 0, adena = 0;
int item = 0;
int adena = 0;
long quantity = 0;
switch (qs.getMemoStateEx(1))
{

View File

@@ -152,7 +152,8 @@ public class Q00700_CursedLife extends Quest
{
if (npc.getId() == ROK)
{
int amount = 0, chance = getRandom(1000);
int amount = 0;
int chance = getRandom(1000);
if (chance < 700)
{
amount = 1;

View File

@@ -432,7 +432,8 @@ public class TerritoryWarSuperClass extends Quest
private static void handleBecomeMercenaryQuest(L2PcInstance player, boolean catapult)
{
int enemyCount = 10, catapultCount = 1;
int enemyCount = 10;
int catapultCount = 1;
QuestState st = player.getQuestState(Q00147_PathtoBecominganEliteMercenary.class.getSimpleName());
if ((st != null) && st.isCompleted())
{