--- deliantra/server/socket/item.C 2006/12/14 20:39:54 1.20 +++ deliantra/server/socket/item.C 2006/12/15 19:59:20 1.23 @@ -35,8 +35,6 @@ #include #include /* LOOK_OBJ */ -#include -#include #include /** This is the maximum number of bytes we expect any one item to take up */ @@ -116,7 +114,7 @@ * animation of face to the client. */ static void -add_object_to_socklist (client_socket &ns, packet &sl, object *head) +add_object_to_socklist (client &ns, packet &sl, object *head) { int flags, len, anim_speed; char item_n[MAX_BUF]; @@ -231,14 +229,15 @@ if (pl->contr->socket->look_position) { + char buf[80]; + snprintf (buf, 80, "Apply this to see %d previous items", NUM_LOOK_OBJECTS); + sl << uint32 (0x80000000 | (pl->contr->socket->look_position - NUM_LOOK_OBJECTS)) << uint32 (0) << sint32 (-1) - << uint32 (empty_face->number); - - sl.printf ("Click here to see %d previous items", NUM_LOOK_OBJECTS); - - sl << uint16 (0) + << uint32 (empty_face->number) + << data8 (buf) + << uint16 (0) << uint8 (0) << uint32 (0); @@ -272,11 +271,9 @@ sl << uint32 (0x80000000 | (pl->contr->socket->look_position + NUM_LOOK_OBJECTS)) << uint32 (0) << uint32 ((uint32) - 1) - << uint32 (empty_face->number); - - sl.printf ("Click here to see next group of items"); - - sl << uint16 (0) + << uint32 (empty_face->number) + << data8 ("Apply this to see next group of items") + << uint16 (0) << uint8 (0) << uint32 (0); @@ -643,10 +640,10 @@ /** Client wants to apply some object. Lets do so. */ void -LockItem (uint8 *data, int len, player *pl) +LockItem (char *data, int len, player *pl) { int flag = data[0]; - tag_t tag = net_uint32 (data + 1); + tag_t tag = net_uint32 ((uint8 *)data + 1); object *op = esrv_get_ob_from_count (pl->ob, tag); if (!op) @@ -665,9 +662,9 @@ /** Client wants to apply some object. Lets do so. */ void -MarkItem (uint8 * data, int len, player *pl) +MarkItem (char *data, int len, player *pl) { - tag_t tag = net_uint32 (data); + tag_t tag = net_uint32 ((uint8 *)data); object *op = esrv_get_ob_from_count (pl->ob, tag); if (!op)