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

Comparing deliantra/server/server/alchemy.C (file contents):
Revision 1.30 by root, Sat Jul 12 22:46:58 2008 UTC vs.
Revision 1.31 by root, Mon Sep 29 10:20:48 2008 UTC

615 { /* MAJOR FIRE */ 615 { /* MAJOR FIRE */
616 object *fb = get_archetype (SP_MED_FIREBALL); 616 object *fb = get_archetype (SP_MED_FIREBALL);
617 617
618 remove_contents (cauldron->inv, NULL); 618 remove_contents (cauldron->inv, NULL);
619 fire_arch_from_position (cauldron, cauldron, cauldron->x, cauldron->y, 0, fb); 619 fire_arch_from_position (cauldron, cauldron, cauldron->x, cauldron->y, 0, fb);
620 fb->destroy (); 620 fb->destroy (true);
621 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s erupts in flame!", &cauldron->name); 621 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s erupts in flame!", &cauldron->name);
622 } 622 }
623 else if (level < 100) 623 else if (level < 100)
624 { /* WHAMMY the CAULDRON */ 624 { /* WHAMMY the CAULDRON */
625 if (!QUERY_FLAG (cauldron, FLAG_CURSED)) 625 if (!QUERY_FLAG (cauldron, FLAG_CURSED))
686 remove_contents (cauldron->inv, NULL); 686 remove_contents (cauldron->inv, NULL);
687 cast_magic_storm (op, tmp, level); 687 cast_magic_storm (op, tmp, level);
688 } 688 }
689} 689}
690 690
691
692/* 691/*
693 * All but object "save_item" are elimentated from 692 * All but object "save_item" are elimentated from
694 * the container list. Note we have to becareful to remove the inventories 693 * the container list. Note we have to becareful to remove the inventories
695 * of objects in the cauldron inventory (ex icecube has stuff in it). 694 * of objects in the cauldron inventory (ex icecube has stuff in it).
696 */ 695 */
697
698void 696void
699remove_contents (object *first_ob, object *save_item) 697remove_contents (object *first_ob, object *save_item)
700{ 698{
699 // this cries for a cleaner rewrite, removing save_item first possibly
701 object *next, *tmp = first_ob; 700 object *next, *tmp = first_ob;
702 701
703 while (tmp) 702 while (tmp)
704 { 703 {
705 next = tmp->below; 704 next = tmp->below;
713 } 712 }
714 713
715 if (tmp->inv) 714 if (tmp->inv)
716 remove_contents (tmp->inv, NULL); 715 remove_contents (tmp->inv, NULL);
717 716
718 tmp->destroy (); 717 tmp->destroy (true);
719 tmp = next; 718 tmp = next;
720 } 719 }
721} 720}
722 721
723/** 722/**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines