Page 1 of 1

character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Thu Apr 24, 2008 7:01 am
by ncrsn
When using ClearGottenItem method a minor client bug occurs: while dragged item is physically cleared serverside, to the player it will look like item is still in the cursor. It vanishes after client drops the item somewhere. This happens at least in v5 clients - I didn't test other clients.

--

In order to get around this, one could use at least the following code snippet (better ways may exist, please tell if you know any).

Code: Select all

// Clear item.
var item := who.GetGottenItem();
who.ClearGottenItem();

// "Remove Move Item Request"
var packet := CreatePacket(0x27, 2);
packet.SendPacket(who);

// "Destroy Object"
packet := CreatePacket(0x1D, 5);
packet.SetInt32(1, item.serial);
packet.SendPacket(who);

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Sun Jan 25, 2009 11:24 am
by MuadDib
This bug still exist? And also, does this happen in pre-v5 clients? need details people. Easy test :)

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Mon Feb 16, 2009 3:26 pm
by ncrsn
Hey, just retested this one using 098 BETA 3: still occurs. Client was the good old 5.0.1j.

Tell me if you need more details or testing.

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Mon Feb 16, 2009 4:39 pm
by MuadDib
Try with a pre-v5 client and let me know too.

This will be another one of those client bug fixes done server side (yes, this can even happen on OSI servers at times). Should be an easy fix if I can get time to go over the code etc mate.

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Mon Feb 16, 2009 10:09 pm
by ncrsn
I tried out 4.0.0.a and 4.0.2a, they share the same behaviour.

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Tue Feb 17, 2009 4:58 am
by MuadDib
kk. I have the fix. Tested by Nando. But will be changing things before it's actually going. I say that, because I want to make adjustments core-wide for this fix, instead of just in clear gotten item. :)

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Tue Feb 17, 2009 12:26 pm
by ncrsn
We had a nice discussion with Nando_k, and the workaround got a bit cleaner.

Code: Select all

SendPacket(who, "2727");
who.ClearGottenItem();
Handles the issue -so it seems- correctly, and does not show "You can not pick that up." message in journal. So I'll use it until the improved core is released. I post the information in case someone else might need it.

Glad this got processed so quickly.

Edit: oh, the workaround has been tested working with client versions 4.0.0.a and 5.0.1j.

Re: character.ClearGottenItem() & v5 client (POL 097 2008-02

Posted: Tue Feb 17, 2009 8:23 pm
by MuadDib
Since this is not a MAJOR issue:

Code: Select all

-- POL098 --
02-17-2009 MuadDib:
    Fixed:   Instances where core uses UO::ClearGottenItem() type code caused ghosted item on client
             cursor. Will require more feedback from users after publish for remaining instances
             where this still occurs (outside of ClearGottenItem()).