|
|
|
@ -302,6 +302,9 @@ namespace MWGui
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Is the player buying?
|
|
|
|
|
bool buying = (mCurrentMerchantOffer < 0);
|
|
|
|
|
|
|
|
|
|
if(mCurrentBalance > mCurrentMerchantOffer)
|
|
|
|
|
{
|
|
|
|
|
//if npc is a creature: reject (no haggle)
|
|
|
|
@ -315,7 +318,7 @@ namespace MWGui
|
|
|
|
|
int a = abs(mCurrentMerchantOffer);
|
|
|
|
|
int b = abs(mCurrentBalance);
|
|
|
|
|
int d = 0;
|
|
|
|
|
if (mCurrentBalance<0)
|
|
|
|
|
if (buying)
|
|
|
|
|
d = int(100 * (a - b) / a);
|
|
|
|
|
else
|
|
|
|
|
d = int(100 * (b - a) / a);
|
|
|
|
@ -336,7 +339,7 @@ namespace MWGui
|
|
|
|
|
float pcTerm = (clampedDisposition - 50 + a1 + b1 + c1) * playerStats.getFatigueTerm();
|
|
|
|
|
float npcTerm = (d1 + e1 + f1) * sellerStats.getFatigueTerm();
|
|
|
|
|
float x = gmst.find("fBargainOfferMulti")->getFloat() * d + gmst.find("fBargainOfferBase")->getFloat();
|
|
|
|
|
if (mCurrentBalance<0)
|
|
|
|
|
if (buying)
|
|
|
|
|
x += abs(int(pcTerm - npcTerm));
|
|
|
|
|
else
|
|
|
|
|
x += abs(int(npcTerm - pcTerm));
|
|
|
|
|