コード例 #1
0
 @Override
 public String getAdditionalRequirementDescription() {
   return WakfuTranslator.getInstance()
       .getString(
           "item.action.resetAchievement",
           WakfuTranslator.getInstance().getString(62, this.m_achievementId, new Object[0]));
 }
コード例 #2
0
 public static void displayNameError(final byte errorCode) {
   String errorString = null;
   switch (errorCode) {
     case 10:
       {
         errorString = "error.characterCreation.existingName";
         break;
       }
     case 11:
       {
         errorString = "error.characterCreation.invalidName";
         break;
       }
     case 12:
       {
         errorString = "error.characterCreation.tooManyCharacters";
         break;
       }
     default:
       {
         errorString = "error.characterCreation";
         break;
       }
   }
   Xulor.getInstance()
       .msgBox(
           WakfuTranslator.getInstance().getString(errorString),
           WakfuMessageBoxConstants.getMessageBoxIconUrl(1),
           1027L,
           8,
           1);
 }
コード例 #3
0
 @Override
 public boolean run(final Message message) {
   final MessageBoxControler controler =
       Xulor.getInstance()
           .msgBox(WakfuTranslator.getInstance().getString("guild.leave.validate"), 6L, 102, 3);
   controler.addEventListener(
       new MessageBoxEventListener() {
         @Override
         public void messageBoxClosed(final int type, final String userEntry) {
           if (type != 2) {
             return;
           }
           final LocalPlayerCharacter localPlayer = WakfuGameEntity.getInstance().getLocalPlayer();
           WakfuGuildView.getInstance().requestRemoveById(localPlayer.getId());
           WakfuGameEntity.getInstance().removeFrame(UIGuildManagementFrame.getInstance());
         }
       });
   return false;
 }
コード例 #4
0
 @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;
       }
   }
 }