Warehouse Packet, Offset 9

11/19/2011 09:01 Belth#1
Within packets related to warehouse activities sent from both the server and client there is this seemingly constant value of 10 at offset 9. What does it represent? I'm particularly curious because while testing I was actually botjailed for putting a value other than 10.

Also, in the "open warehouse packet", which is sent by the client the first time you try to open a warehouse, offset 10 has a value of 1. Subsequent packets of this packet are sent with a value of 0 at offset 10 (whenever the client clicks a warehouse npc). Is it safe to value represents a "First Open"-like bool?
11/19/2011 11:56 Korvacs#2
Definitely offset 9, not offset 8?
11/19/2011 12:07 Belth#3
Quote:
Originally Posted by Korvacs View Post
Definitely offset 9, not offset 8?
Definitely 9. Here's a dump of the initial open warehouse packet:

Code:
Time packet was sent: 7:05:32 AM

Packet size: 76 bytes.
Packet type: 1102.

0	=	76
1	=	0
2	=	78
3	=	4
4	=	8
5	=	0
6	=	0
7	=	0
8	=	0
9	=	10
10	=	1
11	=	0
12	=	0
13	=	0
14	=	0
15	=	0
16	=	0
17	=	0
18	=	0
19	=	0
20	=	0
21	=	0
22	=	0
23	=	0
24	=	0
25	=	0
26	=	0
27	=	0
28	=	0
29	=	0
30	=	0
31	=	0
32	=	0
33	=	0
34	=	0
35	=	0
36	=	0
37	=	0
38	=	0
39	=	0
40	=	0
41	=	0
42	=	0
43	=	0
44	=	0
45	=	0
46	=	0
47	=	0
48	=	0
49	=	0
50	=	0
51	=	0
52	=	0
53	=	0
54	=	0
55	=	0
56	=	0
57	=	0
58	=	0
59	=	0
60	=	0
61	=	0
62	=	0
63	=	0
64	=	0
65	=	0
66	=	0
67	=	0
68	=	0
69	=	0
70	=	0
71	=	0
72	=	0
73	=	0
74	=	0
75	=	0
11/19/2011 12:27 nTL3fTy#4
That's mostly because the 'Warehouse packet' is not solely for warehouses. TQ calls it MsgPackage because it handles more than just warehouses -- it handles sashes and item boxes also.

Here's their packet struct:
Code:
typedef struct
{
  MSGHEAD_DEFINE // size and packet type

  OBJID id; // OBJID is a uint
  UCHAR ucAction;
  UCHAR ucType;
  union {
    struct{
      USHORT usSize;  
      MsgPackageItemInfo setItemInfo[1];
    };
    OBJID idItem;
  };
}MSG_Info;
Relevant enums:
Code:
enum{
    MSGPACKAGE_QUERYLIST  = 0,
    MSGPACKAGE_CHECKIN    = 1,
    MSGPACKAGE_CHECKOUT   = 2,
    MSGPACKAGE_QUERYLIST2 = 3,
};
Code:
enum{
    MSGPACKAGE_TYPE_NONE    = 0,
    MSGPACKAGE_TYPE_STORAGE = 10, // warehouse
    MSGPACKAGE_TYPE_TRUNK   = 20, // item box
    MSGPACKAGE_TYPE_CHEST   = 30, // sash
};
So to answer your question, that 10 is representative of the 'package type' which in this case is the warehouse, but it can be other values.

People developing servers should really take a look at the EO server source. :)
11/19/2011 12:35 Korvacs#5
Quote:
Originally Posted by Belth View Post
Definitely 9. Here's a dump of the initial open warehouse packet:
Ah, its all moved since last time i recorded that packet :p
11/19/2011 18:33 Belth#6
Quote:
Originally Posted by nTL3fTy View Post
That's mostly because the 'Warehouse packet' is not solely for warehouses. TQ calls it MsgPackage because it handles more than just warehouses -- it handles sashes and item boxes also.

Here's their packet struct:
Code:
typedef struct
{
  MSGHEAD_DEFINE // size and packet type

  OBJID id; // OBJID is a uint
  UCHAR ucAction;
  UCHAR ucType;
  union {
    struct{
      USHORT usSize;  
      MsgPackageItemInfo setItemInfo[1];
    };
    OBJID idItem;
  };
}MSG_Info;
Relevant enums:
Code:
enum{
    MSGPACKAGE_QUERYLIST  = 0,
    MSGPACKAGE_CHECKIN    = 1,
    MSGPACKAGE_CHECKOUT   = 2,
    MSGPACKAGE_QUERYLIST2 = 3,
};
Code:
enum{
    MSGPACKAGE_TYPE_NONE    = 0,
    MSGPACKAGE_TYPE_STORAGE = 10, // warehouse
    MSGPACKAGE_TYPE_TRUNK   = 20, // item box
    MSGPACKAGE_TYPE_CHEST   = 30, // sash
};
So to answer your question, that 10 is representative of the 'package type' which in this case is the warehouse, but it can be other values.

People developing servers should really take a look at the EO server source. :)
Props man. I just assumed sash and item boxes had the same value, never checked.