--- deliantra/server/socket/item.C 2006/12/14 01:12:35 1.15 +++ deliantra/server/socket/item.C 2006/12/14 01:21:58 1.16 @@ -111,12 +111,12 @@ return flags; } -/* Used in the send_look to put object head into SockList +/* Used in the send_look to put object head into packet * sl for socket ns. Need socket to know if we need to send * animation of face to the client. */ static void -add_object_to_socklist (NewSocket &ns, SockList &sl, object *head) +add_object_to_socklist (NewSocket &ns, packet &sl, object *head) { int flags, len, anim_speed; char item_n[MAX_BUF]; @@ -218,7 +218,7 @@ for (tmp = get_map_ob (pl->map, pl->x, pl->y); tmp && tmp->above; tmp = tmp->above) ; - SockList sl (MAXSOCKBUF); + packet sl; pl->contr->socket.send_packet ("delinv 0"); @@ -309,7 +309,6 @@ if (got_one) Send_With_Handling (&pl->contr->socket, &sl); - sl.free (); } /** @@ -321,7 +320,7 @@ object *tmp; int got_one = 0; - SockList sl (MAXSOCKBUF); + packet sl; sl.printf ("delinv %d", op->count); Send_With_Handling (&pl->contr->socket, &sl); @@ -364,7 +363,6 @@ if (got_one) Send_With_Handling (&pl->contr->socket, &sl); - sl.free (); } /** @@ -398,7 +396,7 @@ LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count); } - SockList sl (MAXSOCKBUF); + packet sl; sl << "upditem " << uint8 (flags); @@ -492,7 +490,6 @@ sl << uint32 (op->nrof); Send_With_Handling (&pl->contr->socket, &sl); - sl.free (); } /** @@ -517,7 +514,7 @@ } } - SockList sl (MAXSOCKBUF); + packet sl; sl.printf ("item%d ", pl->contr->socket.itemcmd); @@ -531,7 +528,6 @@ Send_With_Handling (&pl->contr->socket, &sl); SET_FLAG (op, FLAG_CLIENT_SENT); - sl.free (); } /** @@ -542,13 +538,12 @@ void esrv_del_item (player *pl, int tag) { - SockList sl (MAXSOCKBUF); + packet sl; sl << "delitem " << uint32 (tag); Send_With_Handling (&pl->socket, &sl); - sl.free (); }