PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Pick up item [POL097-2006-07-02 and older]

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
Developer Silver



Joined: 05 Feb 2006
Posts: 58
Location: Italy

PostPosted: Wed Jul 05, 2006 11:41 am    Post subject: Pick up item [POL097-2006-07-02 and older] Reply with quote

Wow, first 097 bug! Wink *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 Very Happy )

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Wed Jul 05, 2006 12:37 pm    Post subject: Reply with quote

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.

Author Message
Developer Silver



Joined: 05 Feb 2006
Posts: 58
Location: Italy

PostPosted: Wed Jul 05, 2006 1:47 pm    Post subject: Re: Pick up item [POL097-2006-07-02 and older] Reply with quote

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... Razz

For the first bug, I'll do what you suggested and I'll post here results... Smile

Author Message
Developer Silver



Joined: 05 Feb 2006
Posts: 58
Location: Italy

PostPosted: Wed Jul 05, 2006 2:21 pm    Post subject: Reply with quote

Results:

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

First pick up
Code:
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:
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:
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:
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:
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?

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty