Fix for crash in GameAction when QuestEvent is not a QuestChallenge

This commit is contained in:
Sol
2011-10-01 18:04:44 +00:00
parent 6ba90f2eff
commit 914beb6402

View File

@@ -1100,8 +1100,11 @@ public class GameAction {
AllZone.getComputerPlayer().setLife(computerLife, null);
AllZone.getHumanPlayer().setLife(humanLife, null);
if (qe != null && ((QuestChallenge)qe).getEventType().equals("challenge")) {
computer.addAll(forge.quest.data.QuestUtil.getComputerStartingCards(AllZone.getQuestData(), AllZone.getQuestEvent()));
if (qe != null && qe instanceof QuestChallenge){
QuestChallenge challenge = (QuestChallenge)qe;
if (challenge.getEventType().equals("challenge")) {
computer.addAll(forge.quest.data.QuestUtil.getComputerStartingCards(AllZone.getQuestData(), AllZone.getQuestEvent()));
}
}
for (Card c : human) {