MCPcopy Create free account
hub / github.com/cuberite/cuberite / AddRandomRareDropItem

Method AddRandomRareDropItem

src/Mobs/Monster.cpp:909–918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

907
908
909void cMonster::AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, short a_LootingLevel)
910{
911 MTRand r1;
912 int Count = r1.randInt() % 200;
913 if (Count < (5 + a_LootingLevel))
914 {
915 int Rare = r1.randInt() % a_Items.Size();
916 a_Drops.push_back(a_Items.at(Rare));
917 }
918}
919
920
921

Callers

nothing calls this directly

Calls 2

randIntMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected