@Override public void execute( final ConsoleManager manager, final CommandPattern pattern, final ArrayList<String> args) { if (WakfuGameEntity.getInstance().hasFrame(UIEcosystemEquilibriumFrame.getInstance())) { WakfuGameEntity.getInstance().removeFrame(UIEcosystemEquilibriumFrame.getInstance()); } else { WakfuGameEntity.getInstance().pushFrame(UIEcosystemEquilibriumFrame.getInstance()); } }
@Override public void onFrameRemove(final FrameHandler frameHandler, final boolean isAboutToBeRemoved) { if (!isAboutToBeRemoved) { WakfuGameEntity.getInstance().removeFrame(UICharacterCreationFrame.getInstance()); this.m_characterId = -1L; this.m_characterName = null; this.m_creationType = CreationType.DEFAULT; this.m_model = null; } }
@Override public boolean onMessage(final Message message) { switch (message.getId()) { case 2050: { final boolean success = NetCharacterChoiceFrame.onCharacterSelectionResult( (CharacterSelectionResultMessage) message, this); if (!success) { WakfuProgressMonitorManager.getInstance().done(); WakfuGameEntity.getInstance().removeFrame(this); NetCharacterChoiceFrame.getInstance().enableLoadUI(true); WakfuGameEntity.getInstance().pushFrame(NetCharacterChoiceFrame.getInstance()); } return false; } case 2054: { final CharacterCreationResultMessage msg = (CharacterCreationResultMessage) message; NetCharacterCreationFrame.m_logger.info( (Object) ("R\u00e9sultat de la cr\u00e9ation de perso : succes=" + msg.isCreationSuccessful() + ", code=" + msg.getCreationCode())); if (msg.isCreationSuccessful()) { WakfuProgressMonitorManager.getInstance() .getProgressMonitor(true) .beginTask(WakfuTranslator.getInstance().getString("loadingWorld.progress"), 0); } else { WakfuProgressMonitorManager.getInstance().done(); displayNameError(msg.getCreationCode()); CharacterCreationDialogActions.setCreateCharacterFlag(false); } return false; } default: { return true; } } }
@Override public void onFrameAdd(final FrameHandler frameHandler, final boolean isAboutToBeAdded) { if (!isAboutToBeAdded) { UICharacterCreationFrame.getInstance().setCharacterId(this.m_characterId); UICharacterCreationFrame.getInstance().setCharacterName(this.m_characterName); UICharacterCreationFrame.getInstance().setCreationType(this.m_creationType); UICharacterCreationFrame.getInstance().setRecustomType(this.m_recustomType); UICharacterCreationFrame.getInstance().setSource(this.m_source); UICharacterCreationFrame.getInstance().setModel(this.m_model); WakfuGameEntity.getInstance().pushFrame(UICharacterCreationFrame.getInstance()); } }