From 001a89ccf0cb266acc7e9c8879927224fb84c071 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 20 Aug 2024 19:45:31 -0500 Subject: [PATCH] database loading effects --- src/engine/gameManager/PowersManager.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index a98dfc60..6a24fae4 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -138,7 +138,21 @@ public enum PowersManager { PowersParser.parseWpakFile(); PowerActionParser.parseWpakFile(); - InitializeEffects(); + //InitializeEffects(); + + ArrayList ebList = dbEffectsBaseHandler.getAllEffectsBase(); + + for (EffectsBase eb : ebList) { + PowersManager.effectsBaseByToken.put(eb.getToken(), eb); + PowersManager.effectsBaseByIDString.put(eb.getIDString(), eb); + + } + + // Add Fail Conditions + EffectsBase.getFailConditions(PowersManager.effectsBaseByIDString); + + // Add Modifiers to Effects + dbEffectsBaseHandler.cacheAllEffectModifiers(); // Add Source Types to Effects dbPowerHandler.addAllSourceTypes();