diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 41256cdddd..6b94ed2f8b 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -51,7 +51,8 @@ class Aura; void WorldSession::SendPartyResult(PartyOperation operation, const std::string& member, PartyResult res, uint32 val /* = 0 */) { - WorldPackets::Party::PartyCommandResult packet(member); + WorldPackets::Party::PartyCommandResult packet; + packet.Name = member; packet.Command = static_cast(operation); packet.Result = static_cast(res); packet.ResultData = val; diff --git a/src/server/game/Server/Packets/PartyPackets.h b/src/server/game/Server/Packets/PartyPackets.h index 7a1c64a6df..9b4fedc788 100644 --- a/src/server/game/Server/Packets/PartyPackets.h +++ b/src/server/game/Server/Packets/PartyPackets.h @@ -106,17 +106,15 @@ namespace WorldPackets class PartyCommandResult final : public ServerPacket { public: - PartyCommandResult(std::string const& _name) : ServerPacket(SMSG_PARTY_COMMAND_RESULT, 4 + _name.length() + 4 + 4 + 8), - Command(0), Result(0), ResultData(0), Name(_name) { } + PartyCommandResult() : ServerPacket(SMSG_PARTY_COMMAND_RESULT, 4 + 1 + 4 + 4 + 8) { } WorldPacket const* Write() override; - uint32 Command; - uint32 Result; - uint32 ResultData; - ObjectGuid ResultGUID; - private: std::string Name; + uint32 Command = 0; + uint32 Result = 0; + uint32 ResultData = 0; + ObjectGuid ResultGUID; }; class PartyInviteClient final : public ClientPacket