forked from MagicBane/Server
Initial refactor of damagetype
This commit is contained in:
@@ -30,13 +30,13 @@ import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class StaminaEffectModifier extends AbstractEffectModifier {
|
||||
|
||||
private SourceType damageType;
|
||||
private Enum.DamageType damageType;
|
||||
|
||||
public StaminaEffectModifier(ResultSet rs) throws SQLException {
|
||||
super(rs);
|
||||
String damageTypeDB = rs.getString("type");
|
||||
try {
|
||||
this.damageType = SourceType.valueOf(damageTypeDB.toUpperCase());
|
||||
this.damageType = Enum.DamageType.valueOf(damageTypeDB);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Logger.error("DamageType could not be loaded from database. " + "UUID = " + this.UUID
|
||||
+ " value received = '" + damageTypeDB.toUpperCase() + '\'', e);
|
||||
@@ -112,7 +112,7 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
|
||||
|
||||
// Apply any power effect modifiers (such as stances)
|
||||
if (bonus != null)
|
||||
modAmount *= (1 + (bonus.getFloatPercentAll(ModType.PowerDamageModifier, SourceType.NONE)));
|
||||
modAmount *= (1 + (bonus.getFloatPercentAll(ModType.PowerDamageModifier, SourceType.None)));
|
||||
}
|
||||
if (modAmount == 0f)
|
||||
return;
|
||||
@@ -140,7 +140,7 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
|
||||
}
|
||||
}
|
||||
PlayerBonuses bonus = ac.getBonuses();
|
||||
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.HEALING) >= trains) {
|
||||
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Healing) >= trains) {
|
||||
ModifyHealthMsg mhm = new ModifyHealthMsg(source, ac, 0f, 0f, 0f, powerID, powerName, trains, effectID);
|
||||
mhm.setUnknown03(5); //set target is immune
|
||||
DispatchMessage.sendToAllInRange(ac, mhm);
|
||||
|
||||
Reference in New Issue
Block a user