diff options
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) |