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

Comparing deliantra/server/server/c_object.C (file contents):
Revision 1.77 by root, Mon Sep 22 01:46:52 2008 UTC vs.
Revision 1.80 by elmex, Sun Oct 5 12:40:21 2008 UTC

607 607
608 /* We are only dropping some of the items. We split the current object 608 /* We are only dropping some of the items. We split the current object
609 * off 609 * off
610 */ 610 */
611 if (!can_split (op, tmp, nrof)) 611 if (!can_split (op, tmp, nrof))
612 return;
612 613
613 if (INVOKE_OBJECT (DROP, tmp, ARG_OBJECT (op))) 614 if (INVOKE_OBJECT (DROP, tmp, ARG_OBJECT (op)))
614 return; 615 return;
615 616
616 if (QUERY_FLAG (tmp, FLAG_STARTEQUIP)) 617 if (QUERY_FLAG (tmp, FLAG_STARTEQUIP))
617 { 618 {
618 op->statusmsg (format ("You drop the %s.", query_name (tmp))); 619 op->statusmsg (format ("You drop the %s.", query_name (tmp)));
619 op->statusmsg ("The gods who lent it to you retrieves it."); 620 op->statusmsg ("The god who lent it to you retrieves it.");
620 621
621 tmp->destroy (); 622 tmp->destroy ();
622 op->update_stats (); 623 op->update_stats ();
623 return; 624 return;
624 } 625 }
634 return; 635 return;
635 636
636 if (is_in_shop (op) && !QUERY_FLAG (tmp, FLAG_UNPAID) && tmp->type != MONEY) 637 if (is_in_shop (op) && !QUERY_FLAG (tmp, FLAG_UNPAID) && tmp->type != MONEY)
637 { 638 {
638 if (!sell_item (tmp, op)) 639 if (!sell_item (tmp, op))
639 return; // if we can't sell it we don't drop it 640 {
641 // if we can't sell it we don't drop it, so give it back to the seller
642 op->insert (tmp);
643 return;
644 }
640 } 645 }
641 646
642 tmp->x = op->x; 647 tmp->x = op->x;
643 tmp->y = op->y; 648 tmp->y = op->y;
644 649
659 if (tmp->env && tmp->env->type != PLAYER) 664 if (tmp->env && tmp->env->type != PLAYER)
660 { 665 {
661 /* Just toss the object - probably shouldn't be hanging 666 /* Just toss the object - probably shouldn't be hanging
662 * around anyways 667 * around anyways
663 */ 668 */
664 tmp->remove ();
665 tmp->destroy (); 669 tmp->destroy ();
666 return; 670 return;
667 } 671 }
668 else 672 else
669 { 673 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines