/**
   * Broadcasts a packet to the team opposing the given player.
   *
   * @param player
   * @param packet
   */
  public void broadcastToOppositTeam(L2PcInstance player, L2GameServerPacket packet) {
    if ((player == null) || !player.isInDuel()) {
      return;
    }
    final Duel duel = getDuel(player.getDuelId());
    if (duel == null) {
      return;
    }
    if ((duel.getPlayerA() == null) || (duel.getPlayerB() == null)) {
      return;
    }

    if (duel.getPlayerA() == player) {
      duel.broadcastToTeam2(packet);
    } else if (duel.getPlayerB() == player) {
      duel.broadcastToTeam1(packet);
    } else if (duel.isPartyDuel()) {
      if ((duel.getPlayerA().getParty() != null)
          && duel.getPlayerA().getParty().getMembers().contains(player)) {
        duel.broadcastToTeam2(packet);
      } else if ((duel.getPlayerB().getParty() != null)
          && duel.getPlayerB().getParty().getMembers().contains(player)) {
        duel.broadcastToTeam1(packet);
      }
    }
  }
 public void doSurrender(L2PcInstance player) {
   if ((player == null) || !player.isInDuel()) {
     return;
   }
   final Duel duel = getDuel(player.getDuelId());
   duel.doSurrender(player);
 }
Ejemplo n.º 3
0
  @Override
  public boolean useBypass(String command, L2PcInstance player, L2Character bypassOrigin) {
    final QuestState qs = getQuestState(player, false);
    if ((qs != null)
        || (player.getLevel() < MIN_LEVEL)
        || (player.getLevel() > MAX_LEVEL)
        || (player.getRace() == Race.ERTHEIA)
        || !command.equals("Q10390_Teleport")) {
      return false;
    }

    if (player.isInParty()) {
      player.sendPacket(
          new ExShowScreenMessage("You cannot teleport when you are in party.", 5000));
    } else if (player.isInCombat()) {
      player.sendPacket(
          new ExShowScreenMessage("You cannot teleport when you are in combat.", 5000));
    } else if (player.isInDuel()) {
      player.sendPacket(
          new ExShowScreenMessage("You cannot teleport when you are in a duel.", 5000));
    } else if (player.isInOlympiadMode()) {
      player.sendPacket(
          new ExShowScreenMessage("You cannot teleport when you are in Olympiad.", 5000));
    } else if (player.isInVehicle()) {
      player.sendPacket(
          new ExShowScreenMessage(
              "You cannot teleport when you are in any vehicle or mount.", 5000));
    } else {
      player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
      player.teleToLocation(TP_LOCS[player.getRace().ordinal()]);
    }
    return true;
  }
 /**
  * Removes player from duel.
  *
  * @param player - the removed player
  */
 public void onRemoveFromParty(L2PcInstance player) {
   if ((player == null) || !player.isInDuel()) {
     return;
   }
   final Duel duel = getDuel(player.getDuelId());
   if (duel != null) {
     duel.onRemoveFromParty(player);
   }
 }
 /**
  * Registers a buff which will be removed if the duel ends
  *
  * @param player
  * @param buff
  */
 public void onBuff(L2PcInstance player, Skill buff) {
   if ((player == null) || !player.isInDuel() || (buff == null)) {
     return;
   }
   final Duel duel = getDuel(player.getDuelId());
   if (duel != null) {
     duel.onBuff(player, buff);
   }
 }
 /**
  * Updates player states.
  *
  * @param player - the dying player
  */
 public void onPlayerDefeat(L2PcInstance player) {
   if ((player == null) || !player.isInDuel()) {
     return;
   }
   final Duel duel = getDuel(player.getDuelId());
   if (duel != null) {
     duel.onPlayerDefeat(player);
   }
 }
