allow cancelling character creation
This commit is contained in:
parent
58163db658
commit
53a4f5f1a8
3 changed files with 21 additions and 10 deletions
|
@ -2427,7 +2427,7 @@ public class Player extends User implements ICrafting, Executor, IPlayer
|
|||
NetHandler.checkThread(packetIn, this, this.server);
|
||||
|
||||
CPacketAction.Action action = packetIn.getAction();
|
||||
if(this.charEditor != (action == Action.SET_ALIGN || action == Action.SET_SPECIES || action == Action.SET_CLASS || action == Action.SET_HEIGHT || action == Action.CLOSE_EDITOR)) // {
|
||||
if(this.charEditor != (action == Action.SET_ALIGN || action == Action.SET_SPECIES || action == Action.SET_CLASS || action == Action.SET_HEIGHT || action == Action.CLOSE_EDITOR || action == Action.CANCEL_EDITOR)) // {
|
||||
// if(this.local && action == Action.CLOSE_EDITOR)
|
||||
// this.server.setDone();
|
||||
return;
|
||||
|
@ -2464,6 +2464,17 @@ public class Player extends User implements ICrafting, Executor, IPlayer
|
|||
// this.server.setDone();
|
||||
break;
|
||||
}
|
||||
|
||||
case CANCEL_EDITOR: {
|
||||
int index = packetIn.getAuxData();
|
||||
if(index >= this.characters.size() || index < 0)
|
||||
return;
|
||||
this.charEditor = false;
|
||||
this.server.swapPlayer(this, this.characters.get(index), null);
|
||||
this.selected = index;
|
||||
this.sendPacket(new SPacketCharacterList(this.selected));
|
||||
break;
|
||||
}
|
||||
|
||||
case SELECT_CHARACTER: {
|
||||
int index = packetIn.getAuxData();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue