summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-22 14:45:50 +0100
committerMattes D <github@xoft.cz>2014-12-22 14:45:50 +0100
commitf3268612fdc0cc33288dc180df0b0bd3d7ae3539 (patch)
treef2bf7a2cdf37eeb6f3508acbab224ac53b91c8f7
parentProtoProxy: Added a sanity check to metadata string lengths. (diff)
parentFix compile error on OS X introduced by commit ecf778bbec2794562bf5e5b8645e2171f7cd081c (diff)
downloadcuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar.gz
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar.bz2
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar.lz
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar.xz
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.tar.zst
cuberite-f3268612fdc0cc33288dc180df0b0bd3d7ae3539.zip
Diffstat (limited to '')
-rw-r--r--src/Enchantments.cpp15
-rw-r--r--src/Enchantments.h1
-rw-r--r--src/World.cpp2
3 files changed, 17 insertions, 1 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp
index e72ec668a..5ed18de6b 100644
--- a/src/Enchantments.cpp
+++ b/src/Enchantments.cpp
@@ -183,6 +183,7 @@ int cEnchantments::StringToEnchantmentID(const AString & a_EnchantmentName)
{ enchRespiration, "Respiration"},
{ enchAquaAffinity, "AquaAffinity"},
{ enchThorns, "Thorns"},
+ { enchDepthStrider, "DepthStrider"},
{ enchSharpness, "Sharpness"},
{ enchSmite, "Smite"},
{ enchBaneOfArthropods, "BaneOfArthropods"},
@@ -506,6 +507,20 @@ void cEnchantments::AddItemEnchantmentWeights(cWeightedEnchantments & a_Enchantm
{
AddEnchantmentWeightToVector(a_Enchantments, 5, enchFeatherFalling, 1);
}
+
+ // Depth Strider
+ if ((a_EnchantmentLevel >= 30) && (a_EnchantmentLevel <= 45))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 3);
+ }
+ else if ((a_EnchantmentLevel >= 20) && (a_EnchantmentLevel <= 35))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 2);
+ }
+ else if ((a_EnchantmentLevel >= 10) && (a_EnchantmentLevel <= 25))
+ {
+ AddEnchantmentWeightToVector(a_Enchantments, 2, enchDepthStrider, 1);
+ }
}
}
diff --git a/src/Enchantments.h b/src/Enchantments.h
index 31226b5c2..e8e84d43c 100644
--- a/src/Enchantments.h
+++ b/src/Enchantments.h
@@ -53,6 +53,7 @@ public:
enchRespiration = 5,
enchAquaAffinity = 6,
enchThorns = 7,
+ enchDepthStrider = 8,
enchSharpness = 16,
enchSmite = 17,
enchBaneOfArthropods = 18,
diff --git a/src/World.cpp b/src/World.cpp
index cd17cde08..ae739a2c3 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -279,8 +279,8 @@ cWorld::cWorld(const AString & a_WorldName, eDimension a_Dimension, const AStrin
m_WorldAge(0),
m_TimeOfDay(0),
m_LastTimeUpdate(0),
- m_LastSave(0),
m_LastUnload(0),
+ m_LastSave(0),
m_SkyDarkness(0),
m_GameMode(gmNotSet),
m_bEnabledPVP(false),