Package l2p.gameserver.model.items

Examples of l2p.gameserver.model.items.L2ItemInstance$LazyUpdateInDb


    {
      show("Этот пет только для воинов.", player);
      return;
    }
    L2Item item = ItemTable.getInstance().getTemplate(Config.SERVICES_EXCHANGE_BABY_PET_ITEM);
    L2ItemInstance pay = player.getInventory().getItemByItemId(item.getItemId());
    if(pay != null && pay.getCount() >= Config.SERVICES_EXCHANGE_BABY_PET_PRICE)
    {
      player.getInventory().destroyItem(pay, Config.SERVICES_EXCHANGE_BABY_PET_PRICE, true);
      L2ItemInstance control = player.getInventory().getItemByObjectId(player.getPet().getControlItemObjId());
      control.setItemId(L2Pet.IMPROVED_BABY_BUFFALO.getControlItemId());
      control.updateDatabase(true, true);
      player.sendPacket(new ItemList(player, false));
      player.getPet().unSummon();
      show("Пет изменен.", player);
    }
    else if(Config.SERVICES_EXCHANGE_BABY_PET_ITEM == 57)
View Full Code Here


    {
      show("Этот пет только для магов.", player);
      return;
    }
    L2Item item = ItemTable.getInstance().getTemplate(Config.SERVICES_EXCHANGE_BABY_PET_ITEM);
    L2ItemInstance pay = player.getInventory().getItemByItemId(item.getItemId());
    if(pay != null && pay.getCount() >= Config.SERVICES_EXCHANGE_BABY_PET_PRICE)
    {
      player.getInventory().destroyItem(pay, Config.SERVICES_EXCHANGE_BABY_PET_PRICE, true);
      L2ItemInstance control = player.getInventory().getItemByObjectId(player.getPet().getControlItemObjId());
      control.setItemId(L2Pet.IMPROVED_BABY_KOOKABURRA.getControlItemId());
      control.updateDatabase(true, true);
      player.sendPacket(new ItemList(player, false));
      player.getPet().unSummon();
      show("Пет изменен.", player);
    }
    else if(Config.SERVICES_EXCHANGE_BABY_PET_ITEM == 57)
View Full Code Here

    {
      player.sendMessage("У вас нет клана.");
      return;
    }
    L2Item item = ItemTable.getInstance().getTemplate(Config.SERVICES_EXPAND_CWH_ITEM);
    L2ItemInstance pay = player.getInventory().getItemByItemId(item.getItemId());
    if(pay != null && pay.getCount() >= Config.SERVICES_EXPAND_CWH_PRICE)
    {
      player.getInventory().destroyItem(pay, Config.SERVICES_EXPAND_CWH_PRICE, true);
      player.getClan().setWhBonus(player.getClan().getWhBonus() + 1);
      player.sendMessage("Warehouse capacity is now " + (Config.WAREHOUSE_SLOTS_CLAN + player.getClan().getWhBonus()));
    }
View Full Code Here

    {
      show("Сервис отключен.", player);
      return;
    }
    L2Item item = ItemTable.getInstance().getTemplate(Config.SERVICES_EXPAND_WAREHOUSE_ITEM);
    L2ItemInstance pay = player.getInventory().getItemByItemId(item.getItemId());
    if(pay != null && pay.getCount() >= Config.SERVICES_EXPAND_WAREHOUSE_PRICE)
    {
      player.getInventory().destroyItem(pay, Config.SERVICES_EXPAND_WAREHOUSE_PRICE, true);
      player.setExpandWarehouse(player.getExpandWarehouse() + 1);
      player.setVar("ExpandWarehouse", String.valueOf(player.getExpandWarehouse()));
      player.sendMessage("Warehouse capacity is now " + player.getWarehouseLimit());
View Full Code Here

        {
          L2Object target = activeChar.getTarget();
          if(target != null && target.isPlayer() && !((L2Player) target).isInOlympiadMode())
          {
            L2Player player = (L2Player) target;
            L2ItemInstance item = ItemTable.getInstance().createItem(cw.getItemId());
            cwm.activate(player, player.getInventory().addItem(item));
            cwm.showUsageTime(player, cw);
          }
        }
        break;
View Full Code Here

    if(pl_pet.getLevel() < 55)
    {
      show(Files.read("data/scripts/services/petevolve/no_level.htm", player), player, npc);
      return;
    }
    L2ItemInstance control = player.getInventory().getItemByObjectId(player.getPet().getControlItemObjId());
    control.setItemId(GREAT_WOLF_NECKLACE);
    control.updateDatabase(true, true);
    player.sendPacket(new ItemList(player, false));
    player.getPet().unSummon();
    show(Files.read("data/scripts/services/petevolve/yes_wolf.htm", player), player, npc);
  }
