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

Bug Reports relating to the 097 core are moved to this forum once solved.

Moderator: POL Developer

Locked
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

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

Post 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);
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post by MuadDib »

This bug still exist? And also, does this happen in pre-v5 clients? need details people. Easy test :)
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

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

Post 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.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post 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.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

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

Post by ncrsn »

I tried out 4.0.0.a and 4.0.2a, they share the same behaviour.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post 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. :)
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

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

Post 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.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post 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()).
             
Locked