From 8be650bff5c7b6d5795cf4f1f76b7ee436c155f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Feb 2016 22:18:17 +0300 Subject: Add extended name to beings (raw server name). --- src/being/being.cpp | 2 ++ src/being/being.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/being/being.cpp b/src/being/being.cpp index 5b7bd96bd..df52f7793 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -152,6 +152,7 @@ Being::Being(const BeingId id, mBadges(), mSpriteAction(SpriteAction::STAND), mName(), + mExtName(), mRaceName(), mPartyName(), mGuildName(), @@ -1063,6 +1064,7 @@ void Being::showNameBadge(const bool show) restrict2 void Being::setName(const std::string &restrict name) restrict2 { + mExtName = name; if (mType == ActorType::Npc) { mName = name.substr(0, name.find('#', 0)); diff --git a/src/being/being.h b/src/being/being.h index ed6a17fac..8c518cf26 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -211,6 +211,9 @@ class Being notfinal : public ActorSprite, const std::string &getName() const restrict2 noexcept A_WARN_UNUSED { return mName; } + const std::string &getExtName() const restrict2 noexcept A_WARN_UNUSED + { return mExtName; } + /** * Sets the name for the being. * @@ -1019,7 +1022,8 @@ class Being notfinal : public ActorSprite, AnimatedSprite *restrict mBadges[BadgeIndex::BadgeIndexSize]; std::string mSpriteAction; - std::string mName; /**< Name of character */ + std::string mName; /**< Name of being */ + std::string mExtName; /**< Full name of being */ std::string mRaceName; std::string mPartyName; std::string mGuildName; -- cgit v1.2.3-60-g2f50