diff options
author | Blue <bluesansdouze@gmail.com> | 2009-05-12 20:46:56 +0200 |
---|---|---|
committer | Blue <bluesansdouze@gmail.com> | 2009-05-12 20:46:56 +0200 |
commit | 9071a692116745f2cafd8556cbff28095910730e (patch) | |
tree | 6fbc96a1cb00558c4015d1eff25f45b2c6ccdcb8 /src/player.cpp | |
parent | 2e94f4e92821bad6ebb328d00b2bd918c4b1b99e (diff) | |
parent | 0257eaf4d3945eac7cb3e50ccf8dfef18fa29698 (diff) | |
download | mana-client-9071a692116745f2cafd8556cbff28095910730e.tar.gz mana-client-9071a692116745f2cafd8556cbff28095910730e.tar.bz2 mana-client-9071a692116745f2cafd8556cbff28095910730e.tar.xz mana-client-9071a692116745f2cafd8556cbff28095910730e.zip |
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 17 |
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) |