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 » Thu Apr 24, 2008 7:01 am

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
POL Expert
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post by MuadDib » Sun Jan 25, 2009 11:24 am

This bug still exist? And also, does this happen in pre-v5 clients? need details people. Easy test :)
POL Developer - The Penguin Scripter

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 » Mon Feb 16, 2009 3:26 pm

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
POL Expert
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post by MuadDib » Mon Feb 16, 2009 4:39 pm

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.
POL Developer - The Penguin Scripter

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 » Mon Feb 16, 2009 10:09 pm

I tried out 4.0.0.a and 4.0.2a, they share the same behaviour.

MuadDib
POL Expert
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post by MuadDib » Tue Feb 17, 2009 4:58 am

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. :)
POL Developer - The Penguin Scripter

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 » Tue Feb 17, 2009 12:26 pm

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
POL Expert
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

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

Post by MuadDib » Tue Feb 17, 2009 8:23 pm

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()).
             
POL Developer - The Penguin Scripter

Locked