summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-30 18:28:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-30 18:28:12 +0300
commitfde614c1e6e944b4805e7e6a89689b9d546330ad (patch)
treee378b3d2ace8ae88a3eaf0e98657bbd227a748ab /src/net/ea/playerhandler.cpp
parent0af4b6dd0f616564a55447c7ce5318c72f68e590 (diff)
downloadmanaverse-fde614c1e6e944b4805e7e6a89689b9d546330ad.tar.gz
manaverse-fde614c1e6e944b4805e7e6a89689b9d546330ad.tar.bz2
manaverse-fde614c1e6e944b4805e7e6a89689b9d546330ad.tar.xz
manaverse-fde614c1e6e944b4805e7e6a89689b9d546330ad.zip
eathena: add packet SMSG_MAP_MUSIC 0x0b05.
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 8fd63a641..baea3b1e6 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -26,6 +26,7 @@
#include "game.h"
#include "party.h"
#include "notifymanager.h"
+#include "soundmanager.h"
#include "units.h"
#include "being/attributes.h"
@@ -532,4 +533,15 @@ void PlayerHandler::processMapMask(Net::MessageIn &msg)
map->setMask(mask);
}
+void PlayerHandler::processMapMusic(Net::MessageIn &msg)
+{
+ const int size = msg.readInt16("len") - 5;
+ const std::string music = msg.readString(size, "name");
+ soundManager.playMusic(music);
+
+ Map *const map = viewport->getMap();
+ if (map)
+ map->setMusicFile(music);
+}
+
} // namespace Ea