diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-13 07:16:41 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-13 07:16:41 -0600 |
commit | f19d3f4db065472141b9c6bdf63726138006cb14 (patch) | |
tree | 9aee8f8bfda85bbe600c1fd2cbe8c6deba0acf61 /src | |
parent | 92c331d47a2559b6a820395b95446d4fba3f3eee (diff) | |
download | mana-f19d3f4db065472141b9c6bdf63726138006cb14.tar.gz mana-f19d3f4db065472141b9c6bdf63726138006cb14.tar.bz2 mana-f19d3f4db065472141b9c6bdf63726138006cb14.tar.xz mana-f19d3f4db065472141b9c6bdf63726138006cb14.zip |
Add GM notification handling
Diffstat (limited to 'src')
-rw-r--r-- | src/localplayer.cpp | 8 | ||||
-rw-r--r-- | src/localplayer.h | 4 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index cb900b98..c1423190 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -241,6 +241,14 @@ void LocalPlayer::setGM(bool gm) mIsGM = gm; } +void LocalPlayer::setGMLevel(int level) +{ + mGMLevel = level; + + if (level > 0) + setGM(true); +} + void LocalPlayer::setName(const std::string &name) { if (mName) diff --git a/src/localplayer.h b/src/localplayer.h index 39f438d1..add5c049 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -225,6 +225,8 @@ class LocalPlayer : public Player */ virtual void setGM(bool gm); + void setGMLevel(int level); + void stopAttack(); /** @@ -458,6 +460,8 @@ class LocalPlayer : public Player int mHp; int mMaxHp; + int mGMLevel; + Being *mTarget; FloorItem *mPickUpTarget; diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 29f0bac4..b7131f0a 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -262,6 +262,7 @@ void PlayerHandler::handleMessage(MessageIn &msg) case 0x0032: player_node->FLEE = value; break; case 0x0035: player_node->mAttackSpeed = value; break; case 0x0037: player_node->mJobLevel = value; break; + case 500: player_node->setGMLevel(value); break; } if (player_node->getHp() == 0 && !deathNotice) |