* Fixed that the selected avatar was not shown as avatar in the game (fixes #1365).

This commit is contained in:
LevelX2 2015-11-28 09:38:28 +01:00
parent cb4f996bce
commit 0a39b0568d

View file

@ -270,7 +270,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private static final Border GREEN_BORDER = BorderFactory.createLineBorder(Color.GREEN, 3);
private static final Border BLACK_BORDER = BorderFactory.createLineBorder(Color.BLACK, 3);
private static int selectedAvatarId = DEFAULT_AVATAR_ID;
private static int selectedAvatarId;
private final JFileChooser fc = new JFileChooser();
@ -2723,6 +2723,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
}
public static UserData getUserData() {
if (selectedAvatarId == 0) {
getSelectedAvatar();
}
return new UserData(UserGroup.PLAYER,
PreferencesDialog.selectedAvatarId,
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"),