Reactor Loot + Obstacles damage mob + Static calls from scripts

Revised starting AP, now working out with flags. To supply the 9AP shortage of 4/4/4/4, two options: one giving out 9 AP from the start, other giving 4/5 AP when changing jobs (1st, 2nd). This change would also work with the autoassign for beginners flag.
Refactored several quest scripts, that would be glitching the player when doing quest start/complete and disposing under the same script status.
Cleared some cases with the quest reward system where it would call out a "full inventory" even though new inventory slots could get discovered when doing the quest loot transaction.
Fixed an issue with player stores being deployed overlapping in a few scenarios.
Fixed reduced EXP gain from kills when triggering skill Mortal Blow.
Added "open Duey" functionality when clicking "O" in the incoming package notification.
Fixed packages without messages (a quirk from quick delivery) not accounting visually as a "quick" one.
Fixed certain mounts (non-item skill mounts, such as Yeti or Spaceship) not showing up properly to other players when changing maps.
Added handler for mob damage by environment objects (OrbisPQ jail storage area).
Added a placeholder on mob's stolen items to prevent more steals to be placed as soon as the Steal mechanism is triggered.
Patched boss logs not removing recent entries from the DB tables (the reset method is actually supposed to clear every entry).
Revised a possible memory leak scenario happening due to an exception thrown midway monster kill method.
Improved reactor drops, now placing loots visible for the acting player centered (similar as to how mob loots work).
Refactored several issues in scripts, related to accessing static Java methods through an object, that would start appearing after transitioning to Java 8.
This commit is contained in:
ronancpl
2019-08-14 21:14:15 -03:00
parent 2c16a4d908
commit f958624f6a
233 changed files with 2368 additions and 888 deletions

View File

@@ -7,9 +7,16 @@ import java.util.HashMap;
import java.util.Map;
import client.MapleJob;
import constants.skills.Aran;
import java.io.File;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
import provider.MapleData;
import provider.MapleDataDirectoryEntry;
import provider.MapleDataFileEntry;
import provider.MapleDataProvider;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;
import server.maps.MapleMap;
import server.maps.FieldLimit;
import server.quest.MapleQuest;
@@ -38,6 +45,8 @@ public class GameConstants {
public static final MapleDisease[] CPQ_DISEASES = {MapleDisease.SLOW, MapleDisease.SEDUCE, MapleDisease.STUN, MapleDisease.POISON,
MapleDisease.SEAL, MapleDisease.DARKNESS, MapleDisease.WEAKEN, MapleDisease.CURSE};
public static final int MAX_FIELD_MOB_DAMAGE = getMaxObstacleMobDamageFromWz() * 2;
public static int getPlayerBonusDropRate(int slot) {
return(DROP_RATE_GAIN[slot]);
}
@@ -672,4 +681,32 @@ public class GameConstants {
return 0.0f;
}
}
private static int getMaxObstacleMobDamageFromWz() {
MapleDataProvider mapSource = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/Map.wz"));
int maxMobDmg = 0;
MapleDataDirectoryEntry root = mapSource.getRoot();
for (MapleDataDirectoryEntry objData : root.getSubdirectories()) {
if (!objData.getName().contentEquals("Obj")) {
continue;
}
for (MapleDataFileEntry obj : objData.getFiles()) {
for (MapleData l0 : mapSource.getData(objData.getName() + "/" + obj.getName()).getChildren()) {
for (MapleData l1 : l0.getChildren()) {
for (MapleData l2 : l1.getChildren()) {
int objDmg = MapleDataTool.getIntConvert("s1/mobdamage", l2, 0);
if (maxMobDmg < objDmg) {
maxMobDmg = objDmg;
}
}
}
}
}
}
return maxMobDmg;
}
}

View File

@@ -80,6 +80,7 @@ public class ServerConstants {
public static final boolean USE_PARTY_FOR_STARTERS = true; //Players level 10 or below can create/invite other players on the given level range.
public static final boolean USE_AUTOASSIGN_STARTERS_AP = false; //Beginners level 10 or below have their AP autoassigned (they can't choose to levelup a stat). Set true ONLY if the localhost doesn't support AP assigning for beginners level 10 or below.
public static final boolean USE_AUTOASSIGN_SECONDARY_CAP = true;//Prevents AP autoassign from spending on secondary stats after the player class' cap (defined on the autoassign handler) has been reached.
public static final boolean USE_STARTING_AP_4 = true; //Use early-GMS 4/4/4/4 starting stats. To overcome AP shortage, this gives 4AP/5AP at 1st/2nd job advancements.
public static final boolean USE_AUTOBAN = false; //Commands the server to detect infractors automatically.
public static final boolean USE_AUTOBAN_LOG = true; //Log autoban related messages. Still logs even with USE_AUTOBAN disabled.
public static final boolean USE_AUTOSAVE = true; //Enables server autosaving feature (saves characters to DB each 1 hour).