Load the wpak cfgs before PowersManager on the world server
The wpak parse now runs ahead of initPowersManager, so the Powers.cfg target type step runs at the end of InitializePowers instead of as a separate call after the wpak load. No value change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8bb6cd8268
commit
2da7c190bc
2 files changed
+76
-76
No files matched your search
@@ -95,8 +95,8 @@ public enum PowersManager {
|
|||||||
return PowersManager.effectsBaseByToken.get(token);
|
return PowersManager.effectsBaseByToken.get(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Powers.cfg target type wins over static_power_powerbase; needs PowerTemplate._powers, so the world server calls it after the wpak load
|
// Powers.cfg target type wins over static_power_powerbase
|
||||||
public static void applyClientTargetTypes() {
|
private static void applyClientTargetTypes() {
|
||||||
|
|
||||||
PowerTemplate powerTemplate;
|
PowerTemplate powerTemplate;
|
||||||
int applied = 0;
|
int applied = 0;
|
||||||
@@ -187,6 +187,8 @@ public enum PowersManager {
|
|||||||
ActionsBase.getActionsBase(PowersManager.powersBaseByIDString,
|
ActionsBase.getActionsBase(PowersManager.powersBaseByIDString,
|
||||||
PowersManager.powerActionsByIDString);
|
PowersManager.powerActionsByIDString);
|
||||||
|
|
||||||
|
applyClientTargetTypes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EffectsBase setEffectToken(int ID, int token) {
|
public static EffectsBase setEffectToken(int ID, int token) {
|
||||||
|
|||||||
@@ -298,6 +298,78 @@ public class WorldServer {
|
|||||||
Logger.info("Loading zone template data");
|
Logger.info("Loading zone template data");
|
||||||
DbManager.ZoneQueries.LOAD_ALL_ZONE_TEMPLATES();
|
DbManager.ZoneQueries.LOAD_ALL_ZONE_TEMPLATES();
|
||||||
|
|
||||||
|
Logger.info("Loading Compound Curves");
|
||||||
|
CompoundCurveTemplate._curves = CompoundCurveParser.parseCompoundCurvesFile();
|
||||||
|
|
||||||
|
if (CompoundCurveTemplate._curves == null || CompoundCurveTemplate._curves.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Compound curves failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Mod Types");
|
||||||
|
ModTypeTemplate._modTypes = ModTypeParser.parseModTypesFile();
|
||||||
|
|
||||||
|
if (ModTypeTemplate._modTypes == null || ModTypeTemplate._modTypes.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Mod types failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Power Actions");
|
||||||
|
PowerActionTemplate._powerActions = PowerActionParser.parsePowerActionsFile();
|
||||||
|
|
||||||
|
if (PowerActionTemplate._powerActions == null || PowerActionTemplate._powerActions.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Power actions failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Effects");
|
||||||
|
EffectTemplate._effects = EffectParser.parseEffectsFile();
|
||||||
|
|
||||||
|
if (EffectTemplate._effects == null || EffectTemplate._effects.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Effects failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Powers");
|
||||||
|
PowerTemplate._powers = PowerParser.parsePowersFile();
|
||||||
|
|
||||||
|
if (PowerTemplate._powers == null || PowerTemplate._powers.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Powers failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Skills");
|
||||||
|
SkillTemplate._skills = SkillParser.parseSkillsFile();
|
||||||
|
|
||||||
|
if (SkillTemplate._skills == null || SkillTemplate._skills.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Skills failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Starting Kits");
|
||||||
|
StartingKitTemplate._kits = StartingKitParser.parseStartingKitFile();
|
||||||
|
|
||||||
|
if (StartingKitTemplate._kits == null || StartingKitTemplate._kits.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Starting kits failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Character Creation Runes");
|
||||||
|
CharCreateRuneList._runeList = CharCreateRuneParser.parseCharCreateRuneFile();
|
||||||
|
|
||||||
|
if (CharCreateRuneList._runeList == null) {
|
||||||
|
Logger.error("ABORT! Character creation runes failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.info("Loading Power Action Resource Costs");
|
||||||
|
PowActionCostTemplate._costs = PowActionCostParser.parsePowActionCostFile();
|
||||||
|
|
||||||
|
if (PowActionCostTemplate._costs == null || PowActionCostTemplate._costs.isEmpty()) {
|
||||||
|
Logger.error("ABORT! Power action resource costs failed to load!");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
Logger.info("Initializing PowersManager.");
|
Logger.info("Initializing PowersManager.");
|
||||||
PowersManager.initPowersManager(true);
|
PowersManager.initPowersManager(true);
|
||||||
|
|
||||||
@@ -352,80 +424,6 @@ public class WorldServer {
|
|||||||
Logger.info("Indexing Cache Templates");
|
Logger.info("Indexing Cache Templates");
|
||||||
CObjectIndex.build();
|
CObjectIndex.build();
|
||||||
|
|
||||||
Logger.info("Loading Compound Curves");
|
|
||||||
CompoundCurveTemplate._curves = CompoundCurveParser.parseCompoundCurvesFile();
|
|
||||||
|
|
||||||
if (CompoundCurveTemplate._curves == null || CompoundCurveTemplate._curves.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Compound curves failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Mod Types");
|
|
||||||
ModTypeTemplate._modTypes = ModTypeParser.parseModTypesFile();
|
|
||||||
|
|
||||||
if (ModTypeTemplate._modTypes == null || ModTypeTemplate._modTypes.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Mod types failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Power Actions");
|
|
||||||
PowerActionTemplate._powerActions = PowerActionParser.parsePowerActionsFile();
|
|
||||||
|
|
||||||
if (PowerActionTemplate._powerActions == null || PowerActionTemplate._powerActions.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Power actions failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Effects");
|
|
||||||
EffectTemplate._effects = EffectParser.parseEffectsFile();
|
|
||||||
|
|
||||||
if (EffectTemplate._effects == null || EffectTemplate._effects.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Effects failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Powers");
|
|
||||||
PowerTemplate._powers = PowerParser.parsePowersFile();
|
|
||||||
|
|
||||||
if (PowerTemplate._powers == null || PowerTemplate._powers.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Powers failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
PowersManager.applyClientTargetTypes();
|
|
||||||
|
|
||||||
Logger.info("Loading Skills");
|
|
||||||
SkillTemplate._skills = SkillParser.parseSkillsFile();
|
|
||||||
|
|
||||||
if (SkillTemplate._skills == null || SkillTemplate._skills.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Skills failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Starting Kits");
|
|
||||||
StartingKitTemplate._kits = StartingKitParser.parseStartingKitFile();
|
|
||||||
|
|
||||||
if (StartingKitTemplate._kits == null || StartingKitTemplate._kits.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Starting kits failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Character Creation Runes");
|
|
||||||
CharCreateRuneList._runeList = CharCreateRuneParser.parseCharCreateRuneFile();
|
|
||||||
|
|
||||||
if (CharCreateRuneList._runeList == null) {
|
|
||||||
Logger.error("ABORT! Character creation runes failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading Power Action Resource Costs");
|
|
||||||
PowActionCostTemplate._costs = PowActionCostParser.parsePowActionCostFile();
|
|
||||||
|
|
||||||
if (PowActionCostTemplate._costs == null || PowActionCostTemplate._costs.isEmpty()) {
|
|
||||||
Logger.error("ABORT! Power action resource costs failed to load!");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.info("Loading PromotionClasses");
|
Logger.info("Loading PromotionClasses");
|
||||||
PromotionClass.LoadAllPromotions();
|
PromotionClass.LoadAllPromotions();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user