Pick up item [POL097-2006-07-02 and older]

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
Developer Silver
Apprentice Poster
Posts: 58
Joined: Sun Feb 05, 2006 1:34 pm

Pick up item [POL097-2006-07-02 and older]

Post by Developer Silver »

Wow, first 097 bug! ;) *even if it's not a pure 097 bug*

In the 0x07 packet (Pick Up Item) hook, we check for some character props and deny the action if it's not enough to lift item... in this case, we send a 0x27 packet (Reject Move Item Request) to client and block 0x07 packet.
All ok, but...
If the same client try to pick up the same item (before it has been touched by another character) the 0x07 packet is wrong, having item amount always 0.
alway 0 --> BYTE[2] # of items in stack
If we don't send 0x27 packet all is ok, but client make item graphical disappeared.

One more thing: the amount in 0x07 packet is alway the whole stack amount, even if a client pick up only a little part of it... it's fixable or not?

(Thank you for 097 release :D )
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

What client versions? Give me all info you can. Including the hook if possible.

I will want to reproduce this myself and see what i can come up with.

The trick to try, is use .startlog then pick the item up where it will DENY it with your packethook. Then, reboot, whatever you gotta do (to get away from the bug). Then, try to pick up the item where the CORE rejects it (aka, to far away). See what happens then for the 0x27 again. Remember to use .startlog for this also. It will create a <accountname>.log file in the /log directory of your pol installation. It will contain the packets sent/recieved by the core.
Developer Silver
Apprentice Poster
Posts: 58
Joined: Sun Feb 05, 2006 1:34 pm

Re: Pick up item [POL097-2006-07-02 and older]

Post by Developer Silver »

Developer Silver wrote:One more thing: the amount in 0x07 packet is alway the whole stack amount, even if a client pick up only a little part of it... it's fixable or not?
This is not true, sorry I've mistaken... :P

For the first bug, I'll do what you suggested and I'll post here results... :)
Developer Silver
Apprentice Poster
Posts: 58
Joined: Sun Feb 05, 2006 1:34 pm

Post by Developer Silver »

Results:

With my 0x07 packethook enabled, in case of pick up denied (custom check not passed):

First pick up

Code: Select all

Client -> Server: 0x7, 7 bytes
0000: 07 40 89 cb b5 00 01                               .@...... ........

Server -> Client: 0x27, 2 bytes
0000: 27 00                                              '....... ........
Lift correctly denied with 0x27 packet.


Second pick up

Code: Select all

Client -> Server: 0x7, 7 bytes
0000: 07 40 89 cb b5 00 00                               .@...... ........

Server -> Client: 0x1D, 5 bytes
0000: 1d 40 89 cb b5                                     .@...... ........
Lift uncorrectly allowed: last byte in 0x7 packet is 0, while in first pick up was 1 (correct 1, it's a metal chest)

- - - - -

With my 0x07 packethook disabled, in case of pick up denied (too far away from item):

First pickup

Code: Select all

Client -> Server: 0x7, 7 bytes
0000: 07 40 89 cb b5 00 01                               .@...... ........

Server -> Client: 0x27, 2 bytes
0000: 27 01                                              '....... ........
Correct.

Every other pickup

Code: Select all

Client -> Server: 0x7, 7 bytes
0000: 07 40 89 cb b5 00 00                               .@...... ........

Server -> Client: 0x27, 2 bytes
0000: 27 01                                              '....... ........
Strange... in every pick up after the first, last byte of 0x7 is 0 (alway the metal chest, so it should be 1, no?)
Second byte of 0x27 sent by the core is 1, while packet guide tells second byte is an unknown 0. I tried setting up my 0x27 packet with 1 as second byte but nothing changed.

- - - - -

We use latest 5.0.2d client (with uorice).

Portion of hook you may be interested in is:

Code: Select all

exported function hooklift(who, byref pacchetto)

	if([...custom checks...])
// Too heavy
		var reject := CreatePacket(0x27, 2);
		reject.SetInt8(1, 1);
		reject.SendPacket(who);
		return 1;
	endif

Do you need more infos?
Locked