From 15a46024828aa7bfca3663aceea836d66cabf8eb Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 30 Sep 2016 07:15:03 +0300 Subject: [PATCH] Add getSkillIncrease, setSkillIncrease functions to OpenMW's NpcStats --- apps/openmw/mwmechanics/npcstats.cpp | 12 ++++++++++++ apps/openmw/mwmechanics/npcstats.hpp | 3 +++ 2 files changed, 15 insertions(+) diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index 86ac2968b..724e08798 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -290,6 +290,18 @@ void MWMechanics::NpcStats::setLevelProgress(int value) mLevelProgress = value; } +// Added by tes3mp +int MWMechanics::NpcStats::getSkillIncrease(int attribute) const +{ + return mSkillIncreases[attribute]; +} + +// Added by tes3mp +void MWMechanics::NpcStats::setSkillIncrease(int attribute, int value) +{ + mSkillIncreases[attribute] = value; +} + void MWMechanics::NpcStats::levelUp() { const MWWorld::Store &gmst = diff --git a/apps/openmw/mwmechanics/npcstats.hpp b/apps/openmw/mwmechanics/npcstats.hpp index 991866805..42aa2ca1e 100644 --- a/apps/openmw/mwmechanics/npcstats.hpp +++ b/apps/openmw/mwmechanics/npcstats.hpp @@ -86,6 +86,9 @@ namespace MWMechanics int getLevelProgress() const; void setLevelProgress(int value); // Added by tes3mp + int getSkillIncrease(int attribute) const; // Added by tes3mp + void setSkillIncrease(int attribute, int value); // Added by tes3mp + int getLevelupAttributeMultiplier(int attribute) const; int getSkillIncreasesForSpecialization(int spec) const;