void cMonster::AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, unsigned int a_LootingLevel) { MTRand r1; unsigned 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::AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, unsigned int a_LootingLevel) { MTRand r1; unsigned int Count = static_cast<unsigned int>(static_cast<unsigned long>(r1.randInt()) % 200); if (Count < (5 + a_LootingLevel)) { size_t Rare = static_cast<size_t>(r1.randInt()) % a_Items.Size(); a_Drops.push_back(a_Items.at(Rare)); } }