forked from mirror/openmw-tes3mp
Don't clamp disposition twice, clamping is already done inside getDerivedDisposition
This commit is contained in:
parent
102f9719f7
commit
a6e23d03d3
3 changed files with 3 additions and 4 deletions
|
@ -639,8 +639,7 @@ namespace MWGui
|
|||
{
|
||||
if(mMainWidget->getVisible() && mEnabled && mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
int disp = std::max(0, std::min(100,
|
||||
MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr)));
|
||||
int disp = MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr);
|
||||
mDispositionBar->setProgressRange(100);
|
||||
mDispositionBar->setProgressPosition(disp);
|
||||
mDispositionText->setCaption(MyGUI::utility::toString(disp)+std::string("/100"));
|
||||
|
|
|
@ -346,7 +346,7 @@ namespace MWGui
|
|||
else
|
||||
d = int(100 * (b - a) / a);
|
||||
|
||||
int clampedDisposition = std::max(0, std::min(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr),100));
|
||||
int clampedDisposition = MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr);
|
||||
|
||||
const MWMechanics::CreatureStats &sellerStats = mPtr.getClass().getCreatureStats(mPtr);
|
||||
const MWMechanics::CreatureStats &playerStats = player.getClass().getCreatureStats(player);
|
||||
|
|
|
@ -672,7 +672,7 @@ namespace MWMechanics
|
|||
|
||||
// I suppose the temporary disposition change (second param to getDerivedDisposition()) _has_ to be considered here,
|
||||
// otherwise one would get different prices when exiting and re-entering the dialogue window...
|
||||
int clampedDisposition = std::max(0, std::min(getDerivedDisposition(ptr),100));
|
||||
int clampedDisposition = getDerivedDisposition(ptr);
|
||||
float a = static_cast<float>(std::min(playerStats.getSkill(ESM::Skill::Mercantile).getModified(), 100));
|
||||
float b = std::min(0.1f * playerStats.getAttribute(ESM::Attribute::Luck).getModified(), 10.f);
|
||||
float c = std::min(0.2f * playerStats.getAttribute(ESM::Attribute::Personality).getModified(), 10.f);
|
||||
|
|
Loading…
Reference in a new issue