Server broadcastMessage to worlds & MapleQuestItemFetcher update

Fixed a bug with the map drop mechanics sometimes permitting over the max drop count in certain circumstances.
Fixed server broadcastMessage always broadcasting packets at world 0, even if the caller is from another world id.
Improved the MapleQuestItemFetcher, now displaying expired quests alongside the reported info.
This commit is contained in:
ronancpl
2017-12-14 11:08:55 -02:00
parent b141efdbf2
commit c1126213cc
20 changed files with 99 additions and 83 deletions

View File

@@ -29,6 +29,7 @@ INCORRECT QUESTIDS ON DB
4031860 : 6944 -> 6945
4031861 : 6944 -> 6945
4031871 : 6350 -> 28344
4032324 : 21736 -> 21737
4032339 : 0 -> 21303
@@ -110,7 +111,7 @@ ITEMS WITH NO QUEST DROP DATA ON DB
4031220 - 9210
4031225 - 3606
4031226 - 9321
4031227 - 4103
4031227 - 4103 EXPIRED
4031230 - 3619
4031231 - 3620
4031235 - 3607
@@ -233,6 +234,7 @@ ITEMS WITH NO QUEST DROP DATA ON DB
4031812 - 4950
4031833 - 9946
4031837 - 9945
4031839 - 2162
4031881 - 4484
4031894 - 2214
4031921 - 4646
@@ -288,8 +290,6 @@ ITEMS WITH NO QUEST DROP DATA ON DB
4032318 - 21718
4032319 - 21723
4032321 - 21727
4032322 - 21731
4032324 - 21737
4032325 - 21752
4032326 - 21752
4032331 - 21601
@@ -313,13 +313,7 @@ ITEMS WITH NO QUEST DROP DATA ON DB
4032437 - 28321
4032443 - 28317
4032496 - 28238
4032511 - 3718
4032512 - 3720
4032513 - 3722
4032514 - 3727
4032516 - 3735
4032517 - 3740
4032518 - 3743
4161000 - 9322
@@ -340,12 +334,6 @@ COMPLETE QUEST ITEMS WITH ZERO QUANTITY
2054:
4031028
2162:
4031839
2164:
4031840
2167:
4031841

View File

@@ -2,6 +2,8 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
<group>
<file>file:/C:/Nexon/MapleSolaxia/HeavenMS/tools/MapleQuestItemFetcher/src/maplequestitemfetcher/MapleQuestItemFetcher.java</file>
</group>
</open-files>
</project-private>

View File

@@ -61,7 +61,7 @@ import tools.Pair;
*
* Running it should generate a report file under "lib" folder with the search results.
*
* Estimated parse time: 1.5 minute
* Estimated parse time: 1 minute
*/
public class MapleQuestItemFetcher {
static MapleItemInformationProvider ii;
@@ -91,6 +91,7 @@ public class MapleQuestItemFetcher {
static Map<Integer, Set<Integer>> zeroedStartQuestItems = new HashMap<>();
static Map<Integer, Set<Integer>> zeroedCompleteQuestItems = new HashMap<>();
static Map<Integer, int[]> mixedQuestidItems = new HashMap<>();
static Set<Integer> limitedQuestids = new HashSet<>();
static byte status = 0;
static int questId = -1;
@@ -103,11 +104,13 @@ public class MapleQuestItemFetcher {
int i, j;
char[] dest;
String d;
i = token.lastIndexOf("name");
i = token.indexOf("\"", i) + 1; //lower bound of the string
j = token.indexOf("\"", i); //upper bound
if(j < i) return "0"; //node value containing 'name' in it's scope, cheap fix since we don't deal with strings anyway
dest = new char[initialStringLength];
token.getChars(i, j, dest, 0);
@@ -245,8 +248,15 @@ public class MapleQuestItemFetcher {
}
status += 1;
}
} else {
if(status == 3) {
d = getName(token);
if(d.equals("end")) {
limitedQuestids.add(questId);
}
}
}
}
private static void calculateQuestItemDiff() {
@@ -414,6 +424,10 @@ public class MapleQuestItemFetcher {
return list;
}
private static String getExpiredStringLabel(int questid) {
return (!limitedQuestids.contains(questid) ? "" : " EXPIRED");
}
private static void ReportQuestItemData() {
// This will reference one line at a time
String line = null;
@@ -460,7 +474,7 @@ public class MapleQuestItemFetcher {
printWriter.println("INCORRECT QUESTIDS ON DB");
for(Entry<Integer, int[]> emqi : getSortedMapEntries1(mixedQuestidItems)) {
int[] mqi = emqi.getValue();
printWriter.println(mqi[0] + " : " + mqi[1] + " -> " + mqi[2]);
printWriter.println(mqi[0] + " : " + mqi[1] + " -> " + mqi[2] + getExpiredStringLabel(mqi[2]));
}
printWriter.println("\n\n\n\n\n");
}
@@ -473,7 +487,7 @@ public class MapleQuestItemFetcher {
printWriter.println("ITEMS WITH NO QUEST DROP DATA ON DB");
for(Entry<Integer, Integer> iwq : getSortedMapEntries0(mapIwq)) {
printWriter.println(iwq.getKey() + " - " + iwq.getValue());
printWriter.println(iwq.getKey() + " - " + iwq.getValue() + getExpiredStringLabel(iwq.getValue()));
}
printWriter.println("\n\n\n\n\n");
}
@@ -482,7 +496,7 @@ public class MapleQuestItemFetcher {
if(!zeroedStartQuestItems.isEmpty()) {
printWriter.println("START QUEST ITEMS WITH ZERO QUANTITY");
for(Pair<Integer, List<Integer>> iwq : getSortedMapEntries2(zeroedStartQuestItems)) {
printWriter.println(iwq.getLeft() + ":");
printWriter.println(iwq.getLeft() + getExpiredStringLabel(iwq.getLeft()) + ":");
for(Integer i : iwq.getRight()) {
printWriter.println(" " + i);
}
@@ -494,7 +508,7 @@ public class MapleQuestItemFetcher {
if(!zeroedCompleteQuestItems.isEmpty()) {
printWriter.println("COMPLETE QUEST ITEMS WITH ZERO QUANTITY");
for(Pair<Integer, List<Integer>> iwq : getSortedMapEntries2(zeroedCompleteQuestItems)) {
printWriter.println(iwq.getLeft() + ":");
printWriter.println(iwq.getLeft() + getExpiredStringLabel(iwq.getLeft()) + ":");
for(Integer i : iwq.getRight()) {
printWriter.println(" " + i);
}