public InteractiveElementAction getInteractiveDefaultAction() { final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId()); if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) { return null; } return InteractiveElementAction.ACTIVATE; }
@Override public InteractiveElementAction[] getInteractiveUsableActions() { final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId()); if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) { return InteractiveElementAction.EMPTY_ACTIONS; } return new InteractiveElementAction[] {InteractiveElementAction.ACTIVATE}; }
@Override public boolean onAction( final InteractiveElementAction action, final InteractiveElementUser user) { if (action != InteractiveElementAction.ACTIVATE) { return false; } final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId()); if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) { return false; } SWFWrapper.INSTANCE.toggleDisplay(game); return true; }
@Override public AbstractMRUAction[] getInteractiveMRUActions() { if (!SystemConfiguration.INSTANCE.getBooleanValue( SystemConfigurationType.KROSMOZ_GAMES_ENABLE)) { return AbstractMRUAction.EMPTY_ARRAY; } final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId()); if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) { return AbstractMRUAction.EMPTY_ARRAY; } final MRUInteractifMachine activateAction = MRUActions.INTERACTIF_ACTION.getMRUAction(); if (!WakfuSWT.isInit()) { activateAction.setEnabled(false); activateAction.setErrorMsg( WakfuTranslator.getInstance().getString("krosmoz.gameBoard.systemRequirementsNotMet")); } return new AbstractMRUAction[] {activateAction}; }