diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 3834062ae7..72da95c4ee 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -52,6 +52,7 @@
#include "ScriptMgr.h"
#include "SharedDefines.h"
#include "SocialMgr.h"
+#include "SystemPackets.h"
#include "Transport.h"
#include "World.h"
#include "WorldPacket.h"
@@ -833,35 +834,27 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA), PER_CHARACTER_CACHE_MASK);
SendAccountDataTimes(PER_CHARACTER_CACHE_MASK);
- bool featureBit4 = true;
- data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 7); // checked in 4.2.2
- data << uint8(2); // unknown value
- data << uint32(1);
- data << uint32(1);
- data << uint32(2);
- data << uint32(0);
- data.WriteBit(1);
- data.WriteBit(1);
- data.WriteBit(0);
- data.WriteBit(featureBit4);
- data.WriteBit(0);
- data.WriteBit(0);
- data.FlushBits();
- if (featureBit4)
+ WorldPackets::System::FeatureSystemStatus features;
+ features.ComplaintStatus = 2;
+ features.ScrollOfResurrectionRequestsRemaining = 1;
+ features.ScrollOfResurrectionMaxRequestsPerDay = 1;
+ features.CfgRealmID = realm.Id.Realm;
+ features.CfgRealmRecID = 0;
+ features.ItemRestorationButtonEnabled = true;
+ features.ScrollOfResurrectionEnabled = false;
+ features.VoiceEnabled = false;
+
+ bool europaTicketSystemEnabled = sWorld->getBoolConfig(CONFIG_ALLOW_BUG_REPORTS_AND_SUGGESTIONS);
+ if (europaTicketSystemEnabled)
{
- data << uint32(1);
- data << uint32(0);
- data << uint32(10);
- data << uint32(60);
+ features.EuropaTicketSystemStatus = boost::in_place();
+ features.EuropaTicketSystemStatus->TryCount = 1;
+ features.EuropaTicketSystemStatus->LastResetTimeBeforeNow = 264134872; // Pulled from sniff data
+ features.EuropaTicketSystemStatus->PerMilliseconds = 10;
+ features.EuropaTicketSystemStatus->MaxTries = 60;
}
- //if (featureBit5)
- //{
- // data << uint32(0);
- // data << uint32(0);
- // data << uint32(0);
- //}
- SendPacket(&data);
+ SendPacket(features.Write());
// Send MOTD
{
diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h
index 4e146cfd91..fc6a24b3a9 100644
--- a/src/server/game/Server/Packets/AllPackets.h
+++ b/src/server/game/Server/Packets/AllPackets.h
@@ -19,7 +19,8 @@
#define AllPackets_h__
#include "AuthenticationPackets.h"
-#include "LFGPackets.h"
#include "GuildPackets.h"
+#include "LFGPackets.h"
+#include "SystemPackets.h"
#endif // AllPackets_h__
diff --git a/src/server/game/Server/Packets/SystemPackets.cpp b/src/server/game/Server/Packets/SystemPackets.cpp
new file mode 100644
index 0000000000..19960a7047
--- /dev/null
+++ b/src/server/game/Server/Packets/SystemPackets.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008-2019 TrinityCore
+ *
+ * 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 .
+ */
+
+#include "SystemPackets.h"
+#include "Errors.h"
+
+WorldPacket const* WorldPackets::System::FeatureSystemStatus::Write()
+{
+ _worldPacket << int8(ComplaintStatus);
+ _worldPacket << int32(ScrollOfResurrectionRequestsRemaining);
+ _worldPacket << int32(ScrollOfResurrectionMaxRequestsPerDay);
+ _worldPacket << int32(CfgRealmID);
+ _worldPacket << int32(CfgRealmRecID);
+ _worldPacket.WriteBit(TravelPassEnabled);
+ _worldPacket.WriteBit(ItemRestorationButtonEnabled);
+ _worldPacket.WriteBit(ScrollOfResurrectionEnabled);
+ _worldPacket.WriteBit(EuropaTicketSystemStatus.is_initialized());
+ _worldPacket.WriteBit(SessionAlert.is_initialized());
+ _worldPacket.WriteBit(VoiceEnabled);
+ _worldPacket.FlushBits();
+
+ if (EuropaTicketSystemStatus)
+ {
+ _worldPacket << int32(EuropaTicketSystemStatus->TryCount);
+ _worldPacket << int32(EuropaTicketSystemStatus->LastResetTimeBeforeNow);
+ _worldPacket << int32(EuropaTicketSystemStatus->MaxTries);
+ _worldPacket << int32(EuropaTicketSystemStatus->PerMilliseconds);
+ }
+
+ if (SessionAlert)
+ {
+ _worldPacket << int32(SessionAlert->Period);
+ _worldPacket << int32(SessionAlert->Delay);
+ _worldPacket << int32(SessionAlert->DisplayTime);
+ }
+ 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 0000000000..fc00d04196
--- /dev/null
+++ b/src/server/game/Server/Packets/SystemPackets.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008-2019 TrinityCore
+ *
+ * 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 .
+ */
+
+#ifndef SystemPackets_h__
+#define SystemPackets_h__
+
+#include "Packet.h"
+#include "ObjectGuid.h"
+#include "Optional.h"
+
+namespace WorldPackets
+{
+ namespace System
+ {
+ struct SavedThrottleObjectState
+ {
+ uint32 MaxTries = 0;
+ uint32 PerMilliseconds = 0;
+ uint32 TryCount = 0;
+ uint32 LastResetTimeBeforeNow = 0;
+ };
+
+ struct SessionAlertConfig
+ {
+ int32 Delay = 0;
+ int32 Period = 0;
+ int32 DisplayTime = 0;
+ };
+
+ class FeatureSystemStatus final : public ServerPacket
+ {
+ public:
+ FeatureSystemStatus() : ServerPacket(SMSG_FEATURE_SYSTEM_STATUS, 7) { }
+
+ WorldPacket const* Write() override;
+
+ bool VoiceEnabled = false;
+ Optional SessionAlert;
+ uint32 ScrollOfResurrectionMaxRequestsPerDay = 0;
+ bool ScrollOfResurrectionEnabled = false;
+ Optional EuropaTicketSystemStatus;
+ uint32 ScrollOfResurrectionRequestsRemaining = 0;
+ uint32 CfgRealmID = 0;
+ uint8 ComplaintStatus = 0;
+ int32 CfgRealmRecID = 0;
+ bool ItemRestorationButtonEnabled = false;
+ bool TravelPassEnabled = false;
+ };
+ }
+}
+
+#endif // SystemPackets_h__
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 7e8762b503..ac7ffdb565 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -526,6 +526,9 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_ALLOW_TICKETS] = sConfigMgr->GetBoolDefault("AllowTickets", true);
m_bool_configs[CONFIG_DELETE_CHARACTER_TICKET_TRACE] = sConfigMgr->GetBoolDefault("DeletedCharacterTicketTrace", false);
+ /// - Read Europa Ticket System status (enabling or disabling suggestions and bug reports)
+ m_bool_configs[CONFIG_ALLOW_BUG_REPORTS_AND_SUGGESTIONS] = sConfigMgr->GetBoolDefault("AllowBugsReportsAndSuggestions", false);
+
///- Get string for new logins (newly created characters)
SetNewCharString(sConfigMgr->GetStringDefault("PlayerStart.String", ""));
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 91e9fb416c..b7ed5eb365 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -152,6 +152,7 @@ enum WorldBoolConfigs
CONFIG_SHOW_BAN_IN_WORLD,
CONFIG_AUTOBROADCAST,
CONFIG_ALLOW_TICKETS,
+ CONFIG_ALLOW_BUG_REPORTS_AND_SUGGESTIONS,
CONFIG_DELETE_CHARACTER_TICKET_TRACE,
CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES,
CONFIG_PRESERVE_CUSTOM_CHANNELS,
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 3469b7807d..46152e442c 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -1199,6 +1199,14 @@ Command.LookupMaxResults = 0
AllowTickets = 1
+#
+# AllowBugsReportsAndSuggestions
+# Description: Allow/disallow sending bug reports and suggestions via ingame support window
+# Default: 0 - (Disabled)
+# 1 - (Enabled)
+
+AllowBugsReportsAndSuggestions = 0
+
#
# DeletedCharacterTicketTrace
# Description: Keep trace of tickets opened by deleted characters