summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 6c4e1c92d..4f40b2c58 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -26,6 +26,7 @@
#include "inventory.h"
#include "being/attributes.h"
+#include "being/homunculusinfo.h"
#include "being/localplayer.h"
#include "being/mercenaryinfo.h"
#include "being/petinfo.h"
@@ -57,6 +58,7 @@ int mCharId = 0;
Inventory *mInventory = nullptr;
Equipment *mEquipment = nullptr;
MercenaryInfo *mMercenary = nullptr;
+HomunculusInfo *mHomunculus = nullptr;
PetInfo *mPet = nullptr;
bool mTrading = false;
@@ -511,4 +513,24 @@ PetInfo *getPet()
return mPet;
}
+void setHomunculus(HomunculusInfo *const info)
+{
+ if (mHomunculus)
+ delete mHomunculus;
+ mHomunculus = info;
+}
+
+void setHomunculusBeing(Being *const being)
+{
+ if (!being || !mPet)
+ return;
+ being->setName(mHomunculus->name);
+ being->setOwner(localPlayer);
+}
+
+HomunculusInfo *getHomunculus()
+{
+ return mHomunculus;
+}
+
} // namespace PlayerInfo