Examples of dropMe()

  • l2p.gameserver.model.items.L2ItemInstance.dropMe()
  • lineage2.gameserver.model.items.ItemInstance.dropMe()
    Method dropMe. @param dropper Creature @param loc Location
  • net.sf.l2j.gameserver.model.L2ItemInstance.dropMe()
    Init a dropped L2ItemInstance and add it in the world as a visible object.

    Actions :

  • Set the x,y,z position of the L2ItemInstance dropped and update its _worldregion
  • Add the L2ItemInstance dropped to _visibleObjects of its L2WorldRegion
  • Add the L2ItemInstance dropped in the world as a visible object


  • Caution : This method DOESN'T ADD the object to _allObjects of L2World

    Assert :

  • _worldRegion == null (L2Object is invisible at the beginning)


  • Example of use :

  • Drop item
  • Call Pet

  • @param dropper @param x @param y @param z

    Examples of com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance.dropMe()

                {
                  itemId = ITEM_IDS[i];
                  // create the ticket in the gameworld
                  L2ItemInstance dropticket = new L2ItemInstance(IdFactory.getInstance().getNextId(), itemId);
                  dropticket.setLocation(L2ItemInstance.ItemLocation.VOID);
                  dropticket.dropMe(null, x, y, z);
                  dropticket.setDropTime(0); //avoids it from beeing removed by the auto item destroyer
                  L2World.getInstance().storeObject(dropticket);
                  getDroppedTickets().add(dropticket);
                  dropticket = null;
                }
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance.dropMe()

            castle.getSiege().getSiegeGuardManager().hireMerc(x, y, z, heading, NPC_IDS[i]);

            // create the ticket in the gameworld
            L2ItemInstance dropticket = new L2ItemInstance(IdFactory.getInstance().getNextId(), itemId);
            dropticket.setLocation(L2ItemInstance.ItemLocation.INVENTORY);
            dropticket.dropMe(null, x, y, z);
            dropticket.setDropTime(0); //avoids it from beeing removed by the auto item destroyer
            L2World.getInstance().storeObject(dropticket); //add to the world
            // and keep track of this ticket in the list
            _droppedTickets.add(dropticket);
    View Full Code Here

    Examples of com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance.dropMe()

          int newZ = Math.max(getZ(), mainDamageDealer.getZ()) + 20; // TODO: temp hack, do somethign nicer when we have geodatas

          // Init the dropped L2ItemInstance and add it in the world as a visible object at the position where mob was last
          ditem = ItemTable.getInstance().createItem("Loot", item.getItemId(), item.getCount(), mainDamageDealer, this);
          ditem.getDropProtection().protect(mainDamageDealer);
          ditem.dropMe(this, newX, newY, newZ);

          // Add drop to auto destroy item task
          if(!Config.LIST_PROTECTED_ITEMS.contains(item.getItemId()))
          {
            if(Config.AUTODESTROY_ITEM_AFTER > 0 && ditem.getItemType() != L2EtcItemType.HERB || Config.HERB_AUTO_DESTROY_TIME > 0 && ditem.getItemType() == L2EtcItemType.HERB)
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

      private void dropItem(L2Character npc, int itemId, int count)
      {
        L2ItemInstance item = ItemTable.getInstance().createItem(itemId);
        item.setCount(count);
        item.dropMe(npc, npc.getLoc());
      }
    }
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

            {
              owner.getInventory().addItem(item);
            }
            else
            {
              item.dropMe(this, getLoc().changeZ(25));
            }
          }
          _inventory.getItemsList().clear();
        }
      }
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

            }
            //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\" />");
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

          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

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

      private void dropItem(L2NpcInstance npc, int itemId, int count)
      {
        L2ItemInstance item = ItemTable.getInstance().createItem(itemId);
        item.setCount(count);
        item.dropMe(npc, npc.getLoc());
      }
    }
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

        if(item_count > 1)
        {
          item.setCount(item_count);
        }
        debugItems.add(item);
        item.dropMe(null, loc);
      }

      protected static void debugPath(L2Player player, PathFindBuffer pf_buff, ArrayList<Location> _path)
      {
        if(!player.isGM())
    View Full Code Here

    Examples of l2p.gameserver.model.items.L2ItemInstance.dropMe()

            itemId = getItemId(npcId);
            if(itemId > 0)
            {
              L2ItemInstance dropticket = ItemTable.getInstance().createItem(itemId);
              dropticket.setLocation(L2ItemInstance.ItemLocation.INVENTORY);
              dropticket.dropMe(null, loc);
              dropticket.setDropTime(0); // avoids it from beeing removed by the auto item destroyer
              getDroppedTickets().add(dropticket);
            }
          }
          _log.info("MercTicketManager: Loaded " + getDroppedTickets().size() + " Mercenary Tickets");
    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.