forked from MagicBane/Server
Initial refactor of damagetype
This commit is contained in:
@@ -332,7 +332,7 @@ public enum PowersManager {
|
||||
// verify player is not stunned or prohibited from casting
|
||||
PlayerBonuses bonus = playerCharacter.getBonuses();
|
||||
SourceType sourceType = SourceType.GetSourceType(pb.getCategory());
|
||||
if (bonus != null && (bonus.getBool(ModType.Stunned, SourceType.NONE) || bonus.getBool(ModType.CannotCast, SourceType.NONE) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
|
||||
if (bonus != null && (bonus.getBool(ModType.Stunned, SourceType.None) || bonus.getBool(ModType.CannotCast, SourceType.None) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
|
||||
return true;
|
||||
|
||||
// if moving make sure spell valid for movement
|
||||
@@ -468,7 +468,7 @@ public enum PowersManager {
|
||||
cost = 0;
|
||||
|
||||
if (bonus != null)
|
||||
cost *= (1 + bonus.getFloatPercentAll(ModType.PowerCost, SourceType.NONE));
|
||||
cost *= (1 + bonus.getFloatPercentAll(ModType.PowerCost, SourceType.None));
|
||||
|
||||
if (playerCharacter.getAltitude() > 0)
|
||||
cost *= 1.5f;
|
||||
@@ -615,7 +615,7 @@ public enum PowersManager {
|
||||
// verify player is not stunned or prohibited from casting
|
||||
PlayerBonuses bonus = caster.getBonuses();
|
||||
SourceType sourceType = SourceType.GetSourceType(pb.getCategory());
|
||||
if (bonus != null && (bonus.getBool(ModType.Stunned, SourceType.NONE) || bonus.getBool(ModType.CannotCast, SourceType.NONE) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
|
||||
if (bonus != null && (bonus.getBool(ModType.Stunned, SourceType.None) || bonus.getBool(ModType.CannotCast, SourceType.None) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
|
||||
return true;
|
||||
|
||||
// if moving make sure spell valid for movement
|
||||
@@ -775,7 +775,7 @@ public enum PowersManager {
|
||||
PlayerBonuses bonus = playerCharacter.getBonuses();
|
||||
|
||||
if (bonus != null) {
|
||||
if (bonus.getBool(ModType.Stunned, SourceType.NONE))
|
||||
if (bonus.getBool(ModType.Stunned, SourceType.None))
|
||||
return;
|
||||
|
||||
SourceType sourceType = SourceType.GetSourceType(pb.getCategory());
|
||||
@@ -1053,7 +1053,7 @@ public enum PowersManager {
|
||||
// verify player is not stunned or power type is blocked
|
||||
PlayerBonuses bonus = caster.getBonuses();
|
||||
if (bonus != null) {
|
||||
if (bonus.getBool(ModType.Stunned, SourceType.NONE))
|
||||
if (bonus.getBool(ModType.Stunned, SourceType.None))
|
||||
return;
|
||||
SourceType sourceType = SourceType.GetSourceType(pb.getCategory());
|
||||
if (bonus.getBool(ModType.BlockedPowerType, sourceType))
|
||||
@@ -1688,7 +1688,7 @@ public enum PowersManager {
|
||||
PlayerCharacter pcc = (PlayerCharacter) awo;
|
||||
PlayerBonuses bonuses = pcc.getBonuses();
|
||||
|
||||
if (bonuses != null && bonuses.getBool(ModType.ImmuneToPowers, SourceType.NONE)) {
|
||||
if (bonuses != null && bonuses.getBool(ModType.ImmuneToPowers, SourceType.None)) {
|
||||
awolist.remove();
|
||||
continue;
|
||||
}
|
||||
@@ -1838,7 +1838,7 @@ public enum PowersManager {
|
||||
// Remove players who are in safe mode
|
||||
PlayerCharacter pcc = (PlayerCharacter) awo;
|
||||
PlayerBonuses bonuses = pcc.getBonuses();
|
||||
if (bonuses != null && bonuses.getBool(ModType.ImmuneToPowers, SourceType.NONE)) {
|
||||
if (bonuses != null && bonuses.getBool(ModType.ImmuneToPowers, SourceType.None)) {
|
||||
awolist.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user