summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp
index f658b8b5..453b8bdd 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -31,7 +31,6 @@
#include "text.h"
#include "gui/palette.h"
-#include "gui/partywindow.h"
#include "resources/colordb.h"
#include "resources/itemdb.h"
@@ -77,7 +76,11 @@ void Player::setName(const std::string &name)
{
color = &guiPalette->getColor(Palette::SELF);
}
- else if (partyWindow->findMember(getId()))
+ else if (mIsGM)
+ {
+ color = &guiPalette->getColor(Palette::GM);
+ }
+ else if (mInParty)
{
color = &guiPalette->getColor(Palette::PARTY);
}
@@ -301,9 +304,15 @@ short Player::getNumberOfGuilds()
#endif
-void Player::setInParty(bool value)
+void Player::setInParty(bool inParty)
{
- mInParty = value;
+ mInParty = inParty;
+
+ if (this != player_node && mName)
+ {
+ Palette::ColorType colorType = mInParty ? Palette::PARTY : Palette::PC;
+ mName->setColor(&guiPalette->getColor(colorType));
+ }
}
void Player::optionChanged(const std::string &value)