summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.h
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-19 20:32:10 +0200
committertycho <work.tycho@gmail.com>2015-05-19 20:32:10 +0200
commit77f1f58c0a7eb55001b375f1945690ed5c1e87a2 (patch)
tree99e4b53b2966bd4d9bf545d18ddb7edb89472830 /src/Enchantments.h
parentAdded LuaState support for all integral types (diff)
downloadcuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.gz
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.bz2
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.lz
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.xz
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.zst
cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.zip
Diffstat (limited to '')
-rw-r--r--src/Enchantments.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Enchantments.h b/src/Enchantments.h
index 9d3f342d4..8c08e7a93 100644
--- a/src/Enchantments.h
+++ b/src/Enchantments.h
@@ -92,10 +92,10 @@ public:
AString ToString(void) const;
/** Returns the level for the specified enchantment; 0 if not stored */
- int GetLevel(int a_EnchantmentID) const;
+ unsigned int GetLevel(int a_EnchantmentID) const;
/** Sets the level for the specified enchantment, adding it if not stored before or removing it if level <= 0 */
- void SetLevel(int a_EnchantmentID, int a_Level);
+ void SetLevel(int a_EnchantmentID, unsigned int a_Level);
/** Removes all enchantments */
void Clear(void);
@@ -115,7 +115,7 @@ public:
static void AddItemEnchantmentWeights(cWeightedEnchantments & a_Enchantments, short a_ItemType, int a_EnchantmentLevel);
/** Add a enchantment with weight to the vector */
- static void AddEnchantmentWeightToVector(cWeightedEnchantments & a_Enchantments, int a_Weight, int a_EnchantmentID, int a_EnchantmentLevel);
+ static void AddEnchantmentWeightToVector(cWeightedEnchantments & a_Enchantments, int a_Weight, int a_EnchantmentID, unsigned int a_EnchantmentLevel);
/** Remove the entire enchantment (with weight) from the vector */
static void RemoveEnchantmentWeightFromVector(cWeightedEnchantments & a_Enchantments, int a_EnchantmentID);
@@ -145,7 +145,7 @@ public:
protected:
/** Maps enchantment ID -> enchantment level */
- typedef std::map<int, int> cMap;
+ typedef std::map<int, unsigned int> cMap;
/** Currently stored enchantments */
cMap m_Enchantments;