From 4c38f6bad4736492e6c0ca19fd8794e436342079 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Thu, 4 Dec 2008 07:19:27 +0000 Subject: 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 --- crawl-ref/source/spells3.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/spells3.cc') 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(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, -- cgit v1.2.3-54-g00ecf