summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authorTheJumper <maximilian.springer@web.de>2014-02-21 18:45:00 +0100
committerTheJumper <maximilian.springer@web.de>2014-02-21 18:45:00 +0100
commit1b32b005626e7dd7e466358910d461bf5fb11a64 (patch)
tree28d1261dc2a00dff85c6a03328c3d78c3c4d8937 /src/Mobs/Monster.cpp
parentBlockBed.cpp: Fixed space at if statement (diff)
downloadcuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar.gz
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar.bz2
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar.lz
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar.xz
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.tar.zst
cuberite-1b32b005626e7dd7e466358910d461bf5fb11a64.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index b5cf693cb..66629474b 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -880,6 +880,35 @@ void cMonster::AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned
+void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short a_Item, short a_ItemHealth)
+{
+ MTRand r1;
+ int Count = r1.randInt() % 1000;
+ if (Count < (a_Chance*10))
+ {
+ a_Drops.push_back(cItem(a_Item, 1, a_ItemHealth));
+ }
+}
+
+
+
+
+
+void cMonster::AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, short a_LootingLevel)
+{
+ MTRand r1;
+ int Count = r1.randInt() % 200;
+ if (Count < (5 + a_LootingLevel))
+ {
+ int Rare = r1.randInt() % a_Items.Size();
+ a_Drops.push_back(a_Items.at(Rare));
+ }
+}
+
+
+
+
+
void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
{
if (!m_BurnsInDaylight)