diff options
| author | ForesterDev <11771800+ForesterDev@users.noreply.github.com> | 2020-04-11 21:49:36 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-11 19:49:36 +0200 |
| commit | bfd73e7f47ec670308f72cbd0dbc42ef80cd7e92 (patch) | |
| tree | ad523cb48d0ee02c911b6df002998f7cc8daf532 /src/server/game/Server/Packets | |
| parent | 3e54e798e67ba0f3a141cd75ff2f7bd9d8980d3c (diff) | |
Core/PacketIO: updated SMSG_FEATURE_SYSTEM_STATUS (#24403)
* Core/Packets: updated SMSG_FEATURE_SYSTEM_STATUS
(cherry picked from commit 231207970bf9c28971def453d2622aa17fe36b43)
# Conflicts:
# src/server/game/Battlegrounds/ArenaTeam.cpp
# src/server/game/Entities/Player/Player.cpp
# src/server/game/Entities/Player/Player.h
# src/server/game/Handlers/CharacterHandler.cpp
# src/server/game/Handlers/GroupHandler.cpp
# src/server/game/Handlers/SpellHandler.cpp
# src/server/game/Server/Packets/SpellPackets.cpp
# src/server/game/Server/Packets/SpellPackets.h
# src/server/game/Server/Packets/SystemPackets.cpp
# src/server/game/Server/Packets/SystemPackets.h
# src/server/game/Server/Protocol/Opcodes.cpp
# src/server/game/Server/Protocol/Opcodes.h
# src/server/game/Server/WorldSession.h
* Define complaint status values and replace magic numbers
* Add missing header
Co-authored-by: joschiwald <joschiwald.trinity@gmail.com>
Diffstat (limited to 'src/server/game/Server/Packets')
| -rw-r--r-- | src/server/game/Server/Packets/AllPackets.h | 1 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SystemPackets.cpp | 26 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SystemPackets.h | 41 |
3 files changed, 68 insertions, 0 deletions
diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h index 424970d458d..0a5e574a8c2 100644 --- a/src/server/game/Server/Packets/AllPackets.h +++ b/src/server/game/Server/Packets/AllPackets.h @@ -28,6 +28,7 @@ #include "QueryPackets.h" #include "QuestPackets.h" #include "SpellPackets.h" +#include "SystemPackets.h" #include "TotemPackets.h" #include "WorldStatePackets.h" diff --git a/src/server/game/Server/Packets/SystemPackets.cpp b/src/server/game/Server/Packets/SystemPackets.cpp new file mode 100644 index 00000000000..98d4f6cb650 --- /dev/null +++ b/src/server/game/Server/Packets/SystemPackets.cpp @@ -0,0 +1,26 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * 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 the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "SystemPackets.h" + +WorldPacket const* WorldPackets::System::FeatureSystemStatus::Write() +{ + _worldPacket << uint8(ComplaintStatus); + _worldPacket << uint8(VoiceEnabled); + + return &_worldPacket; +} diff --git a/src/server/game/Server/Packets/SystemPackets.h b/src/server/game/Server/Packets/SystemPackets.h new file mode 100644 index 00000000000..93039deb54b --- /dev/null +++ b/src/server/game/Server/Packets/SystemPackets.h @@ -0,0 +1,41 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * 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 the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef SystemPackets_h__ +#define SystemPackets_h__ + +#include "Packet.h" +#include "SharedDefines.h" + +namespace WorldPackets +{ + namespace System + { + class FeatureSystemStatus final : public ServerPacket + { + public: + FeatureSystemStatus() : ServerPacket(SMSG_FEATURE_SYSTEM_STATUS, 2) { } + + WorldPacket const* Write() override; + + uint8 ComplaintStatus = COMPLAINT_ENABLED_WITH_AUTO_IGNORE; + bool VoiceEnabled = false; + }; + } +} + +#endif // SystemPackets_h__ |
