forked from mirror/openmw-tes3mp
Make sure crime gold discounts don't reduce price to zero
This commit is contained in:
parent
1320ac6983
commit
63fd04882a
1 changed files with 7 additions and 1 deletions
|
@ -2589,6 +2589,12 @@ namespace MWWorld
|
||||||
int discount = bounty * fCrimeGoldDiscountMult;
|
int discount = bounty * fCrimeGoldDiscountMult;
|
||||||
int turnIn = bounty * fCrimeGoldTurnInMult;
|
int turnIn = bounty * fCrimeGoldTurnInMult;
|
||||||
|
|
||||||
|
if (bounty > 0)
|
||||||
|
{
|
||||||
|
discount = std::max(1, discount);
|
||||||
|
turnIn = std::max(1, turnIn);
|
||||||
|
}
|
||||||
|
|
||||||
mGlobalVariables["pchascrimegold"].setInteger((bounty <= playerGold) ? 1 : 0);
|
mGlobalVariables["pchascrimegold"].setInteger((bounty <= playerGold) ? 1 : 0);
|
||||||
|
|
||||||
mGlobalVariables["pchasgolddiscount"].setInteger((discount <= playerGold) ? 1 : 0);
|
mGlobalVariables["pchasgolddiscount"].setInteger((discount <= playerGold) ? 1 : 0);
|
||||||
|
|
Loading…
Reference in a new issue