GMS-like Wedding + Scissors of Karma + Maple Life + Buyback

Properly developed the Marriage feature in the source.
Added TRAVEL_RATE server flag, a modifier for the travel frequency rate.
Corrected stance for players in 3rd party view when entering a map to work similarly as GMS.
Fixed mobs spamming skills incoherently.
Added code support for old GMS-like PQ NPCs, where party leaders just need to click once to start a new PQ.
Implemented podium system for the Hall of Fame PlayerNPCs.
Improved character load-out system, now using way less queries to the DB in the process.
Fixed birthday field for accounts not being read correctly.
Further implemented the incomplete yet-existing Scissors of Karma mechanic.
Fixed Duey not propagating item flags when packaging an item.
Added a custom buyback system.
Refactored the character creation system, now offering support for Maple Life.
Fixed some issues with the PlayerNPC positioning system.
Added server flag allowing AP assignment for novices (beginners under level 11).
Fixed Strategy Time (GPQ) announcement being sent twice to guilds in certain cases.
Tweaked mount EXP system now awarding it accordingly with the amount of tiredness healed.
Removed the randomness aspect of closeness gain when feeding the pet, now acting accordingly with amount of fullness gained.
Fixed an exploit with Arwen script.
Fixed travel-back from Florina forcefully sending players to Lith Harbor in certain situations.
Thoroughly reviewed job skill questlines for Explorers and Aran.
Localhost edit: removed MTS block in certain maps (useful for the buyback system).
Localhost edit: removed party blocks for novices.
Localhost edit: removed AP assigning block for novices.
Localhost edit: removed speed cap.
Localhost edit: removed Maker block popping up when inputting ATK gems on non-weapons.
This commit is contained in:
ronancpl
2018-06-05 02:40:53 -03:00
230 changed files with 11510 additions and 3591 deletions

View File

@@ -4,6 +4,9 @@ import java.util.HashMap;
import java.util.Map;
import client.MapleJob;
import constants.skills.Aran;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
import server.maps.MapleMap;
import server.maps.FieldLimit;
import server.quest.MapleQuest;
@@ -14,8 +17,6 @@ import server.quest.MapleQuest;
*/
public class GameConstants {
public static String[] WORLD_NAMES = {"Scania", "Bera", "Broa", "Windia", "Khaini", "Bellocan", "Mardia", "Kradia", "Yellonde", "Demethos", "Galicia", "El Nido", "Zenith", "Arcenia", "Kastia", "Judis", "Plana", "Kalluna", "Stius", "Croa", "Medere"};
final static Map<Integer, String> jobNames = new HashMap<>();
public static final int[] OWL_DATA = new int[]{1082002, 2070005, 2070006, 1022047, 1102041, 2044705, 2340000, 2040017, 1092030, 2040804};
// Ronan's rates upgrade system
@@ -23,15 +24,9 @@ public class GameConstants {
private static final int[] MESO_RATE_GAIN = {1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105};
private static final int[] EXP_RATE_GAIN = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610}; //fibonacci :3
public static boolean availableDeveloperRoom = false;
public static void setAvailableDeveloperRoom() {
availableDeveloperRoom = true;
}
public static boolean canEnterDeveloperRoom() {
return availableDeveloperRoom;
}
private final static Map<Integer, String> jobNames = new HashMap<>();
private final static NumberFormat nfFormatter = new DecimalFormat("#,###,###,###");
private final static NumberFormat nfParser = NumberFormat.getInstance(ServerConstants.USE_UNITPRICE_WITH_COMMA ? Locale.FRANCE : Locale.UK);
public static int getPlayerBonusDropRate(int slot) {
return(DROP_RATE_GAIN[slot]);
@@ -117,6 +112,20 @@ public class GameConstants {
}
}
public static boolean isPodiumHallOfFameMap(int mapid) {
switch(mapid) {
case 102000004: // warrior
case 101000004: // magician
case 100000204: // bowman
case 103000008: // thief
case 120000105: // pirate
return true;
default:
return false;
}
}
public static byte getHallOfFameBranch(MapleJob job, int mapid) {
if(!isHallOfFameMap(mapid)) {
return (byte) (26 + 4 * (mapid / 100000000)); // custom, 400 pnpcs available per continent
@@ -396,4 +405,21 @@ public class GameConstants {
return i + sufixes[i % 10];
}
}
public synchronized static String numberWithCommas(int i) {
if(!ServerConstants.USE_DISPLAY_NUMBERS_WITH_COMMA) {
return nfFormatter.format(i); // will display number on whatever locale is currently assigned on NumberFormat
} else {
return NumberFormat.getNumberInstance(Locale.UK).format(i);
}
}
public synchronized static Number parseNumber(String value) {
try {
return nfParser.parse(value);
} catch(Exception e) {
e.printStackTrace();
return 0.0f;
}
}
}