forked from MagicBane/Server
Build effect cost maps from PowActionCostInfo.cfg
PowersManager._effect_costMaps now comes from PowActionCostTemplate instead of static_effect_costmaps. Parity (scripts/p45.py, dev DB): 524/524 ids, 522 identical. Value changes, cfg wins (D2, user decision 2026-10-26): - PRE-092 Yglandor: Sulfur 1 -> 6 - PRE-097 Jagged: adds Sulfur 1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
337cc3d360
commit
4f323ae12d
2 files changed
+10
-1
No files matched your search
@@ -28,6 +28,7 @@ import engine.net.Dispatch;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
import engine.parsers.objects.wpak.PowActionCostTemplate;
|
||||
import engine.parsers.objects.wpak.PowerTemplate;
|
||||
import engine.powers.*;
|
||||
import engine.powers.poweractions.AbstractPowerAction;
|
||||
@@ -94,6 +95,14 @@ public enum PowersManager {
|
||||
return PowersManager.effectsBaseByToken.get(token);
|
||||
}
|
||||
|
||||
public static void loadEffectCostMaps() {
|
||||
|
||||
for (PowActionCostTemplate costTemplate : PowActionCostTemplate._costs.values())
|
||||
PowersManager._effect_costMaps.put(costTemplate.id, new HashMap<>(costTemplate.costs));
|
||||
|
||||
Logger.info("Loaded " + PowersManager._effect_costMaps.size() + " effect cost maps from PowActionCostInfo.cfg");
|
||||
}
|
||||
|
||||
// Powers.cfg target type wins over static_power_powerbase
|
||||
private static void applyClientTargetTypes() {
|
||||
|
||||
|
||||
@@ -593,7 +593,7 @@ public class WorldServer {
|
||||
ReSpawner.start();
|
||||
|
||||
Logger.info("Loading effect cost maps");
|
||||
DbManager.EffectsResourceCostsQueries.LOAD_ALL_COSTMAPS();
|
||||
PowersManager.loadEffectCostMaps();
|
||||
|
||||
Logger.info("Starting ForgeManager thread");
|
||||
ForgeManager.start();
|
||||
|
||||
Reference in new issue
Block a user