Examples of changeCount()


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

          ItemTable.getInstance().destroyItem(process, sourceitem, actor, reference);
        }

        if(targetitem != null) // If possible, only update counts
        {
          targetitem.changeCount(process, count, actor, reference);
        }
        else
        // Otherwise add new item
        {
          targetitem = target.addItem(process, sourceitem.getItemId(), count, actor, reference);
View Full Code Here

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

    // Adjust item quantity
    if (item.getCount() > count)
    {
      synchronized (item)
      {
        item.changeCount(process, -count, actor, reference);
        item.setLastChange(L2ItemInstance.MODIFIED);
       
        item.updateDatabase();
        refreshWeight();
      }
View Full Code Here

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

    synchronized (item)
    {
      // Adjust item quantity
      if (item.getCount() > count)
      {
        item.changeCount(process, -count, actor, reference);
        item.setLastChange(L2ItemInstance.MODIFIED);
      }
      // Directly drop entire item
      else
        return destroyItem(process, item, actor, reference);
View Full Code Here

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

    // If stackable item is found in inventory just add to current quantity
    if(olditem != null && olditem.isStackable())
    {
      int count = item.getCount();
      olditem.changeCount(process, count, actor, reference);
      olditem.setLastChange(L2ItemInstance.MODIFIED);

      // And destroys the item
      ItemTable.getInstance().destroyItem(process, item, actor, reference);
      item.updateDatabase();
View Full Code Here

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

    L2ItemInstance item = getItemByItemId(itemId);
   
    // If stackable item is found in inventory just add to current quantity
    if(item != null && item.isStackable())
    {
      item.changeCount(process, count, actor, reference);
      item.setLastChange(L2ItemInstance.MODIFIED);

      // Updates database
      if(itemId == 57 && count < 10000 * Config.RATE_DROP_ADENA)
      {
 
View Full Code Here

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

      return null;

    // Adjust item quantity and create new instance to drop
    if(item.getCount() > count)
    {
      item.changeCount(process, -count, actor, reference);
      item.setLastChange(L2ItemInstance.MODIFIED);
      item.updateDatabase();

      item = ItemTable.getInstance().createItem(process, item.getItemId(), count, actor, reference);
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.