Incorrect packet

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Incorrect packet

Post by Gnacik »

Probably i should post that in Bug Report section but i choose Discussion
because we can discuss that problem ;)

Some players notice about error with 'duplicated items'. When you for example buy seeds or crystalize something and have opened inventory you see new item twice. And you must close & open inventory again to see only one, correct item. Its only visual effect, not a serious bug.

I make a little reasearch and found a reason - PCInventory.java : addItem()

additem is sending InventoryUpdate() packet or ItemList() packet

Problem is with InventoryUpdate() and that is a main reason of duplicated items. For example : if you crystalize something one InventoryUpdate() is send from clientpackets/RequestCrystalize with +crystal -item and second packet is send from Additem() with only +item

I make a little sniff on offi and after crystalize only one InventoryUpdate() is send with +crystal -item

Similar problem is with quest items, buy seeds and probably in many places where addItem is used.

I suggest remove that packet from additem. its not necessary - i can say/proof that is incorrect there - correct packets should be send AFTER using additem(). And we can save some traffic ;)
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Incorrect packet

Post by _DS_ »

Create patch, install and test on live, tell about results :)
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Incorrect packet

Post by janiii »

gnat wrote: I suggest remove that packet from additem. its not necessary - i can say/proof that is incorrect there - correct packets should be send AFTER using additem(). And we can save some traffic ;)
why not leave it in addItem and remove from methods they call it?
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Gnacik
L2j Veteran
L2j Veteran
Posts: 925
Joined: Tue Dec 16, 2008 3:49 pm
Location: Wąchock ٩(̾●̮̮̃̾•̃̾)۶ Polska
Contact:

Re: Incorrect packet

Post by Gnacik »

Because in many situation packet InventoryUpdate is with more items. for example

crystalize - server must send packet with +crystals -item
buyseed - server must send one packet with x-buyed items - not x packets with 1 seed each.

and in many places we already send correct 1 packet with all information. AND duplicated packet from additem

if we leave packet in additem() in many places we will send x packets with 1 item each instead of 1 packet.

maybe its not a big deal, but on high populated servers every unnecessary packet can make a difference.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Incorrect packet

Post by janiii »

what i dont understand is, why this wasn't an issue on 2.2 because the packets were sent in the same way - in addItem and also after..
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Incorrect packet

Post by JIV »

because ct2.2 handle that packet different way so it showed up now, and also maybe NCZ0ft checking l2j and edit client to be incompatibile for reason xD
toastgodsupreme
Posts: 750
Joined: Sun Dec 07, 2008 7:01 pm
Location: Poland

Re: Incorrect packet

Post by toastgodsupreme »

janiii wrote:what i dont understand is, why this wasn't an issue on 2.2 because the packets were sent in the same way - in addItem and also after..
I think CT2.2 had the inventory glitch of seeing 2 sets of crystals when crystalizing. I never paid it much attention really. just toggled the inventory and continued on.
Post Reply