diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 5aedc9e01..90a127211 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -28,6 +28,7 @@ #include "game.h" #include "notifymanager.h" #include "party.h" +#include "soundmanager.h" #include "being/mercenaryinfo.h" @@ -1537,12 +1538,21 @@ void BeingRecv::processBeingSpecialEffectNum(Net::MessageIn &msg) void BeingRecv::processBeingSoundEffect(Net::MessageIn &msg) { - UNIMPLEMENTEDPACKET; - // +++ need play this effect. - msg.readString(24, "sound effect name"); + const std::string effectPath = msg.readString(24, "sound effect name"); msg.readUInt8("type"); msg.readInt32("unused"); - msg.readInt32("source being id"); + const BeingId bId = msg.readBeingId("source being id"); + + Being *const srcBeing = actorManager->findBeing(bId); + int tileX = 0; + int tileY = 0; + if (srcBeing != nullptr) + { + tileX = srcBeing->getTileX(); + tileY = srcBeing->getTileY(); + } + + soundManager.playSfx(effectPath, tileX, tileY); } void BeingRecv::processSkillGroundNoDamage(Net::MessageIn &msg) |