Skip to content

DummyItem usage question.

Featured Replies

Hello,
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?
Thanks

Method exists on aCis, but uses have been dropped. People never complained about.

  • Author

So I guess I can remove it from my pack as well without problems appearing later on.
Thank you for replying mate!
 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.