Browse Source

Enchant Value derived form parser instead of database

feature-config-usage
FatBoy-DOTC 4 months ago
parent
commit
769b84b9da
  1. 16
      src/engine/db/handlers/dbLootHandler.java
  2. 6
      src/engine/powers/EffectsBase.java
  3. 3
      src/engine/server/world/WorldServer.java

16
src/engine/db/handlers/dbLootHandler.java

@ -221,20 +221,4 @@ public class dbLootHandler extends dbHandlerBase {
return bootySets; return bootySets;
} }
public void LOAD_ENCHANT_VALUES() {
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT `IDString`, `minMod` FROM `static_power_effectmod` WHERE `modType` = ?")) {
preparedStatement.setString(1, "Value");
ResultSet rs = preparedStatement.executeQuery();
while (rs.next())
Item.addEnchantValue(rs.getString("IDString"), rs.getInt("minMod"));
} catch (SQLException e) {
Logger.error(e);
}
}
} }

6
src/engine/powers/EffectsBase.java

@ -23,10 +23,7 @@ import engine.mbEnums.PowerFailCondition;
import engine.net.Dispatch; import engine.net.Dispatch;
import engine.net.client.ClientConnection; import engine.net.client.ClientConnection;
import engine.net.client.msg.ApplyEffectMsg; import engine.net.client.msg.ApplyEffectMsg;
import engine.objects.AbstractCharacter; import engine.objects.*;
import engine.objects.AbstractWorldObject;
import engine.objects.Effect;
import engine.objects.PlayerCharacter;
import engine.powers.effectmodifiers.*; import engine.powers.effectmodifiers.*;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import engine.util.Hasher; import engine.util.Hasher;
@ -858,6 +855,7 @@ public class EffectsBase {
if (effectBase != null) { if (effectBase != null) {
ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier; ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier;
effectBase.value = valueEffect.minMod; effectBase.value = valueEffect.minMod;
Item.addEnchantValue(effectBase.getIDString(), (int)valueEffect.minMod);
} }
break; break;
case WeaponProc: case WeaponProc:

3
src/engine/server/world/WorldServer.java

@ -330,9 +330,6 @@ public class WorldServer {
Logger.info("Loading Rune Skill Adjusts"); Logger.info("Loading Rune Skill Adjusts");
PowersManager._allRuneSkillAdjusts = dbRuneBaseHandler.LOAD_RUNE_SKILL_ADJUSTS(); PowersManager._allRuneSkillAdjusts = dbRuneBaseHandler.LOAD_RUNE_SKILL_ADJUSTS();
Logger.info("Loading item enchants");
DbManager.LootQueries.LOAD_ENCHANT_VALUES();
Logger.info("Loading Realms"); Logger.info("Loading Realms");
Realm.loadAllRealms(); Realm.loadAllRealms();

Loading…
Cancel
Save