diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-27 00:47:16 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-27 00:47:16 +0000 |
commit | 1d361d6db0e0c340c865ed9bbf90f77b8f3b5934 (patch) | |
tree | 0fd8782d4e8c8f1312872ebc7139f19cb009883f /crawl-ref/source/transfor.cc | |
parent | d0cb246a070e899ec215b13bb246908a726d3bed (diff) | |
download | crawl-ref-1d361d6db0e0c340c865ed9bbf90f77b8f3b5934.tar.gz crawl-ref-1d361d6db0e0c340c865ed9bbf90f77b8f3b5934.zip |
Fix [2003446]: Don't bother trying to take boots off a formerly
transformed centaur (or naga) if they have nothing equipped in the boots
slot.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6160 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r-- | crawl-ref/source/transfor.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 7b2b676e65..df10d0562e 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -754,10 +754,12 @@ void untransform(void) // Removed barding check, no transformed creatures can wear barding // anyway. // *coughs* Ahem, blade hands... -- jpeg - if ((you.species == SP_NAGA || you.species == SP_CENTAUR) - && you.inv[you.equip[EQ_BOOTS]].sub_type == ARM_BOOTS) + if (you.species == SP_NAGA || you.species == SP_CENTAUR) { - remove_one_equip(EQ_BOOTS); + const int arm = you.equip[EQ_BOOTS]; + + if (arm != -1 && you.inv[arm].sub_type == ARM_BOOTS) + remove_one_equip(EQ_BOOTS); } if (hp_downscale != 10 && you.hp != you.hp_max) |