--- deliantra/server/socket/item.C 2006/12/14 04:30:33 1.19 +++ deliantra/server/socket/item.C 2006/12/15 03:53:44 1.22 @@ -231,14 +231,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 +273,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); @@ -296,7 +295,7 @@ if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) { - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); sl.reset (); sl.printf ("item%d ", pl->contr->socket->itemcmd); @@ -307,7 +306,7 @@ } if (got_one) - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); } @@ -323,7 +322,7 @@ packet sl; sl.printf ("delinv %d", op->count); - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); sl.reset (); sl.printf ("item%d ", pl->contr->socket->itemcmd); @@ -351,7 +350,7 @@ */ if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) { - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); sl.reset (); sl.printf ("item%d ", pl->contr->socket->itemcmd); @@ -362,7 +361,7 @@ } if (got_one) - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); } @@ -490,7 +489,7 @@ if (flags & UPD_NROF) sl << uint32 (op->nrof); - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); } /** @@ -526,7 +525,7 @@ add_object_to_socklist (*pl->contr->socket, sl, op); - Send_With_Handling (pl->contr->socket, &sl); + pl->contr->socket->send_packet (sl); SET_FLAG (op, FLAG_CLIENT_SENT); } @@ -544,7 +543,7 @@ sl << "delitem " << uint32 (tag); - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); } @@ -643,10 +642,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 +664,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)