mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix/feat: (Core/PacketIO): updated sound and creature addon (#10813)
* fix\feat: (Core/PacketIO): updated sound and creature addon
updated SMSG_PLAY_SOUND, SMSG_PLAY_MUSIC and SMSG_PLAY_OBJECT_SOUND via tc cherry pick
https://github.com/TrinityCore/TrinityCore/pull/2363 and 0f1f7ef401 by @joschiwald and @ForesterDev
This so far a attempt to align atleast with sound with tc, and correct a potentional issue of hearing creature sounds that is not in visible range. I notice PlaySound was being defined in some weird dependency as it isnt with tc so I renamed it to Playsound. Notice a isLarge still being used in the creature addon when it was depreciated, so i removed that a that seem to of interfered with visibilitydistanceType.
Co-Authored-By: joschiwald <736792+joschiwald@users.noreply.github.com>
Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
This commit is contained in:
@@ -41,6 +41,42 @@ namespace WorldPackets
|
||||
WeatherState WeatherID = WeatherState(0);
|
||||
};
|
||||
|
||||
class AC_GAME_API PlayMusic final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { }
|
||||
PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 SoundKitID = 0;
|
||||
};
|
||||
|
||||
class AC_GAME_API PlayObjectSound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8) { }
|
||||
PlayObjectSound(ObjectGuid const& sourceObjectGUID, uint32 soundKitID)
|
||||
: ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid SourceObjectGUID;
|
||||
uint32 SoundKitID = 0;
|
||||
|
||||
};
|
||||
|
||||
class AC_GAME_API Playsound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
Playsound() : ServerPacket(SMSG_PLAY_SOUND, 4) { }
|
||||
Playsound(uint32 soundKitID) : ServerPacket(SMSG_PLAY_SOUND, 4), SoundKitID(soundKitID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 SoundKitID = 0;
|
||||
};
|
||||
|
||||
class RandomRollClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user