Select pet must use an English string to store pet selection

This commit is contained in:
friarsol
2023-04-20 18:10:35 -04:00
parent 5defd50ccb
commit 7d5c1bed3c
3 changed files with 5 additions and 3 deletions

View File

@@ -88,8 +88,8 @@ public enum CSubmenuChallenges implements ICDoc {
view.getCbPlant().addActionListener(new ActionListener() { view.getCbPlant().addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent arg0) { public void actionPerformed(final ActionEvent arg0) {
final Localizer localizer = Localizer.getInstance(); // This can't be translated. As the English string "Plant" is used to find the Plant pet.
quest.selectPet(0, view.getCbPlant().isSelected() ? localizer.getMessage("lblPlant") : null); quest.selectPet(0, view.getCbPlant().isSelected() ? "Plant" : null);
quest.save(); quest.save();
} }
}); });

View File

@@ -88,6 +88,7 @@ public enum CSubmenuDuels implements ICDoc {
view.getCbPlant().addActionListener(new ActionListener() { view.getCbPlant().addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent arg0) { public void actionPerformed(final ActionEvent arg0) {
// This can't be translated. As the English string "Plant" is used to find the Plant pet.
quest.selectPet(0, view.getCbPlant().isSelected() ? "Plant" : null); quest.selectPet(0, view.getCbPlant().isSelected() ? "Plant" : null);
quest.save(); quest.save();
} }

View File

@@ -115,7 +115,8 @@ public class QuestStatsScreen extends FScreen {
cbPlant.setCommand(new FEventHandler() { cbPlant.setCommand(new FEventHandler() {
@Override @Override
public void handleEvent(FEvent e) { public void handleEvent(FEvent e) {
FModel.getQuest().selectPet(0, cbPlant.isSelected() ? Forge.getLocalizer().getMessage("lblPlant") : null); // This can't be translated. As the English string "Plant" is used to find the Plant pet.
FModel.getQuest().selectPet(0, cbPlant.isSelected() ? "Plant" : null);
FModel.getQuest().save(); FModel.getQuest().save();
} }
}); });