Removed unnecessary final modifiers from classes, methods and fields.

This commit is contained in:
MobiusDevelopment
2019-07-31 16:00:52 +00:00
parent af6f81263b
commit d302902d9d
18052 changed files with 37464 additions and 37464 deletions

View File

@@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
* Hot Springs AI.
* @author Mobius
*/
public final class HotSprings extends Quest
public class HotSprings extends Quest
{
// NPCs
private static final int BANDERSNATCHLING = 21314;

View File

@@ -175,7 +175,7 @@ public class Bingo
return lines += (checkLine(2, 4, 6) ? 1 : 0);
}
public boolean checkLine(final int idx1, final int idx2, final int idx3)
public boolean checkLine(int idx1, int idx2, int idx3)
{
return guesses.contains(board.get(idx1)) && guesses.contains(board.get(idx2)) && guesses.contains(board.get(idx3));
}

View File

@@ -28,13 +28,13 @@ public class Q009_IntoTheCityOfHumans extends Quest
private static final String qn = "Q009_IntoTheCityOfHumans";
// NPCs
public final int PETUKAI = 30583;
public final int TANAPI = 30571;
public final int TAMIL = 30576;
private final int PETUKAI = 30583;
private final int TANAPI = 30571;
private final int TAMIL = 30576;
// Rewards
public final int MARK_OF_TRAVELER = 7570;
public final int SOE_GIRAN = 7126;
private final int MARK_OF_TRAVELER = 7570;
private final int SOE_GIRAN = 7126;
public Q009_IntoTheCityOfHumans()
{

View File

@@ -272,7 +272,7 @@ public class Q125_TheNameOfEvil_1 extends Quest
}
@Override
public final String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
{
QuestState st = checkPlayerCondition(player, npc, "cond", "3");
if (st == null)

View File

@@ -48,7 +48,7 @@ public class Q126_TheNameOfEvil_2 extends Quest
}
@Override
public final String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);

View File

