1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-11 06:40:34 +00:00

Another fix for trade exploit (hopefully the last: Fixes #1408)

This commit is contained in:
scrawl 2014-06-06 15:08:44 +02:00
parent f3cece8dec
commit 9627146bf4

View File

@ -345,7 +345,7 @@ namespace MWGui
x += abs(int(npcTerm - pcTerm)); x += abs(int(npcTerm - pcTerm));
int roll = std::rand()%100 + 1; int roll = std::rand()%100 + 1;
if(roll > x) //trade refused if(roll > x || (mCurrentMerchantOffer < 0) != (mCurrentBalance < 0)) //trade refused
{ {
MWBase::Environment::get().getWindowManager()-> MWBase::Environment::get().getWindowManager()->
messageBox("#{sNotifyMessage9}"); messageBox("#{sNotifyMessage9}");