diff options
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index d17b970966..a6fe89442f 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -640,7 +640,7 @@ void set_equip_race( item_def &item, unsigned long flags ) case OBJ_ARMOUR: // not hides, dragon armour, crystal plate, or barding - if (item.sub_type >= ARM_DRAGON_HIDE + if (item.sub_type >= ARM_DRAGON_HIDE && item.sub_type <= ARM_SWAMP_DRAGON_ARMOUR && item.sub_type != ARM_CENTAUR_BARDING && item.sub_type != ARM_NAGA_BARDING) @@ -664,27 +664,32 @@ void set_equip_race( item_def &item, unsigned long flags ) // check that item is appropriate for racial type switch (flags) { - case ISFLAG_ELVEN: - if (item.base_type == OBJ_ARMOUR - && (item.sub_type == ARM_SPLINT_MAIL - || item.sub_type == ARM_BANDED_MAIL - || item.sub_type == ARM_PLATE_MAIL)) + case ISFLAG_ELVEN: + if ((item.base_type == OBJ_WEAPONS + && weapon_skill(item) == SK_MACES_FLAILS) + || (item.base_type == OBJ_ARMOUR + && (item.sub_type == ARM_SPLINT_MAIL + || item.sub_type == ARM_BANDED_MAIL + || item.sub_type == ARM_PLATE_MAIL))) { return; } break; - - case ISFLAG_DWARVEN: - if (item.base_type == OBJ_ARMOUR - && (item.sub_type == ARM_ROBE - || item.sub_type == ARM_LEATHER_ARMOUR - || item.sub_type == ARM_STUDDED_LEATHER_ARMOUR)) + + case ISFLAG_DWARVEN: + if ((item.base_type == OBJ_WEAPONS + && weapon_skill(item) == SK_POLEARMS) + || (item.base_type == OBJ_ARMOUR + && (item.sub_type == ARM_ROBE + || item.sub_type == ARM_LEATHER_ARMOUR + || item.sub_type == ARM_STUDDED_LEATHER_ARMOUR))) { return; } break; - case ISFLAG_ORCISH: + case ISFLAG_ORCISH: + default: break; } |