summaryrefslogtreecommitdiff
path: root/src/net/eathena/mercenaryhandler.cpp
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/net/eathena/mercenaryhandler.cpp
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/net/eathena/mercenaryhandler.cpp')
-rw-r--r--src/net/eathena/mercenaryhandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp
index 2a44e86ca..63c43f093 100644
--- a/src/net/eathena/mercenaryhandler.cpp
+++ b/src/net/eathena/mercenaryhandler.cpp
@@ -24,6 +24,7 @@
#include "logger.h"
#include "being/being.h"
+#include "being/localplayer.h"
#include "being/playerinfo.h"
#include "gui/windows/skilldialog.h"
@@ -110,6 +111,8 @@ void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg)
dstBeing->setName(name);
dstBeing->setLevel(level);
dstBeing->setAttackRange(range);
+ if (localPlayer)
+ localPlayer->setMercenary(dstBeing->getId());
}
}