1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-11 17:00:08 -09:00

Dungeons: fixed rollback error on disconnects while choosing dungeon;

This commit is contained in:
Oleg Agafonov 2021-09-05 14:43:21 +04:00
parent 5e50dc7393
commit a129aaf4ee

View file

@ -148,7 +148,12 @@ public class Dungeon implements CommandObject {
choice.setMessage("Choose a dungeon to venture into");
choice.setChoices(dungeonNames);
player.choose(Outcome.Neutral, choice, game);
return createDungeon(choice.getChoice());
if (choice.getChoice() != null) {
return createDungeon(choice.getChoice());
} else {
// on disconnect
return createDungeon("Tomb of Annihilation");
}
}
public static Dungeon createDungeon(String name) {