… | |
… | |
292 | head = tmp; |
292 | head = tmp; |
293 | |
293 | |
294 | add_object_to_socklist (pl->contr->socket, sl, head); |
294 | add_object_to_socklist (pl->contr->socket, sl, head); |
295 | got_one++; |
295 | got_one++; |
296 | |
296 | |
297 | if (sl.len >= (MAXSOCKBUF - MAXITEMLEN)) |
297 | if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) |
298 | { |
298 | { |
299 | Send_With_Handling (&pl->contr->socket, &sl); |
299 | Send_With_Handling (&pl->contr->socket, &sl); |
300 | |
300 | |
301 | sl.reset (); |
301 | sl.reset (); |
302 | sl.printf ("item%d ", pl->contr->socket.itemcmd); |
302 | sl.printf ("item%d ", pl->contr->socket.itemcmd); |
… | |
… | |
347 | |
347 | |
348 | /* IT is possible for players to accumulate a huge amount of |
348 | /* IT is possible for players to accumulate a huge amount of |
349 | * items (especially with some of the bags out there) to |
349 | * items (especially with some of the bags out there) to |
350 | * overflow the buffer. IF so, send multiple item commands. |
350 | * overflow the buffer. IF so, send multiple item commands. |
351 | */ |
351 | */ |
352 | if (sl.len >= (MAXSOCKBUF - MAXITEMLEN)) |
352 | if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) |
353 | { |
353 | { |
354 | Send_With_Handling (&pl->contr->socket, &sl); |
354 | Send_With_Handling (&pl->contr->socket, &sl); |
|
|
355 | |
|
|
356 | sl.reset (); |
355 | sprintf ((char *) sl.buf, "item%d ", pl->contr->socket.itemcmd); |
357 | sl.printf ("item%d ", pl->contr->socket.itemcmd); |
356 | sl.len = strlen ((char *) sl.buf); |
|
|
357 | sl << uint32 (op->count); |
358 | sl << uint32 (op->count); |
358 | got_one = 0; |
359 | got_one = 0; |
359 | } |
360 | } |
360 | } /* If LOOK_OBJ() */ |
361 | } /* If LOOK_OBJ() */ |
361 | } |
362 | } |