summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-20 19:12:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-20 19:12:19 +0300
commitebd21ed95b475d7a411bc6d341fb287b0c125509 (patch)
treeb5db0bb229e36866f0ea546f2f99527259205c9a /src/being
parent709c0c8aa1cadef919a106f3c0b83a3b41f5ac1e (diff)
downloadplus-ebd21ed95b475d7a411bc6d341fb287b0c125509.tar.gz
plus-ebd21ed95b475d7a411bc6d341fb287b0c125509.tar.bz2
plus-ebd21ed95b475d7a411bc6d341fb287b0c125509.tar.xz
plus-ebd21ed95b475d7a411bc6d341fb287b0c125509.zip
Remove mercenary skills if mercenary was removed.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp1
-rw-r--r--src/being/localplayer.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 30e323d7e..062a06678 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -153,6 +153,7 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
mTestParticleName(),
mTestParticleTime(0),
mTestParticleHash(0L),
+ mMercenaryId(0),
mWalkingDir(0),
mUpdateName(true),
mBlockAdvert(false),
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index ed2b42b53..d90e94dc1 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 setMercenary(const int id)
+ { mMercenaryId = id; }
+
+ int getMercenary() const
+ { return mMercenaryId; }
+
protected:
void updateCoords() override final;
@@ -484,6 +490,7 @@ class LocalPlayer final : public Being,
std::string mTestParticleName;
int mTestParticleTime;
unsigned long mTestParticleHash;
+ int mMercenaryId;
unsigned char mWalkingDir; // The direction the player is walking in.
/** Whether or not the name settings have changed */
bool mUpdateName;