summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-09-03 08:21:08 +0200
committerarchshift <admin@archshift.com>2014-09-03 08:21:08 +0200
commit34d6f0713e94b5cb3424be6ed3374afaeca5526b (patch)
tree202e99e8d7e0f222d62e6fc7c6403b2853d12805 /src/Mobs
parentEntityEffect.cpp: Enable 1.8's leaping potion (diff)
downloadcuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar.gz
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar.bz2
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar.lz
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar.xz
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.tar.zst
cuberite-34d6f0713e94b5cb3424be6ed3374afaeca5526b.zip
Diffstat (limited to '')
-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..3be688b43 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);
}