Browse Source

atr check failure

lakebane
FatBoy-DOTC 4 weeks ago
parent
commit
aaa737649e
  1. 21
      src/engine/gameManager/PowersManager.java
  2. 7
      src/engine/objects/PlayerCombatStats.java

21
src/engine/gameManager/PowersManager.java

@ -850,14 +850,14 @@ public enum PowersManager {
// return; // return;
//} //}
if(HandleItemEnchantments(playerCharacter, msg)) { //if(HandleItemEnchantments(playerCharacter, msg)) {
playerCharacter.setIsCasting(false); // playerCharacter.setIsCasting(false);
PerformActionMsg castMsg = new PerformActionMsg(msg); // PerformActionMsg castMsg = new PerformActionMsg(msg);
castMsg.setNumTrains(9999); // castMsg.setNumTrains(9999);
castMsg.setUnknown04(2); // castMsg.setUnknown04(2);
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); // DispatchMessage.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
return; // return;
} //}
PerformActionMsg performActionMsg; PerformActionMsg performActionMsg;
Dispatch dispatch; Dispatch dispatch;
@ -3149,11 +3149,12 @@ public enum PowersManager {
// Logger.error(pc.getFirstName() + " failed to apply self buff: " + msg.getPowerUsedID()); // Logger.error(pc.getFirstName() + " failed to apply self buff: " + msg.getPowerUsedID());
//} //}
UsePowerJob asj =new UsePowerJob(pc,msg,eb.getToken(),pb,pc.getLiveCounter(),pc.getLiveCounter()); UsePowerJob asj = new UsePowerJob(pc,msg,pb.getToken(),pb,pc.getLiveCounter(),pc.getLiveCounter());
JobContainer jc = JobScheduler.getInstance().scheduleJob(asj, 1800000); JobContainer jc = JobScheduler.getInstance().scheduleJob(asj, 1800000);
Effect eff = new Effect(jc, eb, msg.getNumTrains()); Effect eff = new Effect(jc, eb, msg.getNumTrains());
pc.effects.put("CASTABLE", eff); // pc.effects.put("CASTABLE", eff);
pc.addEffect("CASTABLE",1800,asj,eb,msg.getNumTrains());
pc.applyAllBonuses(); pc.applyAllBonuses();
ApplyEffectMsg pum = new ApplyEffectMsg(); ApplyEffectMsg pum = new ApplyEffectMsg();

7
src/engine/objects/PlayerCombatStats.java

@ -6,6 +6,7 @@ import engine.powers.EffectsBase;
import engine.powers.PowersBase; import engine.powers.PowersBase;
import engine.powers.effectmodifiers.AbstractEffectModifier; import engine.powers.effectmodifiers.AbstractEffectModifier;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import org.pmw.tinylog.Logger;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
@ -384,9 +385,10 @@ public class PlayerCombatStats {
} }
} }
} else { } else {
try {
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) {
if (mod.modType.equals(Enum.ModType.OCV)) { if (mod.modType.equals(Enum.ModType.OCV)) {
if(mod.getPercentMod() == 0) { if (mod.getPercentMod() == 0) {
float value = mod.getMinMod(); float value = mod.getMinMod();
int trains = this.owner.effects.get(effID).getTrains(); int trains = this.owner.effects.get(effID).getTrains();
float modValue = value + (trains * mod.getRamp()); float modValue = value + (trains * mod.getRamp());
@ -394,6 +396,9 @@ public class PlayerCombatStats {
} }
} }
} }
}catch(Exception e){
//Logger.error(e.getMessage());
}
} }
} }

Loading…
Cancel
Save