Riizade/config file (#520)
* added POJO + yaml file * made config members public * switched to yaml * modified files to use YamlConfig over ServerConstants * removed constants from ServerConstants * removed unused imports * removed unused import * removed world ini * removed now unused .ini files * fixed docker-launch.sh * added jackson dependency JARs * fixed errors * removed unused server config values, added world defaults * don't use env variables for docker * fixed package imports/specifiers for js files
This commit is contained in:
committed by
Ronan Lana
parent
e169971384
commit
181573dc74
@@ -31,6 +31,7 @@ import client.MapleCharacter;
|
||||
import client.MapleCharacter.DelayedQuestUpdate;
|
||||
import client.MapleQuestStatus;
|
||||
import client.MapleQuestStatus.Status;
|
||||
import config.YamlConfig;
|
||||
import constants.ServerConstants;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Set;
|
||||
@@ -228,7 +229,7 @@ public class MapleQuest {
|
||||
if(!repeatable) return false;
|
||||
|
||||
IntervalRequirement ir = (IntervalRequirement) startReqs.get(MapleQuestRequirementType.INTERVAL);
|
||||
return ir.getInterval() < ServerConstants.QUEST_POINT_REPEATABLE_INTERVAL * 60 * 60 * 1000;
|
||||
return ir.getInterval() < YamlConfig.config.server.QUEST_POINT_REPEATABLE_INTERVAL * 60 * 60 * 1000;
|
||||
}
|
||||
|
||||
public boolean canStartWithoutRequirements(MapleCharacter c) {
|
||||
@@ -331,8 +332,8 @@ public class MapleQuest {
|
||||
|
||||
c.updateQuest(newStatus);
|
||||
|
||||
if(id / 100 == 35 && ServerConstants.TOT_MOB_QUEST_REQUIREMENT > 0) {
|
||||
int setProg = 999 - Math.min(999, ServerConstants.TOT_MOB_QUEST_REQUIREMENT);
|
||||
if(id / 100 == 35 && YamlConfig.config.server.TOT_MOB_QUEST_REQUIREMENT > 0) {
|
||||
int setProg = 999 - Math.min(999, YamlConfig.config.server.TOT_MOB_QUEST_REQUIREMENT);
|
||||
|
||||
for(Integer pid : newStatus.getProgress().keySet()) {
|
||||
if(pid >= 8200000 && pid <= 8200012) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package server.quest.actions;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import config.YamlConfig;
|
||||
import constants.ServerConstants;
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataTool;
|
||||
@@ -52,7 +53,7 @@ public class ExpAction extends MapleQuestAction {
|
||||
}
|
||||
|
||||
public static void runAction(MapleCharacter chr, int gain) {
|
||||
if (!ServerConstants.USE_QUEST_RATE) {
|
||||
if (!YamlConfig.config.server.USE_QUEST_RATE) {
|
||||
chr.gainExp(gain * chr.getExpRate(), true, true);
|
||||
} else {
|
||||
chr.gainExp(gain * chr.getQuestExpRate(), true, true);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package server.quest.actions;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import config.YamlConfig;
|
||||
import constants.ServerConstants;
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataTool;
|
||||
@@ -56,7 +57,7 @@ public class MesoAction extends MapleQuestAction {
|
||||
if (gain < 0) {
|
||||
chr.gainMeso(gain, true, false, true);
|
||||
} else {
|
||||
if (!ServerConstants.USE_QUEST_RATE) {
|
||||
if (!YamlConfig.config.server.USE_QUEST_RATE) {
|
||||
chr.gainMeso(gain * chr.getMesoRate(), true, false, true);
|
||||
} else {
|
||||
chr.gainMeso(gain * chr.getQuestMesoRate(), true, false, true);
|
||||
|
||||
Reference in New Issue
Block a user