summaryrefslogtreecommitdiff
path: root/src/store.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commit8bbf783ead4517465445272f9144cf06bdac9be7 (patch)
tree9fa9cc4de0c53df33c557d66a9efbc6781f6fb94 /src/store.cc
parent013e27d39ee8ee513208d2855c7e3f6252f0c0bf (diff)
Refactor object_type 'artifact name' field to std::string
We don't really need quarks for this since we're not nearly as memory-constrained these days.
Diffstat (limited to 'src/store.cc')
-rw-r--r--src/store.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/store.cc b/src/store.cc
index 71d6b2d0..a518677b 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -452,7 +452,7 @@ static void mass_produce(object_type *o_ptr)
}
- if (o_ptr->art_name)
+ if (!o_ptr->artifact_name.empty())
{
if (options->cheat_peek && discount)
{
@@ -510,7 +510,8 @@ static bool_ store_object_similar(object_type const *o_ptr, object_type *j_ptr)
if (o_ptr->name2b != j_ptr->name2b) return (0);
/* Random artifacts don't stack !*/
- if (o_ptr->art_name || j_ptr->art_name) return (0);
+ if (!o_ptr->artifact_name.empty()) return 0;
+ if (!j_ptr->artifact_name.empty()) return 0;
/* Hack -- Identical art_flags! */
if (o_ptr->art_flags != j_ptr->art_flags)
@@ -3396,7 +3397,7 @@ void store_shuffle(int which)
auto o_ptr = &o_ref;
/* Hack -- Sell all old items for "half price" */
- if (!(o_ptr->art_name))
+ if (o_ptr->artifact_name.empty())
o_ptr->discount = 50;
/* Mega-Hack -- Note that the item is "on sale" */