mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fix Difficulty Index not being set after Save Game loads causing booster packs to be won too often.
This commit is contained in:
@@ -199,6 +199,7 @@ public class Gui_QuestOptions extends JFrame {
|
|||||||
void continueQuestButton_actionPerformed(ActionEvent e) {
|
void continueQuestButton_actionPerformed(ActionEvent e) {
|
||||||
//set global variable
|
//set global variable
|
||||||
AllZone.QuestData = QuestData.loadData();
|
AllZone.QuestData = QuestData.loadData();
|
||||||
|
AllZone.QuestData.setDifficultyIndex();
|
||||||
dispose();
|
dispose();
|
||||||
new Gui_Quest();
|
new Gui_Quest();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -738,6 +738,13 @@ public class QuestData implements NewConstants {
|
|||||||
difficulty = qdPrefs.getDifficulty(i);
|
difficulty = qdPrefs.getDifficulty(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDifficultyIndex() {
|
||||||
|
String[] diffStr = qdPrefs.getDifficulty();
|
||||||
|
for(int i = 0; i < diffStr.length; i++)
|
||||||
|
if (difficulty.equals(diffStr[i]))
|
||||||
|
diffIndex = i;
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getDifficutlyChoices() {
|
public String[] getDifficutlyChoices() {
|
||||||
return qdPrefs.getDifficulty();
|
return qdPrefs.getDifficulty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user