Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/apps/openmw/mwgui/trainingwindow.cpp b/apps/openmw/mwgui/trainingwindow.cpp
- index 04b051e16..b03e93caa 100644
- --- a/apps/openmw/mwgui/trainingwindow.cpp
- +++ b/apps/openmw/mwgui/trainingwindow.cpp
- @@ -80,7 +80,7 @@ namespace MWGui
- for (int i=0; i<ESM::Skill::Length; ++i)
- {
- - int value = npcStats.getSkill (i).getBase ();
- + int value = npcStats.getSkill (i).getModified ();
- skills.push_back(std::make_pair(i, value));
- }
- @@ -98,7 +98,7 @@ namespace MWGui
- for (int i=0; i<3; ++i)
- {
- int price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer
- - (mPtr,pcStats.getSkill (skills[i].first).getBase() * gmst.find("iTrainingMod")->getInt (),true);
- + (mPtr,pcStats.getSkill (skills[i].first).getModified() * gmst.find("iTrainingMod")->getInt (),true);
- MyGUI::Button* button = mTrainingOptions->createWidget<MyGUI::Button>(price <= playerGold ? "SandTextButton" : "SandTextButtonDisabled", // can't use setEnabled since that removes tooltip
- MyGUI::IntCoord(5, 5+i*18, mTrainingOptions->getWidth()-10, 18), MyGUI::Align::Default);
- @@ -136,14 +136,14 @@ namespace MWGui
- const MWWorld::ESMStore &store =
- MWBase::Environment::get().getWorld()->getStore();
- - int price = pcStats.getSkill (skillId).getBase() * store.get<ESM::GameSetting>().find("iTrainingMod")->getInt ();
- + int price = pcStats.getSkill (skillId).getModified() * store.get<ESM::GameSetting>().find("iTrainingMod")->getInt ();
- price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr,price,true);
- if (price > player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId))
- return;
- MWMechanics::NpcStats& npcStats = mPtr.getClass().getNpcStats (mPtr);
- - if (npcStats.getSkill (skillId).getBase () <= pcStats.getSkill (skillId).getBase ())
- + if (npcStats.getSkill (skillId).getModified () < pcStats.getSkill (skillId).getModified ())
- {
- MWBase::Environment::get().getWindowManager()->messageBox ("#{sServiceTrainingWords}");
- return;
- @@ -151,7 +151,7 @@ namespace MWGui
- // You can not train a skill above its governing attribute
- const ESM::Skill* skill = MWBase::Environment::get().getWorld()->getStore().get<ESM::Skill>().find(skillId);
- - if (pcStats.getSkill(skillId).getBase() >= pcStats.getAttribute(skill->mData.mAttribute).getBase())
- + if (pcStats.getSkill(skillId).getModified() >= pcStats.getAttribute(skill->mData.mAttribute).getModified())
- {
- MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage17}");
- return;
- diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp
- index f0fc7fb6e..9baf3b292 100644
- --- a/apps/openmw/mwmechanics/npcstats.cpp
- +++ b/apps/openmw/mwmechanics/npcstats.cpp
- @@ -218,10 +218,11 @@ void MWMechanics::NpcStats::increaseSkill(int skillIndex, const ESM::Class &clas
- {
- int base = getSkill (skillIndex).getBase();
- - if (base >= 100)
- - return;
- -
- - base += 1;
- + if (base < 100) {
- + base += 1;
- + } else {
- + base = 100;
- + }
- const MWWorld::Store<ESM::GameSetting> &gmst =
- MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
- diff --git a/apps/openmw/mwmechanics/spells.cpp b/apps/openmw/mwmechanics/spells.cpp
- index ff397f69d..292883cda 100644
- --- a/apps/openmw/mwmechanics/spells.cpp
- +++ b/apps/openmw/mwmechanics/spells.cpp
- @@ -138,10 +138,7 @@ namespace MWMechanics
- for (MagicEffects::Collection::const_iterator effectIt = effects.begin(); effectIt != effects.end();)
- {
- const ESM::MagicEffect * magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->first.mId);
- - if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful)
- - effects.remove((effectIt++)->first);
- - else
- - ++effectIt;
- + effects.remove((effectIt++)->first);
- }
- }
- mCorprusSpells.erase(corprusIt);
- diff --git a/files/mygui/openmw_edit_effect.layout b/files/mygui/openmw_edit_effect.layout
- index 376e87efa..bcd39c50f 100644
- --- a/files/mygui/openmw_edit_effect.layout
- +++ b/files/mygui/openmw_edit_effect.layout
- @@ -38,7 +38,7 @@
- <Property key="Caption" value="0"/>
- </Widget>
- <Widget type="MWScrollBar" skin="MW_HScroll" position="122 20 210 13" name="MagnitudeMinSlider">
- - <Property key="Range" value="100"/>
- + <Property key="Range" value="500"/>
- <Property key="Page" value="1"/>
- </Widget>
- @@ -47,7 +47,7 @@
- <Property key="Caption" value="0"/>
- </Widget>
- <Widget type="MWScrollBar" skin="MW_HScroll" position="122 52 210 13" name="MagnitudeMaxSlider">
- - <Property key="Range" value="100"/>
- + <Property key="Range" value="500"/>
- <Property key="Page" value="1"/>
- </Widget>
- </Widget>
- @@ -68,7 +68,7 @@
- <Property key="Caption" value="0"/>
- </Widget>
- <Widget type="MWScrollBar" skin="MW_HScroll" position="122 20 210 13" name="DurationSlider">
- - <Property key="Range" value="1440"/>
- + <Property key="Range" value="300"/>
- <Property key="Page" value="1"/>
- </Widget>
- </Widget>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement