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.26 by root, Tue Dec 19 05:41:22 2006 UTC vs.
Revision 1.27 by root, Wed Dec 20 01:19:11 2006 UTC

214 return; 214 return;
215 215
216 for (tmp = get_map_ob (pl->map, pl->x, pl->y); tmp && tmp->above; tmp = tmp->above) 216 for (tmp = get_map_ob (pl->map, pl->x, pl->y); tmp && tmp->above; tmp = tmp->above)
217 ; 217 ;
218 218
219 pl->contr->socket->send_packet ("delinv 0");
220
219 packet sl; 221 packet sl;
220
221 pl->contr->socket->send_packet ("delinv 0");
222
223 sl.printf ("item%d ", pl->contr->socket->itemcmd); 222 sl.printf ("item%d ", pl->contr->socket->itemcmd);
224 223
225 sl << uint32 (0); 224 sl << uint32 (0);
226 225
227 if (!(pl->contr->socket->faces_sent[empty_face->number] & NS_FACESENT_FACE)) 226 if (!(pl->contr->socket->faces_sent[empty_face->number] & NS_FACESENT_FACE))
315esrv_send_inventory (object *pl, object *op) 314esrv_send_inventory (object *pl, object *op)
316{ 315{
317 object *tmp; 316 object *tmp;
318 int got_one = 0; 317 int got_one = 0;
319 318
319
320 pl->contr->socket->send_packet_printf ("delinv %d", op->count);
321
320 packet sl; 322 packet sl;
321
322 sl.printf ("delinv %d", op->count);
323 pl->contr->socket->send_packet (sl);
324
325 sl.reset ();
326 sl.printf ("item%d ", pl->contr->socket->itemcmd); 323 sl.printf ("item%d ", pl->contr->socket->itemcmd);
327 324
328 sl << uint32 (op->count); 325 sl << uint32 (op->count);
329 326
330 for (tmp = op->inv; tmp; tmp = tmp->below) 327 for (tmp = op->inv; tmp; tmp = tmp->below)
391 * and track back the call. 388 * and track back the call.
392 */ 389 */
393 LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count); 390 LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count);
394 } 391 }
395 392
396 packet sl; 393 packet sl ("upditem");
397 394
398 sl << "upditem "
399 << uint8 (flags); 395 sl << uint8 (flags);
400 396
401 if (op->head) 397 if (op->head)
402 op = op->head; 398 op = op->head;
403 399
404 sl << uint32 (op->count); 400 sl << uint32 (op->count);
532 */ 528 */
533 529
534void 530void
535esrv_del_item (player *pl, int tag) 531esrv_del_item (player *pl, int tag)
536{ 532{
537 packet sl; 533 packet sl ("delitem");
538 534
539 sl << "delitem "
540 << uint32 (tag); 535 sl << uint32 (tag);
541 536
542 pl->socket->send_packet (sl); 537 pl->socket->send_packet (sl);
543} 538}
544 539
545 540

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines