summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index e38e60026..944a05cb8 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -1455,6 +1455,20 @@ void Being::flashName(int time)
mDispName->flash(time);
}
+std::string Being::getGenderSign() const
+{
+ if (config.getBoolValue("showgender"))
+ {
+ if (getGender() == GENDER_FEMALE)
+ return "\u2640";
+ else if (getGender() == GENDER_MALE)
+ return "\u2642";
+ else
+ return "";
+ }
+ return "";
+}
+
void Being::showName()
{
delete mDispName;
@@ -1469,13 +1483,7 @@ void Being::showName()
if (config.getBoolValue("showlevel") && getLevel() != 0)
mDisplayName += toString(getLevel());
- if (config.getBoolValue("showgender"))
- {
- if (getGender() == GENDER_FEMALE)
- mDisplayName += "\u2640";
- else if (getGender() == GENDER_MALE)
- mDisplayName += "\u2642";
- }
+ mDisplayName += getGenderSign();
}
if (getType() == MONSTER)