Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.PetInventoryUpdate


      targetPlayer = null;
      playerSU = null;
    }
    else if(target instanceof PetInventory)
    {
      PetInventoryUpdate petIU = new PetInventoryUpdate();

      if(newItem.getCount() > count)
      {
        petIU.addModifiedItem(newItem);
      }
      else
      {
        petIU.addNewItem(newItem);
      }

      ((PetInventory) target).getOwner().getOwner().sendPacket(petIU);
      petIU = null;
    }
View Full Code Here


      return false;
    }

    // Send Pet inventory update packet
    PetInventoryUpdate petIU = new PetInventoryUpdate();
    petIU.addItem(item);
    getOwner().sendPacket(petIU);
    petIU = null;

    if(sendMessage)
    {
View Full Code Here

      }
      return false;
    }

    // Send Pet inventory update packet
    PetInventoryUpdate petIU = new PetInventoryUpdate();
    petIU.addItem(item);
    getOwner().sendPacket(petIU);
    item = null;
    petIU = null;

    if(sendMessage)
View Full Code Here

    if(newItem == null)
      return null;

    // Send inventory update packet
    PetInventoryUpdate petIU = new PetInventoryUpdate();
    if(oldItem.getCount() > 0 && oldItem != newItem)
    {
      petIU.addModifiedItem(oldItem);
    }
    else
    {
      petIU.addRemovedItem(oldItem);
    }

    getOwner().sendPacket(petIU);

    oldItem = null;
    petIU = null;

    // Send target update packet
    if(target instanceof PcInventory)
    {
      L2PcInstance targetPlayer = ((PcInventory) target).getOwner();
      InventoryUpdate playerUI = new InventoryUpdate();
      if(newItem.getCount() > count)
      {
        playerUI.addModifiedItem(newItem);
      }
      else
      {
        playerUI.addNewItem(newItem);
      }
      targetPlayer.sendPacket(playerUI);
      playerUI = null;

      // Update current load as well
      StatusUpdate playerSU = new StatusUpdate(targetPlayer.getObjectId());
      playerSU.addAttribute(StatusUpdate.CUR_LOAD, targetPlayer.getCurrentLoad());
      targetPlayer.sendPacket(playerSU);
      playerSU = null;
      targetPlayer = null;
    }
    else if(target instanceof PetInventory)
    {
      petIU = new PetInventoryUpdate();
      if(newItem.getCount() > count)
      {
        petIU.addRemovedItem(newItem);
      }
      else
      {
        petIU.addNewItem(newItem);
      }
      ((PetInventory) target).getOwner().getOwner().sendPacket(petIU);
      petIU = null;
    }
    return newItem;
View Full Code Here

  public void giveItemToOwner(L2ItemInstance item)
  {
    try
    {
      getInventory().transferItem("PetTransfer", item.getObjectId(), item.getCount(), getOwner().getInventory(), getOwner(), this);
      PetInventoryUpdate petiu = new PetInventoryUpdate();
      ItemList PlayerUI = new ItemList(getOwner(), false);
      petiu.addRemovedItem(item);
      getOwner().sendPacket(petiu);
      getOwner().sendPacket(PlayerUI);

      petiu = null;
      PlayerUI = null;
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.serverpackets.PetInventoryUpdate

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.