Ejemplo n.º 7
0
  @Override
  public L2Object[] getTargetList(
      Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target) {
    List<L2Character> targetList = new ArrayList<>();
    if (onlyFirst) {
      return new L2Character[] {activeChar};
    }

    final L2PcInstance player = activeChar.getActingPlayer();

    if (player == null) {
      return EMPTY_TARGET_LIST;
    }

    targetList.add(player);

    final int radius = skill.getAffectRange();
    final boolean hasClan = player.getClan() != null;
    final boolean hasParty = player.isInParty();

    if (Skill.addPet(activeChar, player, radius, false)) {
      targetList.add(player.getPet());
    }

    player
        .getServitors()
        .values()
        .forEach(
            s -> {
              if (Skill.addCharacter(activeChar, s, radius, false)) {
                targetList.add(s);
              }
            });

    // if player in clan and not in party
    if (!(hasClan || hasParty)) {
      return targetList.toArray(new L2Character[targetList.size()]);
    }

    // Get all visible objects in a spherical area near the L2Character
    final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
    int maxTargets = skill.getAffectLimit();
    for (L2PcInstance obj : objs) {
      if (obj == null) {
        continue;
      }

      // olympiad mode - adding only own side
      if (player.isInOlympiadMode()) {
        if (!obj.isInOlympiadMode()) {
          continue;
        }
        if (player.getOlympiadGameId() != obj.getOlympiadGameId()) {
          continue;
        }
        if (player.getOlympiadSide() != obj.getOlympiadSide()) {
          continue;
        }
      }

      if (player.isInDuel()) {
        if (player.getDuelId() != obj.getDuelId()) {
          continue;
        }

        if (hasParty
            && obj.isInParty()
            && (player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())) {
          continue;
        }
      }

      if (!((hasClan && (obj.getClanId() == player.getClanId()))
          || (hasParty
              && obj.isInParty()
              && (player.getParty().getLeaderObjectId() == obj.getParty().getLeaderObjectId())))) {
        continue;
      }

      // Don't add this target if this is a Pc->Pc pvp
      // casting and pvp condition not met
      if (!player.checkPvpSkill(obj, skill)) {
        continue;
      }

      if (!TvTEvent.checkForTvTSkill(player, obj, skill)) {
        continue;
      }

      if (Skill.addPet(activeChar, obj, radius, false)) {
        targetList.add(obj.getPet());
      }

      obj.getServitors()
          .values()
          .forEach(
              s -> {
                if (Skill.addCharacter(activeChar, s, radius, false)) {
                  targetList.add(s);
                }
              });

      if (!Skill.addCharacter(activeChar, obj, radius, false)) {
        continue;
      }

      if ((maxTargets > 0) && (targetList.size() >= maxTargets)) {
        break;
      }

      targetList.add(obj);
    }
    return targetList.toArray(new L2Character[targetList.size()]);
  }
Ejemplo n.º 8
0
  /**
   * Perform a couple social action.
   *
   * @param id the couple social action Id
   */
  private void useCoupleSocial(final int id) {
    final L2PcInstance requester = getActiveChar();
    if (requester == null) {
      return;
    }

    final L2Object target = requester.getTarget();
    if ((target == null) || !target.isPlayer()) {
      sendPacket(SystemMessageId.INVALID_TARGET);
      return;
    }

    final int distance = (int) requester.calculateDistance(target, false, false);
    if ((distance > 125) || (distance < 15) || (requester.getObjectId() == target.getObjectId())) {
      sendPacket(
          SystemMessageId
              .THE_REQUEST_CANNOT_BE_COMPLETED_BECAUSE_THE_TARGET_DOES_NOT_MEET_LOCATION_REQUIREMENTS);
      return;
    }

    SystemMessage sm;
    if (requester.isInStoreMode() || requester.isInCraftMode()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_IN_PRIVATE_STORE_MODE_OR_IN_A_BATTLE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isInCombat()
        || requester.isInDuel()
        || AttackStanceTaskManager.getInstance().hasAttackStanceTask(requester)) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_BATTLE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isFishing()) {
      sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
      return;
    }

    if (requester.getReputation() < 0) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_CHAOTIC_STATE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isInOlympiadMode()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isInSiege()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_CASTLE_SIEGE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isInHideoutSiege()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_PARTICIPATING_IN_A_CLAN_HALL_SIEGE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
    }

    if (requester.isMounted()
        || requester.isFlyingMounted()
        || requester.isInBoat()
        || requester.isInAirShip()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_RIDING_A_SHIP_STEED_OR_STRIDER_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isTransformed()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_CURRENTLY_TRANSFORMING_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    if (requester.isAlikeDead()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_CURRENTLY_DEAD_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(requester);
      sendPacket(sm);
      return;
    }

    // Checks for partner.
    final L2PcInstance partner = target.getActingPlayer();
    if (partner.isInStoreMode() || partner.isInCraftMode()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_IN_PRIVATE_STORE_MODE_OR_IN_A_BATTLE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isInCombat()
        || partner.isInDuel()
        || AttackStanceTaskManager.getInstance().hasAttackStanceTask(partner)) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_BATTLE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.getMultiSociaAction() > 0) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_ALREADY_PARTICIPATING_IN_A_COUPLE_ACTION_AND_CANNOT_BE_REQUESTED_FOR_ANOTHER_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isFishing()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_FISHING_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.getReputation() < 0) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_CHAOTIC_STATE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isInOlympiadMode()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_PARTICIPATING_IN_THE_OLYMPIAD_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isInHideoutSiege()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_PARTICIPATING_IN_A_CLAN_HALL_SIEGE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isInSiege()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_IN_A_CASTLE_SIEGE_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isMounted()
        || partner.isFlyingMounted()
        || partner.isInBoat()
        || partner.isInAirShip()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_RIDING_A_SHIP_STEED_OR_STRIDER_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isTeleporting()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_CURRENTLY_TELEPORTING_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isTransformed()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId
                  .C1_IS_CURRENTLY_TRANSFORMING_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (partner.isAlikeDead()) {
      sm =
          SystemMessage.getSystemMessage(
              SystemMessageId.C1_IS_CURRENTLY_DEAD_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION);
      sm.addPcName(partner);
      sendPacket(sm);
      return;
    }

    if (requester.isAllSkillsDisabled() || partner.isAllSkillsDisabled()) {
      sendPacket(SystemMessageId.THE_COUPLE_ACTION_WAS_CANCELLED);
      return;
    }

    requester.setMultiSocialAction(id, partner.getObjectId());
    sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_REQUESTED_A_COUPLE_ACTION_WITH_C1);
    sm.addPcName(partner);
    sendPacket(sm);

    if ((requester.getAI().getIntention() != CtrlIntention.AI_INTENTION_IDLE)
        || (partner.getAI().getIntention() != CtrlIntention.AI_INTENTION_IDLE)) {
      final NextAction nextAction =
          new NextAction(
              CtrlEvent.EVT_ARRIVED,
              CtrlIntention.AI_INTENTION_MOVE_TO,
              () -> partner.sendPacket(new ExAskCoupleAction(requester.getObjectId(), id)));
      requester.getAI().setNextAction(nextAction);
      return;
    }

    if (requester.isCastingNow() || requester.isCastingSimultaneouslyNow()) {
      final NextAction nextAction =
          new NextAction(
              CtrlEvent.EVT_FINISH_CASTING,
              CtrlIntention.AI_INTENTION_CAST,
              () -> partner.sendPacket(new ExAskCoupleAction(requester.getObjectId(), id)));
      requester.getAI().setNextAction(nextAction);
      return;
    }

    partner.sendPacket(new ExAskCoupleAction(requester.getObjectId(), id));
  }
