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?