diff options
Diffstat (limited to 'src/net/eathena/mercenaryhandler.cpp')
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index a614cf429..0726f5281 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -22,6 +22,7 @@ #include "actormanager.h" #include "logger.h" +#include "notifymanager.h" #include "being/being.h" #include "being/localplayer.h" @@ -35,6 +36,8 @@ #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" +#include "resources/notifytypes.h" + #include "debug.h" extern Net::MercenaryHandler *mercenaryHandler; @@ -152,4 +155,33 @@ void MercenaryHandler::processMercenarySkills(Net::MessageIn &msg) skillDialog->update(); } +void MercenaryHandler::handleMercenaryMessage(const int cmd) +{ + PlayerInfo::setMercenary(nullptr); + if (skillDialog) + { + skillDialog->hideSkills(SkillOwner::Mercenary); + skillDialog->update(); + } + + switch (cmd) + { + case 0: + NotifyManager::notify(NotifyTypes::MERCENARY_EXPIRED); + break; + case 1: + NotifyManager::notify(NotifyTypes::MERCENARY_KILLED); + break; + case 2: + NotifyManager::notify(NotifyTypes::MERCENARY_FIRED); + break; + case 3: + NotifyManager::notify(NotifyTypes::MERCENARY_RUN); + break; + default: + NotifyManager::notify(NotifyTypes::MERCENARY_UNKNOWN); + break; + } +} + } // namespace EAthena |