diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-05-21 17:14:31 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-05-21 17:14:31 +0000 |
commit | aa02f223bbdbdf568bf6be067ef1f2fdefa7786e (patch) | |
tree | e0f6042cb6ef7ca4f5565e1f003ab1f313f1cd1b /src | |
parent | 2b14e0e8db77fda91c3ba9d23aafc415088fb494 (diff) | |
download | manaplus-aa02f223bbdbdf568bf6be067ef1f2fdefa7786e.tar.gz manaplus-aa02f223bbdbdf568bf6be067ef1f2fdefa7786e.tar.bz2 manaplus-aa02f223bbdbdf568bf6be067ef1f2fdefa7786e.tar.xz manaplus-aa02f223bbdbdf568bf6be067ef1f2fdefa7786e.zip |
Implement ZC_SOUND / 0x01d3 / processBeingSoundEffect
Squashed with:
* Remove TODOs. Repeats and the other two fields are implemented in latest herc, but
they set beingID to 0 when repeats are requested... what...
Repeats need more in-client support to implement, anyways
****
mana/plus!180
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) |