diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/playerinfo.cpp | 16 | ||||
-rw-r--r-- | src/being/playerinfo.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index cfeb56a28..687ab5382 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -60,6 +60,7 @@ Inventory *mCartInventory = nullptr; MercenaryInfo *mMercenary = nullptr; HomunculusInfo *mHomunculus = nullptr; PetInfo *mPet = nullptr; +std::string mRoomName; #endif Equipment *mEquipment = nullptr; int mPetBeingId = 0; @@ -575,6 +576,21 @@ void updateAttackAi(const int targetId, const bool keep) if (mHomunculus) homunculusHandler->attack(targetId, keep); } + +std::string getRoomName() +{ + return mRoomName; +} + +void setRoomName(const std::string &name) +{ + mRoomName = name; +} + +bool isInRoom() +{ + return !mRoomName.empty(); +} #endif void setGuildPositionFlags(const GuildPositionFlags::Type pos) diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 20da29e44..c0932cfb8 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -267,6 +267,12 @@ namespace PlayerInfo void updateMoveAI(); void updateAttackAi(const int targetId, const bool keep); + + std::string getRoomName(); + + void setRoomName(const std::string &name); + + bool isInRoom(); #endif void setGuildPositionFlags(const GuildPositionFlags::Type pos); |