--- deliantra/server/socket/item.C 2006/12/16 22:14:42 1.24 +++ deliantra/server/socket/item.C 2006/12/20 01:19:11 1.27 @@ -216,10 +216,9 @@ for (tmp = get_map_ob (pl->map, pl->x, pl->y); tmp && tmp->above; tmp = tmp->above) ; - packet sl; - pl->contr->socket->send_packet ("delinv 0"); + packet sl; sl.printf ("item%d ", pl->contr->socket->itemcmd); sl << uint32 (0); @@ -230,9 +229,9 @@ if (pl->contr->socket->look_position) { char buf[80]; - snprintf (buf, 80, "Apply this to see %d previous items", NUM_LOOK_OBJECTS); + snprintf (buf, 80, "Apply this to see %d previous items", FLOORBOX_PAGESIZE); - sl << uint32 (0x80000000 | (pl->contr->socket->look_position - NUM_LOOK_OBJECTS)) + sl << uint32 (0x80000000 | (pl->contr->socket->look_position - FLOORBOX_PAGESIZE)) << uint32 (0) << sint32 (-1) << uint32 (empty_face->number) @@ -263,12 +262,12 @@ end_look++; - if (end_look > NUM_LOOK_OBJECTS) + if (end_look > FLOORBOX_PAGESIZE) { /* What we basically do is make a 'fake' object - when the user applies it, * we notice the special tag the object has, and act accordingly. */ - sl << uint32 (0x80000000 | (pl->contr->socket->look_position + NUM_LOOK_OBJECTS)) + sl << uint32 (0x80000000 | (pl->contr->socket->look_position + FLOORBOX_PAGESIZE)) << uint32 (0) << uint32 ((uint32) - 1) << uint32 (empty_face->number) @@ -317,12 +316,10 @@ object *tmp; int got_one = 0; - packet sl; - sl.printf ("delinv %d", op->count); - pl->contr->socket->send_packet (sl); + pl->contr->socket->send_packet_printf ("delinv %d", op->count); - sl.reset (); + packet sl; sl.printf ("item%d ", pl->contr->socket->itemcmd); sl << uint32 (op->count); @@ -393,10 +390,9 @@ LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count); } - packet sl; + packet sl ("upditem"); - sl << "upditem " - << uint8 (flags); + sl << uint8 (flags); if (op->head) op = op->head; @@ -506,7 +502,7 @@ */ if (!op->env) { - pl->contr->socket->update_look = 1; + pl->contr->socket->floorbox_update (); return; } } @@ -534,10 +530,9 @@ void esrv_del_item (player *pl, int tag) { - packet sl; + packet sl ("delitem"); - sl << "delitem " - << uint32 (tag); + sl << uint32 (tag); pl->socket->send_packet (sl); } @@ -621,7 +616,7 @@ if (tag & 0x80000000) { pl->socket->look_position = tag & 0x7fffffff; - pl->socket->update_look = 1; + pl->socket->floorbox_update (); return; } @@ -636,7 +631,7 @@ player_apply (pl->ob, op, 0, 0); } -/** Client wants to apply some object. Lets do so. */ +/** Client wants to lock some object. Lets do so. */ void LockItem (char *data, int len, player *pl) { @@ -658,7 +653,7 @@ esrv_update_item (UPD_FLAGS, pl->ob, op); } -/** Client wants to apply some object. Lets do so. */ +/** Client wants to mark some object. Lets do so. */ void MarkItem (char *data, int len, player *pl) {