forked from MagicBane/Server
Uppercase enum.
This commit is contained in:
@@ -330,7 +330,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
|
||||
@@ -466,7 +466,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;
|
||||
@@ -613,7 +613,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
|
||||
@@ -773,7 +773,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());
|
||||
@@ -1051,7 +1051,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))
|
||||
@@ -1469,7 +1469,7 @@ public enum PowersManager {
|
||||
it.remove();
|
||||
else if (awo.getObjectType().equals(GameObjectType.PlayerCharacter)) {
|
||||
PlayerBonuses bonus = ((PlayerCharacter) awo).getBonuses();
|
||||
if (bonus != null && bonus.getBool(ModType.CannotTrack, SourceType.None))
|
||||
if (bonus != null && bonus.getBool(ModType.CannotTrack, SourceType.NONE))
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
@@ -1943,7 +1943,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;
|
||||
}
|
||||
@@ -2093,7 +2093,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