diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Handlers/CharacterHandler.cpp | 16 | ||||
-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 | ||||
-rw-r--r-- | src/server/game/Server/WorldSession.h | 2 | ||||
-rw-r--r-- | src/server/shared/SharedDefines.h | 7 |
6 files changed, 88 insertions, 5 deletions
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index bb7117e2f3b..ed3923ca971 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -48,6 +48,7 @@ #include "ScriptMgr.h" #include "ServerMotd.h" #include "SocialMgr.h" +#include "SystemPackets.h" #include "QueryHolder.h" #include "World.h" @@ -747,10 +748,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA), PER_CHARACTER_CACHE_MASK); SendAccountDataTimes(PER_CHARACTER_CACHE_MASK); - WorldPacket data(SMSG_FEATURE_SYSTEM_STATUS, 2); // added in 2.2.0 - data << uint8(2); // unknown value - data << uint8(0); // enable(1)/disable(0) voice chat interface in client - SendPacket(&data); + SendFeatureSystemStatus(); // Send MOTD { @@ -786,7 +784,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) } } - data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4); + WorldPacket data(SMSG_LEARNED_DANCE_MOVES, 4+4); data << uint32(0); data << uint32(0); SendPacket(&data); @@ -1004,6 +1002,14 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) delete holder; } +void WorldSession::SendFeatureSystemStatus() +{ + WorldPackets::System::FeatureSystemStatus features; + features.ComplaintStatus = COMPLAINT_ENABLED_WITH_AUTO_IGNORE; + features.VoiceEnabled = false; + SendPacket(features.Write()); +} + void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_ATWAR"); 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__ diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 57ad6cea4a1..f121805c106 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -438,6 +438,8 @@ class TC_GAME_API WorldSession /// Handle the authentication waiting queue (to be completed) void SendAuthWaitQue(uint32 position); + void SendFeatureSystemStatus(); + void SendNameQueryOpcode(ObjectGuid guid); void SendTrainerList(Creature* npc); diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index bbc94018d73..56e25b9bb70 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -3457,6 +3457,13 @@ enum ResponseCodes CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 103 }; +enum ComplaintStatus : uint8 +{ + COMPLAINT_DISABLED = 0, + COMPLAINT_ENABLED_WITHOUT_AUTO_IGNORE = 1, + COMPLAINT_ENABLED_WITH_AUTO_IGNORE = 2 +}; + /// Ban function modes enum BanMode { |