Advertisement
Guest User

it's not a bug it's a feature

a guest
Aug 1st, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 KB | None | 0 0
  1. diff --git a/apps/openmw/mwgui/trainingwindow.cpp b/apps/openmw/mwgui/trainingwindow.cpp
  2. index 04b051e16..b03e93caa 100644
  3. --- a/apps/openmw/mwgui/trainingwindow.cpp
  4. +++ b/apps/openmw/mwgui/trainingwindow.cpp
  5. @@ -80,7 +80,7 @@ namespace MWGui
  6.  
  7. for (int i=0; i<ESM::Skill::Length; ++i)
  8. {
  9. - int value = npcStats.getSkill (i).getBase ();
  10. + int value = npcStats.getSkill (i).getModified ();
  11.  
  12. skills.push_back(std::make_pair(i, value));
  13. }
  14. @@ -98,7 +98,7 @@ namespace MWGui
  15. for (int i=0; i<3; ++i)
  16. {
  17. int price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer
  18. - (mPtr,pcStats.getSkill (skills[i].first).getBase() * gmst.find("iTrainingMod")->getInt (),true);
  19. + (mPtr,pcStats.getSkill (skills[i].first).getModified() * gmst.find("iTrainingMod")->getInt (),true);
  20.  
  21. MyGUI::Button* button = mTrainingOptions->createWidget<MyGUI::Button>(price <= playerGold ? "SandTextButton" : "SandTextButtonDisabled", // can't use setEnabled since that removes tooltip
  22. MyGUI::IntCoord(5, 5+i*18, mTrainingOptions->getWidth()-10, 18), MyGUI::Align::Default);
  23. @@ -136,14 +136,14 @@ namespace MWGui
  24. const MWWorld::ESMStore &store =
  25. MWBase::Environment::get().getWorld()->getStore();
  26.  
  27. - int price = pcStats.getSkill (skillId).getBase() * store.get<ESM::GameSetting>().find("iTrainingMod")->getInt ();
  28. + int price = pcStats.getSkill (skillId).getModified() * store.get<ESM::GameSetting>().find("iTrainingMod")->getInt ();
  29. price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr,price,true);
  30.  
  31. if (price > player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId))
  32. return;
  33.  
  34. MWMechanics::NpcStats& npcStats = mPtr.getClass().getNpcStats (mPtr);
  35. - if (npcStats.getSkill (skillId).getBase () <= pcStats.getSkill (skillId).getBase ())
  36. + if (npcStats.getSkill (skillId).getModified () < pcStats.getSkill (skillId).getModified ())
  37. {
  38. MWBase::Environment::get().getWindowManager()->messageBox ("#{sServiceTrainingWords}");
  39. return;
  40. @@ -151,7 +151,7 @@ namespace MWGui
  41.  
  42. // You can not train a skill above its governing attribute
  43. const ESM::Skill* skill = MWBase::Environment::get().getWorld()->getStore().get<ESM::Skill>().find(skillId);
  44. - if (pcStats.getSkill(skillId).getBase() >= pcStats.getAttribute(skill->mData.mAttribute).getBase())
  45. + if (pcStats.getSkill(skillId).getModified() >= pcStats.getAttribute(skill->mData.mAttribute).getModified())
  46. {
  47. MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage17}");
  48. return;
  49. diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp
  50. index f0fc7fb6e..9baf3b292 100644
  51. --- a/apps/openmw/mwmechanics/npcstats.cpp
  52. +++ b/apps/openmw/mwmechanics/npcstats.cpp
  53. @@ -218,10 +218,11 @@ void MWMechanics::NpcStats::increaseSkill(int skillIndex, const ESM::Class &clas
  54. {
  55. int base = getSkill (skillIndex).getBase();
  56.  
  57. - if (base >= 100)
  58. - return;
  59. -
  60. - base += 1;
  61. + if (base < 100) {
  62. + base += 1;
  63. + } else {
  64. + base = 100;
  65. + }
  66.  
  67. const MWWorld::Store<ESM::GameSetting> &gmst =
  68. MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
  69. diff --git a/apps/openmw/mwmechanics/spells.cpp b/apps/openmw/mwmechanics/spells.cpp
  70. index ff397f69d..292883cda 100644
  71. --- a/apps/openmw/mwmechanics/spells.cpp
  72. +++ b/apps/openmw/mwmechanics/spells.cpp
  73. @@ -138,10 +138,7 @@ namespace MWMechanics
  74. for (MagicEffects::Collection::const_iterator effectIt = effects.begin(); effectIt != effects.end();)
  75. {
  76. const ESM::MagicEffect * magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->first.mId);
  77. - if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful)
  78. - effects.remove((effectIt++)->first);
  79. - else
  80. - ++effectIt;
  81. + effects.remove((effectIt++)->first);
  82. }
  83. }
  84. mCorprusSpells.erase(corprusIt);
  85. diff --git a/files/mygui/openmw_edit_effect.layout b/files/mygui/openmw_edit_effect.layout
  86. index 376e87efa..bcd39c50f 100644
  87. --- a/files/mygui/openmw_edit_effect.layout
  88. +++ b/files/mygui/openmw_edit_effect.layout
  89. @@ -38,7 +38,7 @@
  90. <Property key="Caption" value="0"/>
  91. </Widget>
  92. <Widget type="MWScrollBar" skin="MW_HScroll" position="122 20 210 13" name="MagnitudeMinSlider">
  93. - <Property key="Range" value="100"/>
  94. + <Property key="Range" value="500"/>
  95. <Property key="Page" value="1"/>
  96. </Widget>
  97.  
  98. @@ -47,7 +47,7 @@
  99. <Property key="Caption" value="0"/>
  100. </Widget>
  101. <Widget type="MWScrollBar" skin="MW_HScroll" position="122 52 210 13" name="MagnitudeMaxSlider">
  102. - <Property key="Range" value="100"/>
  103. + <Property key="Range" value="500"/>
  104. <Property key="Page" value="1"/>
  105. </Widget>
  106. </Widget>
  107. @@ -68,7 +68,7 @@
  108. <Property key="Caption" value="0"/>
  109. </Widget>
  110. <Widget type="MWScrollBar" skin="MW_HScroll" position="122 20 210 13" name="DurationSlider">
  111. - <Property key="Range" value="1440"/>
  112. + <Property key="Range" value="300"/>
  113. <Property key="Page" value="1"/>
  114. </Widget>
  115. </Widget>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement