mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:53:51 +00:00
Merge pull request #2369 from Capostrophic/magiceffect
Support negative effect magnitude in spell/ingredient/potion tooltips (bug #5018)
This commit is contained in:
commit
f49ca98c8c
2 changed files with 4 additions and 3 deletions
|
@ -86,6 +86,7 @@
|
|||
Bug #4999: Drop instruction behaves differently from vanilla
|
||||
Bug #5001: Possible data race in the Animation::setAlpha()
|
||||
Bug #5004: Werewolves shield their eyes during storm
|
||||
Bug #5018: Spell tooltips don't support purely negative magnitudes
|
||||
Feature #1774: Handle AvoidNode
|
||||
Feature #2229: Improve pathfinding AI
|
||||
Feature #3025: Analogue gamepad movement controls
|
||||
|
|
|
@ -408,7 +408,7 @@ namespace MWGui
|
|||
spellLine += " " + MWBase::Environment::get().getWindowManager()->getGameSettingString(ESM::Attribute::sGmstAttributeIds[mEffectParams.mAttribute], "");
|
||||
}
|
||||
|
||||
if (mEffectParams.mMagnMin >= 0 || mEffectParams.mMagnMax >= 0) {
|
||||
if (mEffectParams.mMagnMin || mEffectParams.mMagnMax) {
|
||||
ESM::MagicEffect::MagnitudeDisplayType displayType = magicEffect->getMagnitudeDisplayType();
|
||||
if ( displayType == ESM::MagicEffect::MDT_TimesInt ) {
|
||||
std::string timesInt = MWBase::Environment::get().getWindowManager()->getGameSettingString("sXTimesINT", "");
|
||||
|
@ -431,9 +431,9 @@ namespace MWGui
|
|||
else if ( displayType == ESM::MagicEffect::MDT_Feet )
|
||||
spellLine += " " + ft;
|
||||
else if ( displayType == ESM::MagicEffect::MDT_Level )
|
||||
spellLine += " " + ((mEffectParams.mMagnMin == 1 && mEffectParams.mMagnMax == 1) ? lvl : lvls );
|
||||
spellLine += " " + ((mEffectParams.mMagnMin == mEffectParams.mMagnMax && std::abs(mEffectParams.mMagnMin) == 1) ? lvl : lvls );
|
||||
else // ESM::MagicEffect::MDT_Points
|
||||
spellLine += " " + ((mEffectParams.mMagnMin == 1 && mEffectParams.mMagnMax == 1) ? pt : pts );
|
||||
spellLine += " " + ((mEffectParams.mMagnMin == mEffectParams.mMagnMax && std::abs(mEffectParams.mMagnMin) == 1) ? pt : pts );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue