summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-20 14:16:26 +0200
committermadmaxoft <github@xoft.cz>2014-04-21 10:31:30 +0200
commit7c6ef26be95c90ea6686840f1580953b2b8029a1 (patch)
tree4698f436b8c38ccbf5d70f960729ed0bdcbba66e /src/Enchantments.cpp
parentReplaced X.size() with X.empty(), where applicable. (diff)
downloadcuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar.gz
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar.bz2
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar.lz
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar.xz
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.tar.zst
cuberite-7c6ef26be95c90ea6686840f1580953b2b8029a1.zip
Diffstat (limited to '')
-rw-r--r--src/Enchantments.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp
index dad92dc91..64f89815b 100644
--- a/src/Enchantments.cpp
+++ b/src/Enchantments.cpp
@@ -29,6 +29,18 @@ cEnchantments::cEnchantments(const AString & a_StringSpec)
+void cEnchantments::Add(const cEnchantments & a_Other)
+{
+ for (cEnchantments::cMap::const_iterator itr = a_Other.m_Enchantments.begin(), end = a_Other.m_Enchantments.end(); itr != end; ++itr)
+ {
+ SetLevel(itr->first, itr->second);
+ } // for itr - a_Other.m_Enchantments[]
+}
+
+
+
+
+
void cEnchantments::AddFromString(const AString & a_StringSpec)
{
// Add enchantments in the stringspec; if a specified enchantment already exists, overwrites it