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.3 by root, Tue Aug 29 08:01:38 2006 UTC vs.
Revision 1.4 by root, Sun Sep 3 00:18:43 2006 UTC

1 1
2/* 2/*
3 * static char *rcsid_item_c = 3 * static char *rcsid_item_c =
4 * "$Id: item.C,v 1.3 2006/08/29 08:01:38 root Exp $"; 4 * "$Id: item.C,v 1.4 2006/09/03 00:18:43 root Exp $";
5 */ 5 */
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
9 9
370 if (!QUERY_FLAG(op, FLAG_CLIENT_SENT)) { 370 if (!QUERY_FLAG(op, FLAG_CLIENT_SENT)) {
371 /* FLAG_CLIENT_SENT is debug only. We are using it to see where 371 /* FLAG_CLIENT_SENT is debug only. We are using it to see where
372 * this is happening - we can set a breakpoint here in the debugger 372 * this is happening - we can set a breakpoint here in the debugger
373 * and track back the call. 373 * and track back the call.
374 */ 374 */
375 LOG(llevDebug,"We have not sent item %s (%d)\n", op->name, op->count); 375 LOG(llevDebug,"We have not sent item %s (%d)\n", &op->name, op->count);
376 } 376 }
377 sl.buf= (unsigned char *) malloc(MAXSOCKBUF); 377 sl.buf= (unsigned char *) malloc(MAXSOCKBUF);
378 378
379 strcpy((char*)sl.buf,"upditem "); 379 strcpy((char*)sl.buf,"upditem ");
380 sl.len=strlen((char*)sl.buf); 380 sl.len=strlen((char*)sl.buf);
555{ 555{
556 long tag = atoi(buf); 556 long tag = atoi(buf);
557 object *op = esrv_get_ob_from_count(pl->ob, tag); 557 object *op = esrv_get_ob_from_count(pl->ob, tag);
558 558
559 if (!op) { 559 if (!op) {
560 LOG(llevDebug, "Player '%s' tried to examine the unknown object (%ld)\n", 560 LOG(llevDebug, "Player '%s' tried to examine the unknown object (%ld)\n", &pl->ob->name, tag);
561 pl->ob->name, tag);
562 return; 561 return;
563 } 562 }
564 examine (pl->ob, op); 563 examine (pl->ob, op);
565} 564}
566 565
581 pl->socket.update_look = 1; 580 pl->socket.update_look = 1;
582 return; 581 return;
583 } 582 }
584 583
585 if (!op) { 584 if (!op) {
586 LOG(llevDebug, "Player '%s' tried to apply the unknown object (%d)\n", 585 LOG(llevDebug, "Player '%s' tried to apply the unknown object (%d)\n", &pl->ob->name, tag);
587 pl->ob->name, tag);
588 return; 586 return;
589 } 587 }
590 player_apply (pl->ob, op, 0, 0); 588 player_apply (pl->ob, op, 0, 0);
591} 589}
592 590
714{ 712{
715 object *op, *env; 713 object *op, *env;
716 714
717 op = esrv_get_ob_from_count(pl, tag); 715 op = esrv_get_ob_from_count(pl, tag);
718 if (!op) { 716 if (!op) {
719 LOG(llevDebug, "Player '%s' tried to move an unknown object (%ld)\n", 717 LOG(llevDebug, "Player '%s' tried to move an unknown object (%ld)\n", &pl->name, tag);
720 pl->name, tag);
721 return; 718 return;
722 } 719 }
723 720
724 if (!to) { /* drop it to the ground */ 721 if (!to) { /* drop it to the ground */
725/* LOG(llevDebug, "Drop it on the ground.\n");*/ 722/* LOG(llevDebug, "Drop it on the ground.\n");*/
752 return ; 749 return ;
753 } 750 }
754 env = esrv_get_ob_from_count(pl, to); 751 env = esrv_get_ob_from_count(pl, to);
755 if (!env) { 752 if (!env) {
756 LOG(llevDebug, 753 LOG(llevDebug,
757 "Player '%s' tried to move object to the unknown location (%d)\n", 754 "Player '%s' tried to move object to the unknown location (%d)\n", &pl->name, to);
758 pl->name, to);
759 return; 755 return;
760 } 756 }
761 /* put_object_in_sack presumes that necessary sanity checking 757 /* put_object_in_sack presumes that necessary sanity checking
762 * has already been done (eg, it can be picked up and fits in 758 * has already been done (eg, it can be picked up and fits in
763 * in a sack, so check for those things. We should also check 759 * in a sack, so check for those things. We should also check

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines