diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-12 19:32:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-12 21:12:24 +0300 |
commit | 03948f9bc58477100c61c11651290bee372dab5f (patch) | |
tree | 3714e87d59c3bca2ef02d1f405abba24f8bb9757 | |
parent | acedb80af76334b0e0acd877d3de0ab8ab46a576 (diff) | |
download | manaplus-03948f9bc58477100c61c11651290bee372dab5f.tar.gz manaplus-03948f9bc58477100c61c11651290bee372dab5f.tar.bz2 manaplus-03948f9bc58477100c61c11651290bee372dab5f.tar.xz manaplus-03948f9bc58477100c61c11651290bee372dab5f.zip |
Rename gm level into group id in localplayer.cpp
-rw-r--r-- | src/being/localplayer.cpp | 8 | ||||
-rw-r--r-- | src/being/localplayer.h | 8 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/playerrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index a9b76a10e..a5b5ce5fc 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -117,7 +117,7 @@ LocalPlayer::LocalPlayer(const BeingId id, AttributeListener(), PlayerDeathListener(), StatListener(), - mGMLevel(0), + mGroupId(0), mMoveState(0), mLastTargetX(0), mLastTargetY(0), @@ -416,11 +416,11 @@ void LocalPlayer::setAction(const BeingActionT &action, #endif // USE_MUMBLE } -void LocalPlayer::setGMLevel(const int level) +void LocalPlayer::setGroupId(const int id) { - mGMLevel = level; + mGroupId = id; - if (level > 0) + if (id > 0) { setGM(true); if (chatWindow != nullptr) diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 99cab9b55..7e77f5322 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -114,10 +114,10 @@ class LocalPlayer final : public Being, void attack2(Being *const target = nullptr, const bool keep = false, const bool dontChangeEquipment = false); - void setGMLevel(const int level); + void setGroupId(const int id); - int getGMLevel() const noexcept2 A_WARN_UNUSED - { return mGMLevel; } + int getGroupId() const noexcept2 A_WARN_UNUSED + { return mGroupId; } void stopAttack(const bool keepAttack = false); @@ -454,7 +454,7 @@ class LocalPlayer final : public Being, void loadHomes(); - int mGMLevel; + int mGroupId; // move state. used if mMoveType == 2 unsigned int mMoveState; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 279d1c712..0c7123631 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -2139,7 +2139,7 @@ void ChatWindow::showGMTab() { if ((gmChatTab == nullptr) && config.getBoolValue("enableGmTab") && - localPlayer->getGMLevel() >= paths.getIntValue("gmTabMinimalLevel")) + localPlayer->getGroupId() >= paths.getIntValue("gmTabMinimalLevel")) { addSpecialChannelTab(GM_CHANNEL, false); } diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 312dd488a..ec27469ad 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -357,7 +357,7 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event) // TRANSLATORS: status bar label level = strprintf(_("Level: %d (GM %d)"), PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL), - localPlayer->getGMLevel()); + localPlayer->getGroupId()); } else { diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 9fe112f78..5e79f6b73 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -264,7 +264,7 @@ void StatusWindow::updateLevelLabel() // TRANSLATORS: status window label mLvlLabel->setCaption(strprintf(_("Level: %d (GM %d)"), PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL), - localPlayer->getGMLevel())); + localPlayer->getGroupId())); } else { diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 2166205f6..f6153dee9 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1752,7 +1752,7 @@ void BeingRecv::processBeingAttrs(Net::MessageIn &msg) if (serverVersion <= 17 && dstBeing == localPlayer) { - localPlayer->setGMLevel(gmLevel); + localPlayer->setGroupId(gmLevel); } if (gmLevel != 0) dstBeing->setGM(true); diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp index d9674a90e..84dbeb5f3 100644 --- a/src/net/eathena/playerrecv.cpp +++ b/src/net/eathena/playerrecv.cpp @@ -488,7 +488,7 @@ void PlayerRecv::processPlayerAttrs(Net::MessageIn &msg) if (localPlayer == nullptr) return; - localPlayer->setGMLevel(gmLevel); + localPlayer->setGroupId(gmLevel); } } // namespace EAthena diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 0bfe06fd2..bf246b39e 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -408,7 +408,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg, PlayerInfo::setStatBase(Attributes::PLAYER_JOB, base); break; case Sp::GM_LEVEL: - localPlayer->setGMLevel(base); + localPlayer->setGroupId(base); break; default: |