Drop Chance of Rare Items

Drop Chance of Rare Items

If I got the code right,
in

LootManager::checkLoot

the line

real_chance = static_cast<int>(static_cast<float>(ec->z) * static_cast<float>(pc->stats.get(Stats::ITEM_FIND) + 100) / 100.f);

truncates the player's 'Item Find Chance' ruthlessly, if the ec->z is small.
I guess this is not intended.

Example:
unique item: ec->z == 1
then:
'Item Find Chance' == 155% -> real_chance == trunc(2.55) == 2
'Item Find Chance' == 100% -> real_chance == trunc(2.0) == 2

where this is later checked against

int chance = Math::randBetween(1,100);

(for items with a higher drop chance, this truncation is less coarse,
but still the resolution of 0.05 for that property is not respected.
)

---

possible fix:
int chance = Math::randBetween(1,100*100);

real_chance = static_cast<int>(static_cast<float>(ec->z) * static_cast<float>(pc->stats.get(Stats::ITEM_FIND) + 100));
// (dropping the division by 100.f )

and in subsequent lines multiply all numbers with 100 etc.