@Override
  protected void handleDialogStart(Player player) {
    int membership = player.getClientConnection().getAccount().getMembership();

    if (membership >= 2) {
      PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), 1011));
    } else {
      PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), 0));
      PacketSendUtility.sendBrightYellowMessageOnCenter(
          player, MuiService.getInstance().getMessage("T_PORTAL"));
    }
  }
예제 #2
0
 private void checkEntryConditions(Player player, int dialogId, int questId) {
   if (dialogId == 10000) {
     if (player.getInventory().decreaseByItemId(186000246, 1)) {
       switch (player.getRace()) {
         case ASMODIANS:
           SkillEngine.getInstance().applyEffectDirectly(21139, player, player, 160000 * 3);
           break;
         case ELYOS:
           SkillEngine.getInstance().applyEffectDirectly(21138, player, player, 160000 * 3);
           break;
       }
       PacketSendUtility.sendBrightYellowMessageOnCenter(
           player, MuiService.getInstance().getMessage("DEFENCE_BASTION"));
       stopMove(player);
       AI2Actions.deleteOwner(this);
     } else {
       PacketSendUtility.sendBrightYellowMessageOnCenter(
           player, MuiService.getInstance().getMessage("DEFENCE_BASTION_NO"));
       PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), 0, 0));
     }
   } else {
     PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(getObjectId(), dialogId, questId));
   }
 }