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) {
|
||||
//set global variable
|
||||
AllZone.QuestData = QuestData.loadData();
|
||||
AllZone.QuestData.setDifficultyIndex();
|
||||
dispose();
|
||||
new Gui_Quest();
|
||||
}
|
||||
|
||||
@@ -738,6 +738,13 @@ public class QuestData implements NewConstants {
|
||||
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() {
|
||||
return qdPrefs.getDifficulty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user