Quest & Command tweak + MapleCashDropFetcher + Cash drop tidyup

Solved a possible exploit on starting/completing non-scripted quests.
Added missing drop data for Aran's puppeteer questline.
Moved GM tier level of some commands.
Applied proper synchronization for BuddyList modules.
Issued commands now requires "@" heading for normal players and donators (GM level < 2) and "!" for Jr. GM and above (GM level >= 2).
Added custom feature: a message will be sent to acquaintances of a player (friends, family, guild, spouse) when they change/upgrade jobs.
Removed cash drop entries from the DB.
New tool: MapleCashDropFetcher. Reports on a text file all cash-type drop data on DB.
This commit is contained in:
ronancpl
2018-04-14 13:38:14 -03:00
parent 6d91c79f28
commit 6a63f9d95e
38 changed files with 3472 additions and 1057 deletions

View File

@@ -62,26 +62,36 @@ public class GameConstants {
330000, 340000, 350000, 360000, 370000, 380000, 390000, 400000, 410000, 420000, 430000, 440000, 450000, 460000, 470000, 480000, 490000, 500000, 510000, 520000,
530000, 550000, 570000, 590000, 610000, 630000, 650000, 670000, 690000, 710000, 730000, 750000, 770000, 790000, 810000, 830000, 850000, 870000, 890000, 910000};
public static int getJobMaxLevel(MapleJob job) {
if(job.getId() % 1000 == 0) { // beginner
return 10;
} else if(job.getId() % 100 == 0) { // 1st job
return 30;
public static int getJobBranch(MapleJob job) {
int jobid = job.getId();
if(jobid % 1000 == 0) {
return 0;
} else if(jobid % 100 == 0) {
return 1;
} else {
int jobBranch = job.getId() % 10;
switch(jobBranch) {
case 0:
return 70; // 2nd job
case 1:
return 120; // 3rd job
default:
return (job.getId() / 1000 == 1) ? 120 : 200; // 4th job: cygnus is 120, rest is 200
}
return 2 + (jobid % 10);
}
}
public static int getJobMaxLevel(MapleJob job) {
int jobBranch = getJobBranch(job);
switch(jobBranch) {
case 0:
return 10; // beginner
case 1:
return 30; // 1st job
case 2:
return 70; // 2nd job
case 3:
return 120; // 3rd job
default:
return (job.getId() / 1000 == 1) ? 120 : 200; // 4th job: cygnus is 120, rest is 200
}
}
@@ -225,4 +235,17 @@ public class GameConstants {
}
return mobHpVal[level];
}
public static String ordinal(int i) {
String[] sufixes = new String[] { "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" };
switch (i % 100) {
case 11:
case 12:
case 13:
return i + "th";
default:
return i + sufixes[i % 10];
}
}
}