Maker-oriented commit

Implemented the multiple features of the Maker skill (equip disassembly, leftover merging into monster crystal and item crafting).
Updated the DB with the Maker data featured on the WZ.
Added a new table for the strenghtening reagents gain data (compiled with the MapleSkillMakerReagentIndexer).
Fixed quests that improves the Maker skill level and some other Maker-related quests.
This commit is contained in:
ronancpl
2017-11-24 14:00:48 -02:00
parent 4dd2764776
commit 3b30244239
87 changed files with 8424 additions and 18509 deletions

View File

@@ -21,10 +21,9 @@ package mapleskillmakerfetcher;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.io.*;
import static mapleskillmakerfetcher.MapleSkillMakerFetcher.id;
/**
* @author RonanLana
@@ -41,7 +40,7 @@ public class MapleSkillMakerFetcher {
static String username = "root";
static String password = "";
static String fileName = "lib/ItemMake.img.xml";
static String fileName = "../../wz/Etc.wz/ItemMake.img.xml";
static String newFile = "lib/MakerData.sql";
static PrintWriter printWriter = null;
@@ -176,6 +175,7 @@ public class MapleSkillMakerFetcher {
status -= 1;
if(status == 2) { //close item maker data
generateUpdatedItemFee(); // for equipments, this will try to update reqMeso to be conformant with the client.
makerList.add(new MapleMakerItemEntry(id, itemid, reqLevel, reqMakerLevel, reqItem, reqMeso, reqEquip, catalyst, quantity, tuc, recipeCount, recipeItem, recipeList, randomList));
resetMakerDataFields();
} else if(status == 4) { //close recipe/random item
@@ -280,6 +280,40 @@ public class MapleSkillMakerFetcher {
}
}
private static void generateUpdatedItemFee() {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
float adjPrice = reqMeso;
if(itemid < 2000000) {
Map<String, Integer> stats = ii.getEquipStats(itemid);
if(stats != null) {
int val = itemid / 100000;
if(val == 13 || val == 14) { // is weapon-type
adjPrice /= 10;
adjPrice += reqMeso;
adjPrice /= 1000;
reqMeso = 1000 * (int) Math.floor(adjPrice);
} else {
adjPrice /= ((stats.get("reqLevel") >= 108) ? 10 : 11);
adjPrice += reqMeso;
adjPrice /= 1000;
reqMeso = 1000 * (int) Math.ceil(adjPrice);
}
} else {
System.out.println("null stats for itemid " + itemid);
}
} else {
adjPrice /= 10;
adjPrice += reqMeso;
adjPrice /= 1000;
reqMeso = 1000 * (int) Math.ceil(adjPrice);
}
}
private static void WriteMakerTableFile() {
printWriter.println(" # SQL File autogenerated from the MapleSkillMakerFetcher feature by Ronan Lana.");
printWriter.println(" # Generated data is conformant with the ItemMake.img.xml file used to compile this.");
@@ -312,7 +346,7 @@ public class MapleSkillMakerFetcher {
sb_recipe.append(";\r\n");
sb_reward.setLength(sb_reward.length() - 3);
sb_reward.append(";\r\n");
sb_reward.append(";");
printWriter.println(sb_create);
printWriter.println(sb_recipe);