diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-04 07:19:27 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-04 07:19:27 +0000 |
commit | 4c38f6bad4736492e6c0ca19fd8794e436342079 (patch) | |
tree | 5a11bd922bbd2b084a830731d6cbacc4ec1b69ba /crawl-ref/source/spells3.cc | |
parent | cc0f9b2965e5298577253965c8819636985ac2db (diff) | |
download | crawl-ref-4c38f6bad4736492e6c0ca19fd8794e436342079.tar.gz crawl-ref-4c38f6bad4736492e6c0ca19fd8794e436342079.zip |
Activated code that equips raised dead with the equipment they died with
(minus scrolls, potions and wands). Ignores items which have been droped
and corpses which have been moved.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7743 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 4d89207f0e..2a796129b8 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -644,13 +644,9 @@ static bool _animatable_remains(const item_def& item) static void _equip_undead(const coord_def &a, int corps, int monster, int monnum) { -// Delay this until after 0.4 -#if 0 - monsters* mon = &menv[monster]; + monsters* mon = &menv[monster]; - monster_type type = static_cast<monster_type>(monnum); - - if (mons_itemuse(mon) < MONUSE_STARTING_EQUIPMENT) + if (mons_class_itemuse(monnum) < MONUSE_STARTING_EQUIPMENT) return; // If the player picked up and dropped the corpse then all its @@ -717,7 +713,7 @@ static void _equip_undead(const coord_def &a, int corps, int monster, case OBJ_WEAPONS: if (mon->inv[MSLOT_WEAPON] != NON_ITEM) { - if (mons_wields_two_weapons(type)) + if (mons_wields_two_weapons(mon)) mslot = MSLOT_ALT_WEAPON; else { @@ -778,7 +774,6 @@ static void _equip_undead(const coord_def &a, int corps, int monster, if (mslot != MSLOT_ALT_WEAPON || mons_wields_two_weapons(mon)) mon->equip(item, mslot, 0); } // while -#endif } static bool _raise_remains(const coord_def &a, int corps, beh_type beha, |