Jump to content

Question

Posted

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

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..