@@ -168,7 +168,7 @@ public class Q335_TheSongOfTheHunter extends Quest
addKillId(TARLK_RAIDER_KALATH);
addKillId(Q_BLOOD_CRYSTAL_LIZARDMEN);
final List<Integer> questItems = new ArrayList<>();
for (final int[][] ItemsCond : ITEMS_1ST_CIRCLE)
for (int[][] ItemsCond : ITEMS_1ST_CIRCLE)
{
for (int i : ItemsCond[0])
{
@@ -179,7 +179,7 @@ public class Q335_TheSongOfTheHunter extends Quest
addKillId(ItemsCond[i][0]);
}
}
for (final int[][] ItemsCond : ITEMS_2ND_CIRCLE)
for (int[][] ItemsCond : ITEMS_2ND_CIRCLE)
{
for (int i : ItemsCond[0])
{
@@ -190,28 +190,28 @@ public class Q335_TheSongOfTheHunter extends Quest
addKillId(ItemsCond[i][0]);
}
}
for (final Request r : REQUESTS1)
for (Request r : REQUESTS1)
{
questItems.add(r.request_id);
questItems.add(r.request_item);
for (final int id : r.droplist.keySet())
for (int id : r.droplist.keySet())
{
addKillId(id);
}
for (final int id : r.spawnlist.keySet())
for (int id : r.spawnlist.keySet())
{
addKillId(id);
}
}
for (final Request r : REQUESTS2)
for (Request r : REQUESTS2)
{
questItems.add(r.request_id);
questItems.add(r.request_item);
for (final int id : r.droplist.keySet())
for (int id : r.droplist.keySet())
{
addKillId(id);
}
for (final int id : r.spawnlist.keySet())
for (int id : r.spawnlist.keySet())
{
addKillId(id);
}
@@ -231,10 +231,10 @@ public class Q335_TheSongOfTheHunter extends Quest
registerQuestItems(questItems.stream().mapToInt(i -> i).toArray());
}
private static int CalcItemsConds(final QuestState st, final int[][][] ItemsConds)
private static int CalcItemsConds(QuestState st, int[][][] ItemsConds)
{
int result = 0;
for (final int[][] ItemsCond : ItemsConds)
for (int[][] ItemsCond : ItemsConds)
{
int count = 0;
for (int i : ItemsCond[0])
@@ -249,9 +249,9 @@ public class Q335_TheSongOfTheHunter extends Quest
return result;
}
private static void DelItemsConds(final QuestState st, final int[][][] ItemsConds)
private static void DelItemsConds(QuestState st, int[][][] ItemsConds)
{
for (final int[][] ItemsCond : ItemsConds)
for (int[][] ItemsCond : ItemsConds)
{
for (int i : ItemsCond[0])
{
@@ -260,7 +260,7 @@ public class Q335_TheSongOfTheHunter extends Quest
}
}
private static int Get_Blood_Crystal_Level(final QuestState st)
private static int Get_Blood_Crystal_Level(QuestState st)
{
for (int i = Q_BLOOD_CRYSTAL.length - 1; i >= 0; --i)
{
@@ -272,7 +272,7 @@ public class Q335_TheSongOfTheHunter extends Quest
return -1;
}
private static boolean Blood_Crystal2Adena(final QuestState st, final int Blood_Crystal_Level)
private static boolean Blood_Crystal2Adena(QuestState st, int Blood_Crystal_Level)
{
if (Blood_Crystal_Level < 2)
{
@@ -286,7 +286,7 @@ public class Q335_TheSongOfTheHunter extends Quest
return true;
}
private static void GenList(final QuestState st)
private static void GenList(QuestState st)
{
// final int grade_c = 12;
// final int grade_b = 6;
@@ -358,7 +358,7 @@ public class Q335_TheSongOfTheHunter extends Quest
}
}
private static String FormatList(final QuestState st, final Request[] requests)
private static String FormatList(QuestState st, Request[] requests)
{
String result = "<html><head><body>Guild Member Tor:<br>%reply%<br>%reply%<br>%reply%<br>%reply%<br>%reply%<br></body></html>";
final int[] listpacked = unpackInt(st.getInt("list"), 5);
@@ -370,9 +370,9 @@ public class Q335_TheSongOfTheHunter extends Quest
return result;
}
private static Request GetCurrentRequest(final QuestState st, final Request[] requests)
private static Request GetCurrentRequest(QuestState st, Request[] requests)
{
for (final Request r : requests)
for (Request r : requests)
{
if (st.getQuestItemsCount(r.request_id) > 0)
{
@@ -382,16 +382,16 @@ public class Q335_TheSongOfTheHunter extends Quest
return null;
}
private static boolean isValidRequest(final int id)
private static boolean isValidRequest(int id)
{
for (final Request r : REQUESTS1)
for (Request r : REQUESTS1)
{
if (r.request_id == id)
{
return true;
}
}
for (final Request r : REQUESTS2)
for (Request r : REQUESTS2)
{
if (r.request_id == id)
{
@@ -493,12 +493,12 @@ public class Q335_TheSongOfTheHunter extends Quest
{
st.takeItems(LAUREL_LEAF_PIN, 1);
}
for (final Request r : REQUESTS1)
for (Request r : REQUESTS1)
{
st.takeItems(r.request_id, -1);
st.takeItems(r.request_item, -1);
}
for (final Request r : REQUESTS2)
for (Request r : REQUESTS2)
{
st.takeItems(r.request_id, -1);
st.takeItems(r.request_item, -1);
@@ -704,7 +704,7 @@ public class Q335_TheSongOfTheHunter extends Quest
}
if (Items_Circle != null)
{
for (final int[][] ItemsCond : Items_Circle)
for (int[][] ItemsCond : Items_Circle)
{
for (int i = 2; i < ItemsCond.length; ++i)
{
@@ -834,7 +834,7 @@ public class Q335_TheSongOfTheHunter extends Quest
final int Blood_Crystal_Level = Get_Blood_Crystal_Level(st);
if ((Blood_Crystal_Level > 0) && (Blood_Crystal_Level < 10))
{
for (final int lizardmen_id : Q_BLOOD_CRYSTAL_LIZARDMEN)
for (int lizardmen_id : Q_BLOOD_CRYSTAL_LIZARDMEN)
{
if (npcId == lizardmen_id)
{
@@ -895,15 +895,15 @@ public class Q335_TheSongOfTheHunter extends Quest
public static class Request
{
public final int request_id;
public final int request_item;
public final int request_count;
public final int reward_adena;
public final String text;
public final Map<Integer, Integer> droplist;
public final Map<Integer, int[]> spawnlist;
public int request_id;
public int request_item;
public int request_count;
public int reward_adena;
public String text;
public Map<Integer, Integer> droplist;
public Map<Integer, int[]> spawnlist;
public Request(final int requestid, final int requestitem, final int requestcount, final int rewardadena, final String txt)
public Request(int requestid, int requestitem, int requestcount, int rewardadena, String txt)
{
droplist = new HashMap<>();
spawnlist = new HashMap<>();
@@ -914,13 +914,13 @@ public class Q335_TheSongOfTheHunter extends Quest
text = txt;
}
public Request addDrop(final int kill_mob_id, final int chance)
public Request addDrop(int kill_mob_id, int chance)
{
droplist.put(kill_mob_id, chance);
return this;
}
public Request addSpawn(final int kill_mob_id, final int spawn_mob_id, final int chance)
public Request addSpawn(int kill_mob_id, int spawn_mob_id, int chance)
{
try
{
@@ -937,7 +937,7 @@ public class Q335_TheSongOfTheHunter extends Quest
return this;
}
public boolean Complete(final QuestState st)
public boolean Complete(QuestState st)
{
if (st.getQuestItemsCount(request_item) < request_count)
{
@@ -953,7 +953,7 @@ public class Q335_TheSongOfTheHunter extends Quest
}
}
private static int packInt(final int[] a, final int bits) throws Exception
private static int packInt(int[] a, int bits) throws Exception
{
final int m = 32 / bits;
if (a.length > m)
@@ -983,7 +983,7 @@ public class Q335_TheSongOfTheHunter extends Quest
return result;
}
private static int[] unpackInt(int a, final int bits)
private static int[] unpackInt(int a, int bits)
{
final int m = 32 / bits;
final int mval = (int) Math.pow(2.0, bits);

View File

@@ -136,7 +136,7 @@ public class Q336_CoinsOfMagic extends Quest
super(336, qn, "Coins of Magic");
addStartNpc(SORINT);
addTalkId(SORINT, BERNARD, PAGE, HAGGER, STAN, RALFORD, FERRIS, COLLOB, PANO, DUNING, LORAIN);
for (final int[] mob : DROPLIST)
for (int[] mob : DROPLIST)
{
addKillId(mob[0]);
}
@@ -202,7 +202,7 @@ public class Q336_CoinsOfMagic extends Quest
return htmltext;
}
private String promote(final QuestState st)
private String promote(QuestState st)
{
final int grade = st.getInt("grade");
String html;
@@ -213,7 +213,7 @@ public class Q336_CoinsOfMagic extends Quest
else
{
int h = 0;
for (final int i : PROMOTE[grade])
for (int i : PROMOTE[grade])
{
if (st.getQuestItemsCount(i) > 0)
{
@@ -222,7 +222,7 @@ public class Q336_CoinsOfMagic extends Quest
}
if (h == 6)
{
for (final int i : PROMOTE[grade])
for (int i : PROMOTE[grade])
{
st.takeItems(i, 1);
}
@@ -330,7 +330,7 @@ public class Q336_CoinsOfMagic extends Quest
}
default:
{
for (final int[] e : EXCHANGE_LEVEL)
for (int[] e : EXCHANGE_LEVEL)
{
if ((npcId == e[0]) && (grade <= e[1]))
{
@@ -365,7 +365,7 @@ public class Q336_CoinsOfMagic extends Quest
}
return null;
}
for (final int[] e : DROPLIST)
for (int[] e : DROPLIST)
{
if (e[0] == npcId)
{
@@ -376,7 +376,7 @@ public class Q336_CoinsOfMagic extends Quest
return null;
}
}
for (final int u : MONSTERS)
for (int u : MONSTERS)
{
if (u == npcId)
{

View File

@@ -28,15 +28,15 @@ import org.l2jmobius.gameserver.model.quest.State;
*/
public class Q343_UnderTheShadowOfTheIvoryTower extends Quest
{
public final int CEMA = 30834;
public final int ICARUS = 30835;
public final int MARSHA = 30934;
public final int TRUMPIN = 30935;
public final int[] MOBS;
public final int ORB = 4364;
public final int ECTOPLASM = 4365;
public final int CHANCE = 50;
public final int[] ALLOWED_CLASSES =
public int CEMA = 30834;
public int ICARUS = 30835;
public int MARSHA = 30934;
public int TRUMPIN = 30935;
public int[] MOBS;
public int ORB = 4364;
public int ECTOPLASM = 4365;
public int CHANCE = 50;
public int[] ALLOWED_CLASSES =
{
11,
12,
@@ -65,7 +65,7 @@ public class Q343_UnderTheShadowOfTheIvoryTower extends Quest
addStartNpc(30834);
addTalkId(30834, 30835, 30934, 30935);
for (final int i : MOBS)
for (int i : MOBS)
{
addKillId(i);
}
@@ -356,7 +356,7 @@ public class Q343_UnderTheShadowOfTheIvoryTower extends Quest
{
if (id != 2)
{
for (final int i : ALLOWED_CLASSES)
for (int i : ALLOWED_CLASSES)
{
if ((st.getPlayer().getClassId().getId() == i) && (st.getPlayer().getLevel() >= 40))
{

View File

@@ -195,7 +195,7 @@ public class Q386_StolenDignity extends Quest
// private static final String template_choice = "<a action=\"bypass -h Quest Q386_StolenDignity choice-%n%\">%n%</a>&nbsp;&nbsp;&nbsp;&nbsp; ";
private final QuestState _qs;
public Bingo(final QuestState qs)
public Bingo(QuestState qs)
{
super("<a action=\"bypass -h Quest Q386_StolenDignity choice-%n%\">%n%</a>&nbsp;&nbsp;&nbsp;&nbsp; ");
_qs = qs;
@@ -217,7 +217,7 @@ public class Q386_StolenDignity extends Quest
return result;
}
private void reward(final int[][] rew)
private void reward(int[][] rew)
{
final int[] r = rew[Rnd.get(rew.length)];
_qs.giveItems(r[0], r[1]);

View File

@@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.zone.type.BossZone;
* @author Mobius
* @note Based on python script
*/
public final class GrandBossTeleporters extends Quest
public class GrandBossTeleporters extends Quest
{
private static final String qn = "GrandBossTeleporters";

View File

@@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
* @author Mobius
* @note Based on python script
*/
public final class ToIVortexExit extends Quest
public class ToIVortexExit extends Quest
{
private static final String qn = "ToIVortexExit";