View Full Code Here

          loc_name = "loc_" + loc_id;
        }
        //System.out.println("  (" + loc_id + ",'" + loc_name + "'," + activeChar.getX() + "," + activeChar.getY() + "," + activeChar.getZ() + "," + (activeChar.getZ() + 100) + ",0),");
        System.out.println("<point xyzz=\"" + activeChar.getX() + " " + activeChar.getY() + " " + activeChar.getZ() + " " + (activeChar.getZ() + 100) + "\"/>");
        activeChar.sendMessage("Point saved.");
        L2ItemInstance temp = ItemTable.getInstance().createItem(1060);
        temp.dropMe(activeChar, activeChar.getLoc());
        break;
      }
      case admin_xloc:
      {
        System.out.println("      <coords loc=\"" + activeChar.getX() + " " + activeChar.getY() + " " + activeChar.getZ() + " 0\" />");
        activeChar.sendMessage("Point saved.");
        L2ItemInstance temp = ItemTable.getInstance().createItem(1060);
        temp.dropMe(activeChar, activeChar.getLoc());
        break;
      }
      case admin_pos:
        String pos = activeChar.getX() + ", " + activeChar.getY() + ", " + activeChar.getZ() + ", " + activeChar.getHeading() + " Geo [" + (activeChar.getX() - L2World.MAP_MIN_X >> 4) + ", " + (activeChar.getY() - L2World.MAP_MIN_Y >> 4) + "] Ref " + activeChar.getReflection().getId();
        System.out.println(activeChar.getName() + "'s position: " + pos);
View Full Code Here

    if(terr > 9 || terr < 1)
    {
      return;
    }
    int territoryBadgeId = 13756 + terr;
    L2ItemInstance pay = player.getInventory().getItemByItemId(territoryBadgeId);
    if(pay != null && pay.getCount() >= 100)
    {
      player.getInventory().destroyItem(pay, 100, true);
      makeSubQuests();
      becomeNoble();
    }
View Full Code Here

        case admin_summon:
          StringTokenizer st = new StringTokenizer(fullString, " ");
          st.nextToken();
          int id = Integer.parseInt(st.nextToken());
          int count = Integer.parseInt(st.nextToken());
          L2ItemInstance itemInstance = ItemTable.getInstance().createItem(id);
          itemInstance.setCount(count);
          activeChar.getInventory().addItem(itemInstance);
          Log.LogItem(activeChar, Log.Adm_AddItem, itemInstance);
          if(!itemInstance.isStackable())
          {
            for(long i = 0; i < count - 1; i++)
            {
              itemInstance = ItemTable.getInstance().createItem(id);
              activeChar.getInventory().addItem(itemInstance);
View Full Code Here

      return;
    }

    L2Player player = (L2Player) target;

    L2ItemInstance item = player.getInventory().getPaperdollItem(armorType);
    if(item != null)
    {
      item.setAttributeElement(element, value, true);
      player.getInventory().refreshListeners();
      player.sendPacket(new InventoryUpdate().addModifiedItem(item));
      player.sendChanges();
    }
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.items.L2ItemInstance$LazyUpdateInDb

Copyright © 2018 www.massapicom. 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.