forked from External/mage
Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc)
This commit is contained in:
parent
cfd7464b49
commit
a15a0daa04
81 changed files with 162 additions and 130 deletions
|
|
@ -84,13 +84,6 @@ public class Turn implements Serializable {
|
|||
return null;
|
||||
}
|
||||
|
||||
public PhaseStep getStepType() {
|
||||
if (currentPhase != null && currentPhase.getStep() != null) {
|
||||
return currentPhase.getStep().getType();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* @param activePlayer
|
||||
|
|
@ -148,8 +141,8 @@ public class Turn implements Serializable {
|
|||
public void resumePlay(Game game, boolean wasPaused) {
|
||||
activePlayerId = game.getActivePlayerId();
|
||||
UUID priorityPlayerId = game.getPriorityPlayerId();
|
||||
TurnPhase phaseType = game.getPhase().getType();
|
||||
PhaseStep stepType = game.getStep().getType();
|
||||
TurnPhase phaseType = game.getTurnPhaseType();
|
||||
PhaseStep stepType = game.getTurnStepType();
|
||||
|
||||
Iterator<Phase> it = phases.iterator();
|
||||
Phase phase;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue