diff options
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 5aedc9e01..314a89edd 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1,11 +1,11 @@ /* - * The ManaPlus Client + * The ManaVerse Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers * Copyright (C) 2011-2020 The ManaPlus Developers - * Copyright (C) 2020-2023 The ManaVerse Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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) @@ -1587,10 +1597,10 @@ void BeingRecv::processSkillEntry(Net::MessageIn &msg) void BeingRecv::processPlayerStatusChange(Net::MessageIn &msg) { - BLOCK_START("BeingRecv::processPlayerStop") + BLOCK_START("BeingRecv::processPlayerStatusChange") if (actorManager == nullptr) { - BLOCK_END("BeingRecv::processPlayerStop") + BLOCK_END("BeingRecv::processPlayerStatusChange") return; } @@ -1619,7 +1629,7 @@ void BeingRecv::processPlayerStatusChange(Net::MessageIn &msg) dstBeing->setKarma(msg.readUInt8("karma")); dstBeing->setStatusEffectOptions(option, opt1, opt2); - BLOCK_END("BeingRecv::processPlayerStop") + BLOCK_END("BeingRecv::processPlayerStatusChange") } void BeingRecv::processPlayerStatusChange2(Net::MessageIn &msg) |