Reformat and clean up "tools" package
This commit is contained in:
@@ -11,15 +11,13 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
|
||||
This application gathers info from the WZ.XML files, fetching all cosmetic coupons and tickets from there, and then
|
||||
searches the NPC script files, identifying the stylish NPCs that supposedly uses them. It will reports all NPCs that
|
||||
uses up a card, as well as report those currently unused.
|
||||
|
||||
Estimated parse time: 10 seconds
|
||||
|
||||
* <p>
|
||||
* This application gathers info from the WZ.XML files, fetching all cosmetic coupons and tickets from there, and then
|
||||
* searches the NPC script files, identifying the stylish NPCs that supposedly uses them. It will reports all NPCs that
|
||||
* uses up a card, as well as report those currently unused.
|
||||
* <p>
|
||||
* Estimated parse time: 10 seconds
|
||||
*/
|
||||
public class CashCosmeticsFetcher {
|
||||
private static final Map<Integer, String> scriptEntries = new HashMap<>(500);
|
||||
@@ -41,7 +39,7 @@ public class CashCosmeticsFetcher {
|
||||
private static int getNpcIdFromFilename(String name) {
|
||||
try {
|
||||
return Integer.parseInt(name.substring(0, name.indexOf('.')));
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -50,7 +48,7 @@ public class CashCosmeticsFetcher {
|
||||
ArrayList<File> files = new ArrayList<>();
|
||||
listFiles(ToolConstants.SCRIPTS_PATH + "/npc", files);
|
||||
|
||||
for(File f : files) {
|
||||
for (File f : files) {
|
||||
Integer npcid = getNpcIdFromFilename(f.getName());
|
||||
|
||||
//System.out.println("Parsing " + f.getAbsolutePath());
|
||||
@@ -60,7 +58,7 @@ public class CashCosmeticsFetcher {
|
||||
StringBuilder stringBuffer = new StringBuilder();
|
||||
String line;
|
||||
|
||||
while((line = bufferedReader.readLine())!=null){
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
stringBuffer.append(line).append("\n");
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@ public class CashCosmeticsFetcher {
|
||||
System.out.println("Loaded scripts");
|
||||
|
||||
reportCosmeticCouponResults();
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,12 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*
|
||||
This application main objective is to read Vega-related information from
|
||||
the item's description report back missing nodes for these items.
|
||||
|
||||
Estimated parse time: 10 seconds
|
||||
* <p>
|
||||
* This application main objective is to read Vega-related information from
|
||||
* the item's description report back missing nodes for these items.
|
||||
* <p>
|
||||
* Estimated parse time: 10 seconds
|
||||
*/
|
||||
public class CashVegaChecker {
|
||||
private static final File OUTPUT_FILE = ToolConstants.getOutputFile("vega_checker_report.txt");
|
||||
@@ -40,7 +39,7 @@ public class CashVegaChecker {
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
return (d.trim());
|
||||
}
|
||||
|
||||
private static String getValue(String token) {
|
||||
@@ -56,36 +55,33 @@ public class CashVegaChecker {
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
return (d.trim());
|
||||
}
|
||||
|
||||
private static void forwardCursor(int st) {
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
while(status >= st && (line = bufferedReader.readLine()) != null) {
|
||||
while (status >= st && (line = bufferedReader.readLine()) != null) {
|
||||
simpleToken(line);
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void simpleToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
}
|
||||
}
|
||||
|
||||
private static void translateItemToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
|
||||
if (status == 2) {
|
||||
@@ -101,10 +97,9 @@ public class CashVegaChecker {
|
||||
}
|
||||
|
||||
private static void translateVegaToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
if (token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
} else if (token.contains("imgdir")) {
|
||||
status += 1;
|
||||
} else {
|
||||
if (status == 2) {
|
||||
@@ -122,7 +117,7 @@ public class CashVegaChecker {
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String line;
|
||||
while((line = bufferedReader.readLine())!=null){
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
translateItemToken(line);
|
||||
}
|
||||
|
||||
@@ -141,7 +136,7 @@ public class CashVegaChecker {
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String line;
|
||||
while((line = bufferedReader.readLine())!=null){
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
translateVegaToken(line);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ package tools.mapletools;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class MakerItemEntry {
|
||||
@@ -36,13 +35,13 @@ public class MakerItemEntry {
|
||||
public int catalyst = -1;
|
||||
public int quantity = -1;
|
||||
public int tuc = -1;
|
||||
|
||||
|
||||
public int recipeCount = -1;
|
||||
public int recipeItem = -1;
|
||||
|
||||
|
||||
public List<int[]> recipeList = null;
|
||||
public List<int[]> randomList = null;
|
||||
|
||||
|
||||
MakerItemEntry(int id, int itemid, int reqLevel, int reqMakerLevel, int reqItem, int reqMeso, int reqEquip, int catalyst, int quantity, int tuc, int recipeCount, int recipeItem, List<int[]> recipeList, List<int[]> randomList) {
|
||||
this.id = id;
|
||||
this.itemid = itemid;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class MonsterStatFetcher {
|
||||
}
|
||||
|
||||
monsterStats.put(mid, stats);
|
||||
} catch(NullPointerException npe) {
|
||||
} catch (NullPointerException npe) {
|
||||
//System.out.println("[SEVERE] " + mFile.getName() + " failed to load. Issue: " + npe.getMessage() + "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user