summaryrefslogtreecommitdiff
path: root/src/playerinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerinfo.cpp')
-rw-r--r--src/playerinfo.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index b54f6c671..af4ed6837 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -106,6 +106,20 @@ void setAttribute(const int id, const int value, const bool notify)
triggerAttr(id, old);
}
+int getSkillLevel(const int id)
+{
+ const IntMap::const_iterator it = mData.mSkills.find(id);
+ if (it != mData.mSkills.end())
+ return it->second;
+ else
+ return 0;
+}
+
+void setSkillLevel(const int id, const int value)
+{
+ mData.mSkills[id] = value;
+}
+
// --- Stats ------------------------------------------------------------------
int getStatBase(const int id)
@@ -367,6 +381,11 @@ void deinit()
mListener = nullptr;
}
+void clear()
+{
+ mData.mSkills.clear();
+}
+
bool isTalking()
{
return NpcDialog::isActive() || NpcPostDialog::isActive()