summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index d477d1b767..ee2e39b4b5 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -350,12 +350,13 @@ const char* weapon_brand_name(const item_def& item, bool terse)
}
-static const char* armour_ego_name( special_armour_type sparm, bool terse )
+const char* armour_ego_name(const item_def& item, bool terse)
{
if (!terse)
{
- switch ( sparm )
+ switch (get_armour_ego_type(item))
{
+ case SPARM_NORMAL: return "";
case SPARM_RUNNING: return "running";
case SPARM_FIRE_RESISTANCE: return "fire resistance";
case SPARM_COLD_RESISTANCE: return "cold resistance";
@@ -382,8 +383,9 @@ static const char* armour_ego_name( special_armour_type sparm, bool terse )
}
else
{
- switch (sparm)
+ switch (get_armour_ego_type(item))
{
+ case SPARM_NORMAL: return "";
case SPARM_RUNNING: return " {run}";
case SPARM_FIRE_RESISTANCE: return " {rF+}";
case SPARM_COLD_RESISTANCE: return " {rC+}";
@@ -1304,7 +1306,7 @@ std::string item_def::name_aux(description_level_type desc,
if (sub_type == ARM_NAGA_BARDING && sparm == SPARM_RUNNING)
buff << (terse ? "speed" : "speedy slithering");
else
- buff << armour_ego_name(sparm, terse);
+ buff << armour_ego_name(*this, terse);
}
}