ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/item.C
(Generate patch)

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.16 by root, Thu Dec 14 01:21:58 2006 UTC vs.
Revision 1.17 by root, Thu Dec 14 01:59:10 2006 UTC

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 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines