From 2f768a34f72560ee8b2934228f548a4909533887 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Jun 2017 01:00:01 +0300 Subject: Rename player_relations into playerRelations. --- src/being/being.cpp | 18 +++++++++--------- src/being/localplayer.cpp | 4 ++-- src/being/playerrelations.cpp | 4 ++-- src/being/playerrelations.h | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index deac96e2c..97492d431 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2461,7 +2461,7 @@ void Being::showName() restrict2 delete2(mDispName); - if (mHideErased && player_relations.getRelation(mName) == Relation::ERASED) + if (mHideErased && playerRelations.getRelation(mName) == Relation::ERASED) return; std::string displayName(mName); @@ -2488,7 +2488,7 @@ void Being::showName() restrict2 font = boldFont; } else if (mType == ActorType::Player - && !player_relations.isGoodName(this) && (gui != nullptr)) + && !playerRelations.isGoodName(this) && (gui != nullptr)) { font = gui->getSecureFont(); } @@ -2573,7 +2573,7 @@ void Being::updateColors() { mTextColor = &theme->getColor(ThemeColorId::PLAYER, 255); - if (player_relations.getRelation(mName) != Relation::ERASED) + if (playerRelations.getRelation(mName) != Relation::ERASED) mErased = false; else mErased = true; @@ -2597,24 +2597,24 @@ void Being::updateColors() { mNameColor = &userPalette->getColor(UserColorId::GUILD); } - else if (player_relations.getRelation(mName) == Relation::FRIEND) + else if (playerRelations.getRelation(mName) == Relation::FRIEND) { mNameColor = &userPalette->getColor(UserColorId::FRIEND); } - else if (player_relations.getRelation(mName) == + else if (playerRelations.getRelation(mName) == Relation::DISREGARDED - || player_relations.getRelation(mName) == + || playerRelations.getRelation(mName) == Relation::BLACKLISTED) { mNameColor = &userPalette->getColor(UserColorId::DISREGARDED); } - else if (player_relations.getRelation(mName) + else if (playerRelations.getRelation(mName) == Relation::IGNORED || - player_relations.getRelation(mName) == Relation::ENEMY2) + playerRelations.getRelation(mName) == Relation::ENEMY2) { mNameColor = &userPalette->getColor(UserColorId::IGNORED); } - else if (player_relations.getRelation(mName) == Relation::ERASED) + else if (playerRelations.getRelation(mName) == Relation::ERASED) { mNameColor = &userPalette->getColor(UserColorId::ERASED); } diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 5c275b3f6..e2b126065 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2742,10 +2742,10 @@ bool LocalPlayer::checAttackPermissions(const Being *const target) case 0: return true; case 1: - return !(player_relations.getRelation(target->mName) + return !(playerRelations.getRelation(target->mName) == Relation::FRIEND); case 2: - return player_relations.checkBadRelation(target->mName); + return playerRelations.checkBadRelation(target->mName); default: case 3: return false; diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp index e45376137..690665b15 100644 --- a/src/being/playerrelations.cpp +++ b/src/being/playerrelations.cpp @@ -455,7 +455,7 @@ void PlayerRelationsManager::ignoreTrade(const std::string &name) const } else { - player_relations.setRelation(name, Relation::BLACKLISTED); + playerRelations.setRelation(name, Relation::BLACKLISTED); } } @@ -661,4 +661,4 @@ bool PlayerRelationsManager::checkName(const std::string &name) } } -PlayerRelationsManager player_relations; +PlayerRelationsManager playerRelations; diff --git a/src/being/playerrelations.h b/src/being/playerrelations.h index ae2e08dae..c9e5952f2 100644 --- a/src/being/playerrelations.h +++ b/src/being/playerrelations.h @@ -206,8 +206,8 @@ class PlayerRelationsManager final }; -extern PlayerRelationsManager player_relations; // singleton representation - // of player relations +extern PlayerRelationsManager playerRelations; // singleton representation + // of player relations #endif // BEING_PLAYERRELATIONS_H -- cgit v1.2.3-60-g2f50