summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Sheep.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-04 14:02:18 +0200
committermadmaxoft <github@xoft.cz>2014-09-04 14:02:18 +0200
commit3297a39c2709cacfd8d66dab80f2935018711890 (patch)
tree861a0ea04249e8a64201dec2ce03177f5e2eed1a /src/Mobs/Sheep.cpp
parentDebuggers: Reviewed and fixed the Pickups and Poof commands. (diff)
parentAnvil: Cleanly refuse to store data that is too large. (diff)
downloadcuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.gz
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.bz2
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.lz
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.xz
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.tar.zst
cuberite-3297a39c2709cacfd8d66dab80f2935018711890.zip
Diffstat (limited to 'src/Mobs/Sheep.cpp')
-rw-r--r--src/Mobs/Sheep.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 9fb47201d..1a82115d2 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -39,6 +39,13 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
a_Drops.push_back(cItem(E_BLOCK_WOOL, 1, m_WoolColor));
}
+
+ int LootingLevel = 0;
+ if (a_Killer != NULL)
+ {
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
+ }
+ AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_MUTTON : E_ITEM_RAW_MUTTON);
}