aboutsummaryrefslogtreecommitdiff
path: root/src/itemdef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/itemdef.cpp')
-rw-r--r--src/itemdef.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/itemdef.cpp b/src/itemdef.cpp
index df20bdf15..5fb1e4c47 100644
--- a/src/itemdef.cpp
+++ b/src/itemdef.cpp
@@ -62,6 +62,7 @@ ItemDefinition& ItemDefinition::operator=(const ItemDefinition &def)
type = def.type;
name = def.name;
description = def.description;
+ short_description = def.short_description;
inventory_image = def.inventory_image;
inventory_overlay = def.inventory_overlay;
wield_image = def.wield_image;
@@ -102,6 +103,7 @@ void ItemDefinition::reset()
type = ITEM_NONE;
name = "";
description = "";
+ short_description = "";
inventory_image = "";
inventory_overlay = "";
wield_image = "";
@@ -162,6 +164,8 @@ void ItemDefinition::serialize(std::ostream &os, u16 protocol_version) const
writeARGB8(os, color);
os << serializeString16(inventory_overlay);
os << serializeString16(wield_overlay);
+
+ os << serializeString16(short_description);
}
void ItemDefinition::deSerialize(std::istream &is)
@@ -213,8 +217,9 @@ void ItemDefinition::deSerialize(std::istream &is)
// If you add anything here, insert it primarily inside the try-catch
// block to not need to increase the version.
- //try {
- //} catch(SerializationError &e) {};
+ try {
+ short_description = deSerializeString16(is);
+ } catch(SerializationError &e) {};
}