diff options
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r-- | src/being/playerinfo.cpp | 15 |
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 |