summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-12-27 16:40:20 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-12-27 16:40:20 +0300
commit0fe55b6adbe990a2321dfc9b50e862da27186759 (patch)
tree34f8866eb66d4000a07d97bcde8892944771715a /crawl-ref/source/mapdef.cc
parent191aad1fa653d19020b28368bf7423d4b44c38c7 (diff)
downloadcrawl-ref-0fe55b6adbe990a2321dfc9b50e862da27186759.tar.gz
crawl-ref-0fe55b6adbe990a2321dfc9b50e862da27186759.zip
Use strip_tag for cursed/randart/damaged in parse_single_spec.
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 060ec78677..5eda9e7792 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -3898,20 +3898,17 @@ item_spec item_list::parse_single_spec(std::string s)
}
}
- if (s.find("damaged ") == 0)
+ if (strip_tag(s, "damaged"))
{
result.level = ISPEC_DAMAGED;
- s = s.substr(8);
}
- if (s.find("cursed ") == 0)
+ if (strip_tag(s, "cursed"))
{
result.level = ISPEC_BAD; // damaged + cursed, actually
- s = s.substr(7);
}
- if (s.find("randart ") == 0)
+ if (strip_tag(s, "randart"))
{
result.level = ISPEC_RANDART;
- s = s.substr(8);
}
if (strip_tag(s, "no_uniq"))