Ejemplo n.º 9
0
  @Override
  protected void runImpl() {
    L2PcInstance player = getClient().getActiveChar();
    if (player == null) {
      return;
    }

    if (_items == null) {
      player.setPrivateStoreType(PrivateStoreType.NONE);
      player.broadcastUserInfo();
      return;
    }

    if (!player.getAccessLevel().allowTransaction()) {
      player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
      return;
    }

    if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player) || player.isInDuel()) {
      player.sendPacket(
          SystemMessageId
              .WHILE_YOU_ARE_ENGAGED_IN_COMBAT_YOU_CANNOT_OPERATE_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP);
      player.sendPacket(new PrivateStoreManageListBuy(player));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    if (player.isInsideZone(ZoneId.NO_STORE)) {
      player.sendPacket(new PrivateStoreManageListBuy(player));
      player.sendPacket(SystemMessageId.YOU_CANNOT_OPEN_A_PRIVATE_STORE_HERE);
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    if (!player.canOpenPrivateStore()) {
      player.sendPacket(new PrivateStoreManageListBuy(player));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    TradeList tradeList = player.getBuyList();
    tradeList.clear();

    // Check maximum number of allowed slots for pvt shops
    if (_items.length > player.getPrivateBuyStoreLimit()) {
      player.sendPacket(new PrivateStoreManageListBuy(player));
      player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
      return;
    }

    long totalCost = 0;
    for (Item i : _items) {
      if (!i.addToTradeList(tradeList)) {
        Util.handleIllegalPlayerAction(
            player,
            "Warning!! Character "
                + player.getName()
                + " of account "
                + player.getAccountName()
                + " tried to set price more than "
                + MAX_ADENA
                + " adena in Private Store - Buy.",
            Config.DEFAULT_PUNISH);
        return;
      }

      totalCost += i.getCost();
      if (totalCost > MAX_ADENA) {
        Util.handleIllegalPlayerAction(
            player,
            "Warning!! Character "
                + player.getName()
                + " of account "
                + player.getAccountName()
                + " tried to set total price more than "
                + MAX_ADENA
                + " adena in Private Store - Buy.",
            Config.DEFAULT_PUNISH);
        return;
      }
    }

    // Check for available funds
    if (totalCost > player.getAdena()) {
      player.sendPacket(new PrivateStoreManageListBuy(player));
      player.sendPacket(
          SystemMessageId
              .THE_PURCHASE_PRICE_IS_HIGHER_THAN_THE_AMOUNT_OF_MONEY_THAT_YOU_HAVE_AND_SO_YOU_CANNOT_OPEN_A_PERSONAL_STORE);
      return;
    }

    player.sitDown();
    player.setPrivateStoreType(PrivateStoreType.BUY);
    player.broadcastUserInfo();
    player.broadcastPacket(new PrivateStoreMsgBuy(player));
  }
Ejemplo n.º 10
0
  /** Starts the duel */
  public void startDuel() {
    if ((_playerA == null) || (_playerB == null) || _playerA.isInDuel() || _playerB.isInDuel()) {
      _playerConditions.clear();
      DuelManager.getInstance().removeDuel(this);
      return;
    }

    if (_partyDuel) {
      // Set duel state and team
      for (L2PcInstance temp : _playerA.getParty().getMembers()) {
        temp.cancelActiveTrade();
        temp.setIsInDuel(_duelId);
        temp.setTeam(Team.BLUE);
        temp.broadcastUserInfo();
        broadcastToTeam2(new ExDuelUpdateUserInfo(temp));
      }
      for (L2PcInstance temp : _playerB.getParty().getMembers()) {
        temp.cancelActiveTrade();
        temp.setIsInDuel(_duelId);
        temp.setTeam(Team.RED);
        temp.broadcastUserInfo();
        broadcastToTeam1(new ExDuelUpdateUserInfo(temp));
      }

      // Send duel packets
      broadcastToTeam1(ExDuelReady.PARTY_DUEL);
      broadcastToTeam2(ExDuelReady.PARTY_DUEL);
      broadcastToTeam1(ExDuelStart.PARTY_DUEL);
      broadcastToTeam2(ExDuelStart.PARTY_DUEL);

      // Open arena doors
      for (L2DoorInstance door :
          InstanceManager.getInstance().getInstance(getDueldInstanceId()).getDoors()) {
        if ((door != null) && !door.getOpen()) {
          door.openMe();
        }
      }
    } else {
      // Set duel state and team
      _playerA.setIsInDuel(_duelId);
      _playerA.setTeam(Team.BLUE);
      _playerB.setIsInDuel(_duelId);
      _playerB.setTeam(Team.RED);

      // Send duel Start packets
      // Send duel packets
      broadcastToTeam1(ExDuelReady.PLAYER_DUEL);
      broadcastToTeam2(ExDuelReady.PLAYER_DUEL);
      broadcastToTeam1(ExDuelStart.PLAYER_DUEL);
      broadcastToTeam2(ExDuelStart.PLAYER_DUEL);

      broadcastToTeam1(new ExDuelUpdateUserInfo(_playerB));
      broadcastToTeam2(new ExDuelUpdateUserInfo(_playerA));

      _playerA.broadcastUserInfo();
      _playerB.broadcastUserInfo();
    }

    // play sound
    broadcastToTeam1(B04_S01);
    broadcastToTeam2(B04_S01);

    // start dueling task
    ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleDuelTask(this), 1000);
  }
  @Override
  protected void runImpl() {
    L2PcInstance player = getClient().getActiveChar();
    if (player == null) return;

    if (_items == null) {
      player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE);
      player.broadcastUserInfo();
      return;
    }

    if (AttackStanceTaskManager.getInstance().getAttackStanceTask(player) || player.isInDuel()) {
      player.sendPacket(
          SystemMessage.getSystemMessage(SystemMessageId.CANT_OPERATE_PRIVATE_STORE_DURING_COMBAT));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    if (player.isInsideZone(L2Character.ZONE_NOSTORE)) {
      player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE));
      player.sendPacket(ActionFailed.STATIC_PACKET);
      return;
    }

    L2ManufactureList createList = new L2ManufactureList();

    List<L2RecipeList> dwarfRecipes = Arrays.asList(player.getDwarvenRecipeBook());
    List<L2RecipeList> commonRecipes = Arrays.asList(player.getCommonRecipeBook());

    for (Recipe i : _items) {
      L2RecipeList list = RecipeController.getInstance().getRecipeList(i.getRecipeId());

      if (!dwarfRecipes.contains(list) && !commonRecipes.contains(list)) {
        Util.handleIllegalPlayerAction(
            player,
            "Warning!! Player "
                + player.getName()
                + " of account "
                + player.getAccountName()
                + " tried to set recipe which he dont have.",
            Config.DEFAULT_PUNISH);
        return;
      }

      if (!i.addToList(createList)) {
        Util.handleIllegalPlayerAction(
            player,
            "Warning!! Character "
                + player.getName()
                + " of account "
                + player.getAccountName()
                + " tried to set price more than "
                + MAX_ADENA
                + " adena in Private Manufacture.",
            Config.DEFAULT_PUNISH);
        return;
      }
    }

    createList.setStoreName(
        player.getCreateList() != null ? player.getCreateList().getStoreName() : "");
    player.setCreateList(createList);

    player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_MANUFACTURE);
    player.sitDown();
    player.broadcastUserInfo();
    player.sendPacket(new RecipeShopMsg(player));
    player.broadcastPacket(new RecipeShopMsg(player));
  }