summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 15:34:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-05 16:25:18 +0300
commit08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f (patch)
tree7cd9be72ab884387173b2aaaa6421ebba7be1ed4 /src/being
parent05a196194b8270c1ae2e63f8ae31f8a492022388 (diff)
downloadmanaplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.gz
manaplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.bz2
manaplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.xz
manaplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.zip
On room creation show room name in general tab caption.
Not allow move if in room.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/playerinfo.cpp16
-rw-r--r--src/being/playerinfo.h6
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);