summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-21 13:44:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-21 13:44:03 +0300
commit46d1266f00dfde5d04d7980daea4bab02e77cb69 (patch)
treeadfaa8bdc5b96bf951de15119b1a0854e2eedc9f /src/being/playerinfo.cpp
parentba88670fe4b5f4606f80651f6433cc755ab6b6c1 (diff)
downloadManaVerse-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.gz
ManaVerse-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.bz2
ManaVerse-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.xz
ManaVerse-46d1266f00dfde5d04d7980daea4bab02e77cb69.zip
Use MercenaryInfo object for storing mercenary attributes.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 6ab9015e6..993c4d8a6 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -26,6 +26,7 @@
#include "inventory.h"
#include "being/attributes.h"
+#include "being/mercenaryinfo.h"
#include "itemsoundmanager.h"
@@ -53,6 +54,7 @@ int mCharId = 0;
Inventory *mInventory = nullptr;
Equipment *mEquipment = nullptr;
+MercenaryInfo *mMercenary = nullptr;
bool mTrading = false;
int mLevelProgress = 0;
@@ -388,6 +390,7 @@ void init()
void deinit()
{
clearInventory();
+ delete2(mMercenary);
}
void loadData()
@@ -462,4 +465,16 @@ bool isItemProtected(const int id)
return mProtectedItems.find(id) != mProtectedItems.end();
}
+void setMercenary(MercenaryInfo *const info)
+{
+ if (mMercenary)
+ delete mMercenary;
+ mMercenary = info;
+}
+
+MercenaryInfo *getMercenary()
+{
+ return mMercenary;
+}
+
} // namespace PlayerInfo