Browse Source

Enchant Value derived form parser instead of database

feature-config-usage
FatBoy-DOTC 3 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 { @@ -221,20 +221,4 @@ public class dbLootHandler extends dbHandlerBase {
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; @@ -23,10 +23,7 @@ import engine.mbEnums.PowerFailCondition;
import engine.net.Dispatch;
import engine.net.client.ClientConnection;
import engine.net.client.msg.ApplyEffectMsg;
import engine.objects.AbstractCharacter;
import engine.objects.AbstractWorldObject;
import engine.objects.Effect;
import engine.objects.PlayerCharacter;
import engine.objects.*;
import engine.powers.effectmodifiers.*;
import engine.server.MBServerStatics;
import engine.util.Hasher;
@ -858,6 +855,7 @@ public class EffectsBase { @@ -858,6 +855,7 @@ public class EffectsBase {
if (effectBase != null) {
ValueEffectModifier valueEffect = (ValueEffectModifier) abstractEffectModifier;
effectBase.value = valueEffect.minMod;
Item.addEnchantValue(effectBase.getIDString(), (int)valueEffect.minMod);
}
break;
case WeaponProc:

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

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

Loading…
Cancel
Save