Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()


        // Modified by Tempy - 28 Jul 05 \\
        // Check if this is a blessed scroll, if it is then shorten the cast time.
        int itemId = item.getItemId();
        int escapeSkill = (itemId == 1538 || itemId == 5858 || itemId == 5859 || itemId == 3958) ? 2036 : 2013;

        if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
            return;

        activeChar.disableAllSkills();

        L2Skill skill = SkillTable.getInstance().getInfo(escapeSkill, 1);
View Full Code Here


            activeChar.sendMessage("You cannot hire any more mercenaries of this type.  You may still hire other types of mercenaries");
            return;
        }

        int npcId = MercTicketManager.getInstance().addTicket(item.getItemId(), activeChar, MESSAGES);
        activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false); // Remove item from char's inventory
        activeChar.sendMessage("Hired mercenary ("+itemId+","+npcId+") at coords:" + activeChar.getX() + "," + activeChar.getY() + "," + activeChar.getZ() + " heading:" + activeChar.getHeading());
    }

    // left in here for backward compatibility
    @Override
View Full Code Here

                    {
                        if (item == null) continue;
                        if (_heroItems.contains(item.getItemId()))
                          continue;

                        player.destroyItem("Hero", item, null, true);
                        iu = new InventoryUpdate();
                        iu.addRemovedItem(item);
                        player.sendPacket(iu);
                    }
View Full Code Here

                  SystemMessageId.ITEM_MISSING_TO_LEARN_SKILL));
              return;
            }

            // ok
            player.destroyItem("Consume", spb, trainer, true);
          }
        }
      } else
      {
        SystemMessage sm = new SystemMessage(
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.