… | |
… | |
675 | free_key_values (this); |
675 | free_key_values (this); |
676 | } |
676 | } |
677 | |
677 | |
678 | void object::link () |
678 | void object::link () |
679 | { |
679 | { |
|
|
680 | assert (!count);//D |
680 | uuid = gen_uuid (); |
681 | uuid = gen_uuid (); |
681 | |
682 | |
682 | refcnt_inc (); |
683 | refcnt_inc (); |
683 | objects.insert (this); |
684 | objects.insert (this); |
684 | } |
685 | } |
685 | |
686 | |
686 | void object::unlink () |
687 | void object::unlink () |
687 | { |
688 | { |
|
|
689 | assert (count);//D |
688 | objects.erase (this); |
690 | objects.erase (this); |
689 | refcnt_dec (); |
691 | refcnt_dec (); |
690 | } |
692 | } |
691 | |
693 | |
692 | void |
694 | void |
… | |
… | |
784 | |
786 | |
785 | if (op->flag [FLAG_STARTEQUIP] |
787 | if (op->flag [FLAG_STARTEQUIP] |
786 | || op->flag [FLAG_NO_DROP] |
788 | || op->flag [FLAG_NO_DROP] |
787 | || op->type == RUNE |
789 | || op->type == RUNE |
788 | || op->type == TRAP |
790 | || op->type == TRAP |
789 | || op->flag [FLAG_IS_A_TEMPLATE]) |
791 | || op->flag [FLAG_IS_A_TEMPLATE] |
|
|
792 | || op->flag [FLAG_DESTROY_ON_DEATH]) |
790 | op->destroy (); |
793 | op->destroy (); |
791 | else |
794 | else |
792 | map->insert (op, x, y); |
795 | map->insert (op, x, y); |
793 | } |
796 | } |
794 | } |
797 | } |