コード例 #1
0
 public InteractiveElementAction getInteractiveDefaultAction() {
   final KrosmozGame game = KrosmozGame.byId(this.m_boardParameters.getGameId());
   if (WakfuGameCalendar.getInstance().getDate().before(game.getUnlockDate())) {
     return null;
   }
   return InteractiveElementAction.ACTIVATE;
 }
コード例 #2
0
 @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};
 }
コード例 #3
0
 @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;
 }
コード例 #4
0
 @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};
 }