Browse Source

Update sourcetype

bugfix-sources
MagicBot 5 months ago
parent
commit
cdf3e4db8a
  1. 8
      src/engine/gameManager/PowersManager.java
  2. 2
      src/engine/jobs/FinishSummonsJob.java
  3. 2
      src/engine/net/client/handlers/RecvSummonsMsgHandler.java
  4. 2
      src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java
  5. 2
      src/engine/powers/effectmodifiers/NoModEffectModifier.java

8
src/engine/gameManager/PowersManager.java

@ -348,7 +348,7 @@ public enum PowersManager { @@ -348,7 +348,7 @@ public enum PowersManager {
// verify player is not stunned or prohibited from casting
PlayerBonuses bonus = playerCharacter.getBonuses();
SourceType sourceType = EffectSourceType.GetSourceType(pb.getCategory());
EffectSourceType sourceType = EffectSourceType.getEffectSourceType(pb.getCategory());
if (bonus != null && (bonus.getBool(ModType.Stunned, EffectSourceType.None) || bonus.getBool(ModType.CannotCast, EffectSourceType.None) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
return true;
@ -631,7 +631,7 @@ public enum PowersManager { @@ -631,7 +631,7 @@ public enum PowersManager {
// verify player is in correct mode (combat/nonCombat)
// verify player is not stunned or prohibited from casting
PlayerBonuses bonus = caster.getBonuses();
SourceType sourceType = EffectSourceType.GetSourceType(pb.getCategory());
EffectSourceType sourceType = EffectSourceType.getEffectSourceType(pb.getCategory());
if (bonus != null && (bonus.getBool(ModType.Stunned, EffectSourceType.None) || bonus.getBool(ModType.CannotCast, EffectSourceType.None) || bonus.getBool(ModType.BlockedPowerType, sourceType)))
return true;
@ -795,7 +795,7 @@ public enum PowersManager { @@ -795,7 +795,7 @@ public enum PowersManager {
if (bonus.getBool(ModType.Stunned, EffectSourceType.None))
return;
SourceType sourceType = EffectSourceType.GetSourceType(pb.getCategory());
EffectSourceType sourceType = EffectSourceType.getEffectSourceType(pb.getCategory());
if (bonus.getBool(ModType.BlockedPowerType, sourceType)) {
finishRecycleTime(msg.getPowerUsedID(), playerCharacter, true);
return;
@ -1067,7 +1067,7 @@ public enum PowersManager { @@ -1067,7 +1067,7 @@ public enum PowersManager {
if (bonus != null) {
if (bonus.getBool(ModType.Stunned, EffectSourceType.None))
return;
SourceType sourceType = EffectSourceType.GetSourceType(pb.getCategory());
EffectSourceType sourceType = EffectSourceType.getEffectSourceType(pb.getCategory());
if (bonus.getBool(ModType.BlockedPowerType, sourceType))
return;
}

2
src/engine/jobs/FinishSummonsJob.java

@ -55,7 +55,7 @@ public class FinishSummonsJob extends AbstractScheduleJob { @@ -55,7 +55,7 @@ public class FinishSummonsJob extends AbstractScheduleJob {
return;
}
if (this.target.getBonuses() != null && this.target.getBonuses().getBool(ModType.BlockedPowerType, EffectSourceType.SUMMON)) {
if (this.target.getBonuses() != null && this.target.getBonuses().getBool(ModType.BlockedPowerType, EffectSourceType.Summon)) {
ErrorPopupMsg.sendErrorMsg(this.target, "You have been blocked from receiving summons!");
ErrorPopupMsg.sendErrorMsg(this.source, "Target is blocked from receiving summons!");
return;

2
src/engine/net/client/handlers/RecvSummonsMsgHandler.java

@ -58,7 +58,7 @@ public class RecvSummonsMsgHandler extends AbstractClientMsgHandler { @@ -58,7 +58,7 @@ public class RecvSummonsMsgHandler extends AbstractClientMsgHandler {
return true;
}
if (playerCharacter.getBonuses() != null && playerCharacter.getBonuses().getBool(mbEnums.ModType.BlockedPowerType, mbEnums.EffectSourceType.SUMMON)) {
if (playerCharacter.getBonuses() != null && playerCharacter.getBonuses().getBool(mbEnums.ModType.BlockedPowerType, mbEnums.EffectSourceType.Summon)) {
ErrorPopupMsg.sendErrorMsg(playerCharacter, "You have been blocked from receiving summons!");
ErrorPopupMsg.sendErrorMsg(source, "Target is blocked from receiving summons!");
playerCharacter.removeSummoner(source.getObjectUUID());

2
src/engine/powers/effectmodifiers/BlackMantleEffectModifier.java

@ -33,7 +33,7 @@ public class BlackMantleEffectModifier extends AbstractEffectModifier { @@ -33,7 +33,7 @@ public class BlackMantleEffectModifier extends AbstractEffectModifier {
@Override
public void applyBonus(AbstractCharacter ac, int trains) {
PlayerBonuses bonus = ac.getBonuses();
SourceType sourceType = EffectSourceType.valueOf(this.type);
EffectSourceType sourceType = EffectSourceType.valueOf(this.type);
if (sourceType == null) {
Logger.error("Bad Source Type for " + this.type);

2
src/engine/powers/effectmodifiers/NoModEffectModifier.java

@ -33,7 +33,7 @@ public class NoModEffectModifier extends AbstractEffectModifier { @@ -33,7 +33,7 @@ public class NoModEffectModifier extends AbstractEffectModifier {
bonus.setBool(this.modType, this.sourceType, true);
switch (this.sourceType) {
case Fly:
case Flight:
if (!ac.getObjectType().equals(GameObjectType.PlayerCharacter))
return;
PlayerCharacter flyer = (PlayerCharacter) ac;

Loading…
Cancel
Save