Jump to content
  • 0

DummyItem usage question.



I've got a simple question regarding the creation of items in the source code.
I noticed that each time a mob drops an item, a copy of it but with null value is appearing in the player's inventory (Disappearing after inventory refresh).
After a small research I found out that this method is to blame:

public L2ItemInstance createDummyItem(int itemId)
  L2Item item = getTemplate(itemId);
  if (item == null)
  return null;
  L2ItemInstance temp = new L2ItemInstance(0, item);
  return temp;


So my question is: What is this method's usability?  What If I remove it from the addItem method on L2PcInstance and correct the double item issue on players inventory ? Would would be the impact?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...