From 87faf131575091160e9776c511e24b65e8b6b2e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Oct 2014 00:12:33 +0300 Subject: Disable char rename button if for selected char not allowed rename. --- src/being/localplayer.cpp | 3 ++- src/being/localplayer.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/being') diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index b747c78bd..e8cceadae 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -172,7 +172,8 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) : mKeepAttacking(false), mPathSetByMouse(false), mWaitPing(false), - mShowNavigePath(false) + mShowNavigePath(false), + mAllowRename(false) { logger->log1("LocalPlayer::LocalPlayer"); diff --git a/src/being/localplayer.h b/src/being/localplayer.h index ed2b42b53..bfec5ad58 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -403,6 +403,12 @@ class LocalPlayer final : public Being, AwayListener *getAwayListener() const A_WARN_UNUSED { return mAwayListener; } + void setRename(const bool r) + { mAllowRename = r; } + + bool getRename() const + { return mAllowRename; } + protected: void updateCoords() override final; @@ -510,6 +516,7 @@ class LocalPlayer final : public Being, bool mPathSetByMouse; bool mWaitPing; bool mShowNavigePath; + bool mAllowRename; }; extern LocalPlayer *localPlayer; -- cgit v1.2.3-70-g09d2