Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Player.sendActionFailed()


    }
   
    // Staff of Master Yogi можно точить до 23
    if(itemToEnchant.getItemId() != 13539 && itemToEnchant.getEnchantLevel() >= RequestEnchantItem.getMaxEnchant(itemToEnchant) || itemToEnchant.getItemId() == 13539 && itemToEnchant.getEnchantLevel() >= 23)
    {
      activeChar.sendActionFailed();
      activeChar.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.RequestEnchantItem.MaxLevel", activeChar));
      return;
    }
    // Запрет на заточку чужих вещей, баг может вылезти на серверных лагах
    if(itemToEnchant.getOwnerId() != activeChar.getObjectId())
View Full Code Here


    if (!FloodProtector.tryPerformAction(activeChar, Action.USE_ITEM))
      return;
   
    if(activeChar.isOutOfControl())
    {
      activeChar.sendActionFailed();
      return;
    }
    if(activeChar.getPrivateStoreType() != L2Player.STORE_PRIVATE_NONE)
    {
      activeChar.sendPacket(Msg.YOU_MAY_NOT_USE_ITEMS_IN_A_PRIVATE_STORE_OR_PRIVATE_WORK_SHOP, Msg.ActionFail);
View Full Code Here

    synchronized(activeChar.getInventory())
    {
      L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
      if(item == null)
      {
        activeChar.sendActionFailed();
        return;
      }
      int itemId = item.getItemId();
      if(itemId == 57)
      {
View Full Code Here

        return;
      }
      int itemId = item.getItemId();
      if(itemId == 57)
      {
        activeChar.sendActionFailed();
        return;
      }
      if(activeChar.isFishing() && (itemId < 6535 || itemId > 6540))
      {
        // You cannot do anything else while fishing
View Full Code Here

          activeChar.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(itemId));
          return;
        }
        if((item.getCustomFlags() & L2ItemInstance.FLAG_NO_UNEQUIP) == L2ItemInstance.FLAG_NO_UNEQUIP)
        {
          activeChar.sendActionFailed();
          return;
        }
        // Don't allow weapon/shield hero equipment during Olympiads
        if(activeChar.isInOlympiadMode() && item.isHeroWeapon())
        {
View Full Code Here

          return;
        }
        // Don't allow weapon/shield hero equipment during Olympiads
        if(activeChar.isInOlympiadMode() && item.isHeroWeapon())
        {
          activeChar.sendActionFailed();
          return;
        }
        if(item.isEquipped())
        {
          activeChar.getInventory().unEquipItemInBodySlotAndNotify(item.getBodyPart(), item);
View Full Code Here

      activeChar.sendPacket(Msg.YOU_CANNOT_BOARD_A_SHIP_WHILE_YOU_ARE_POLYMORPHED, Msg.ActionFail);
      return;
    }
    if(activeChar.isMovementDisabled() || activeChar.isSitting())
    {
      activeChar.sendActionFailed();
      return;
    }
    L2Ship boat = (L2Ship) L2VehicleManager.getInstance().getBoat(_boatId);
    if(boat == null)
    {
View Full Code Here

      return;
    }
    L2Ship boat = (L2Ship) L2VehicleManager.getInstance().getBoat(_boatId);
    if(boat == null)
    {
      activeChar.sendActionFailed();
      return;
    }
    activeChar.setInVehiclePosition(_pos);
    activeChar.broadcastPacket(new MoveToLocationInVehicle(activeChar, boat, _originPos, _pos));
  }
View Full Code Here

      return;
    }
    L2Ship boat = (L2Ship) L2VehicleManager.getInstance().getBoat(_id);
    if(boat == null || boat.isMoving) // Не даем слезть с лодки на ходу
    {
      activeChar.sendActionFailed();
      return;
    }
    activeChar.setLastClientPosition(null);
    activeChar.setLastServerPosition(null);
    activeChar.setVehicle(null);
View Full Code Here

        }
        L2ItemInstance destroyedItem = player.getInventory().destroyItem(staff.getObjectId(), 1, true);
        if(destroyedItem == null)
        {
          System.out.println("ERROR: Failed to destroy " + staff.getObjectId() + " after reciving reward in event MasterOfEnchanting by " + player.getName());
          player.sendActionFailed();
        }
        htmltext = "32599-rewardok.htm";
      }
      else
      {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.