TradeList issue

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
fratzi01
Posts: 5
Joined: Sun Jul 12, 2009 3:41 pm

TradeList issue

Post by fratzi01 »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 3310
L2JDP Revision Number: 6430


Hi,

I have a problem with TradeList.java in my server. Using Core revision 3310, i know its not the latest, but there wasnt a change to TradeList.java commited after this. Client is updated to retail one yesterday, but doesnt matter happend with protocol version 83 too.

Here comes the poblem.

First what i do:

- Set up a shop to buy 2 items. In this case I ll let another player buy 2 bows.
- So i set the shop, put the bow inside, set price and amount 2.
- 2 items appear in the shop (debugging showed, they have the same item object id, ofc because buyer has only 1 of this item put in the shop)
- 2nd player comes to sell, he sells him 2 of the bows.
- doesnt work, the seller will not get any adena and the buyer gets a bow for free. nice.
- if he sells just 1 its ok. sure it will.

What i found out while debugging is:

in TradeList::privateStoreSell(...) we loop through the items. Everything goes well for the first item, when it comes to the second this player.checkItemManipulation(...) of the second loop fails, and returns a null pointer, the reason is the item cannot be found in the inventory anymore.

So hey, if you can point me into the right direction if its really a core bug or if i am doing anything wrong. Maybe theres a change i missed.

Any help would be appreaciated. Thanks

--fratzi01
fratzi01
Posts: 5
Joined: Sun Jul 12, 2009 3:41 pm

Re: TradeList issue

Post by fratzi01 »

tested with nightlys of

Server Version= 3410
Datapack Version= 6507

same problem. Why is player.checkItemManipulation(...) called twice in TradeList::privateStoreSell(...) and why are there even 2 loops for looping through the same list?

Can anyone give comments?

Right now as a buyer you buy items for free if some1 sells you 2 of the same nostackables. So its an exploit.
Post Reply