aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Support
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-06-01 23:13:29 +0200
committerShauren <shauren.trinity@gmail.com>2022-06-01 23:13:29 +0200
commitd3c4216de8e1dcb9f62d2fcc1b9b72852e5409c9 (patch)
tree7b2ec9bd8364f3473e5d0d8685bd4ffc8c9fc2cc /src/server/game/Support
parentcb78ddc63a516af5dd0e00d36e07650f4856dee0 (diff)
Core/PacketIO: Updated packet structures to 9.2.5
Diffstat (limited to 'src/server/game/Support')
-rw-r--r--src/server/game/Support/SupportMgr.cpp18
-rw-r--r--src/server/game/Support/SupportMgr.h67
2 files changed, 67 insertions, 18 deletions
diff --git a/src/server/game/Support/SupportMgr.cpp b/src/server/game/Support/SupportMgr.cpp
index e72f9098ad0..eca5ee4da0c 100644
--- a/src/server/game/Support/SupportMgr.cpp
+++ b/src/server/game/Support/SupportMgr.cpp
@@ -175,14 +175,18 @@ std::string BugTicket::FormatViewMessageString(ChatHandler& handler, bool detail
return ss.str();
}
-ComplaintTicket::ComplaintTicket() : _complaintType(GMTICKET_SUPPORT_COMPLAINT_TYPE_NONE) { }
+ComplaintTicket::ComplaintTicket() : _reportType(ReportType::Chat), _majorCategory(ReportMajorCategory::InappropriateCommunication),
+ _minorCategoryFlags(ReportMinorCategory::TextChat)
+{
+}
-ComplaintTicket::ComplaintTicket(Player* player) : Ticket(player), _complaintType(GMTICKET_SUPPORT_COMPLAINT_TYPE_NONE)
+ComplaintTicket::ComplaintTicket(Player* player) : Ticket(player), _reportType(ReportType::Chat), _majorCategory(ReportMajorCategory::InappropriateCommunication),
+ _minorCategoryFlags(ReportMinorCategory::TextChat)
{
_id = sSupportMgr->GenerateComplaintId();
}
-ComplaintTicket::~ComplaintTicket() { }
+ComplaintTicket::~ComplaintTicket() = default;
void ComplaintTicket::LoadFromDB(Field* fields)
{
@@ -197,7 +201,9 @@ void ComplaintTicket::LoadFromDB(Field* fields)
_pos.m_positionZ = fields[++idx].GetFloat();
_pos.SetOrientation(fields[++idx].GetFloat());
_targetCharacterGuid = ObjectGuid::Create<HighGuid::Player>(fields[++idx].GetUInt64());
- _complaintType = GMSupportComplaintType(fields[++idx].GetUInt8());
+ _reportType = ReportType(fields[++idx].GetInt32());
+ _majorCategory = ReportMajorCategory(fields[++idx].GetInt32());
+ _minorCategoryFlags = ReportMinorCategory(fields[++idx].GetInt32());
int32 reportLineIndex = fields[++idx].GetInt32();
if (reportLineIndex != -1)
_chatLog.ReportLineIndex = reportLineIndex;
@@ -240,7 +246,9 @@ void ComplaintTicket::SaveToDB() const
stmt->setFloat(++idx, _pos.GetPositionZ());
stmt->setFloat(++idx, _pos.GetOrientation());
stmt->setUInt64(++idx, _targetCharacterGuid.GetCounter());
- stmt->setUInt8(++idx, _complaintType);
+ stmt->setInt32(++idx, AsUnderlyingType(_reportType));
+ stmt->setInt32(++idx, AsUnderlyingType(_majorCategory));
+ stmt->setInt32(++idx, AsUnderlyingType(_minorCategoryFlags));
if (_chatLog.ReportLineIndex)
stmt->setInt32(++idx, *_chatLog.ReportLineIndex);
else
diff --git a/src/server/game/Support/SupportMgr.h b/src/server/game/Support/SupportMgr.h
index f1a141c7474..f8582ebb6d0 100644
--- a/src/server/game/Support/SupportMgr.h
+++ b/src/server/game/Support/SupportMgr.h
@@ -25,6 +25,51 @@ class ChatHandler;
class Field;
class Player;
+enum class ReportType : int32
+{
+ Chat = 0,
+ InWorld = 1,
+ ClubFinderPosting = 2,
+ ClubFinderApplicant = 3,
+ GroupFinderPosting = 4,
+ GroupFinderApplicant = 5,
+ ClubMember = 6,
+ GroupMember = 7,
+ Friend = 8,
+ Pet = 9,
+ BattlePet = 10,
+ Calendar = 11,
+ Mail = 12,
+ PvP = 13,
+};
+
+enum class ReportMajorCategory : int32
+{
+ InappropriateCommunication = 0,
+ GameplaySabotage = 1,
+ Cheating = 2,
+ InappropriateName = 3,
+};
+
+enum class ReportMinorCategory : int32
+{
+ TextChat = 0x0001,
+ Boosting = 0x0002,
+ Spam = 0x0004,
+ Afk = 0x0008,
+ IntentionallyFeeding = 0x0010,
+ BlockingProgress = 0x0020,
+ Hacking = 0x0040,
+ Botting = 0x0080,
+ Advertisement = 0x0100,
+ BTag = 0x0200,
+ GroupName = 0x0400,
+ CharacterName = 0x0800,
+ GuildName = 0x1000,
+ Description = 0x2000,
+ Name = 0x4000,
+};
+
// from blizzard lua
enum GMTicketSystemStatus
{
@@ -32,16 +77,6 @@ enum GMTicketSystemStatus
GMTICKET_QUEUE_STATUS_ENABLED = 1
};
-enum GMSupportComplaintType
-{
- GMTICKET_SUPPORT_COMPLAINT_TYPE_NONE = 0,
- GMTICKET_SUPPORT_COMPLAINT_TYPE_LANGUAGE = 2,
- GMTICKET_SUPPORT_COMPLAINT_TYPE_PLAYERNAME = 4,
- GMTICKET_SUPPORT_COMPLAINT_TYPE_CHEAT = 15,
- GMTICKET_SUPPORT_COMPLAINT_TYPE_GUILDNAME = 23,
- GMTICKET_SUPPORT_COMPLAINT_TYPE_SPAMMING = 24
-};
-
enum SupportSpamType
{
SUPPORT_SPAM_TYPE_MAIL = 0,
@@ -134,14 +169,18 @@ public:
~ComplaintTicket();
ObjectGuid GetTargetCharacterGuid() const { return _targetCharacterGuid; }
- GMSupportComplaintType GetComplaintType() const { return _complaintType; }
+ ReportType GetReportType() const { return _reportType; }
+ ReportMajorCategory GetMajorCategory() const { return _majorCategory; }
+ ReportMinorCategory GetMinorCategoryFlags() const { return _minorCategoryFlags; }
std::string const& GetNote() const { return _note; }
void SetTargetCharacterGuid(ObjectGuid targetCharacterGuid)
{
_targetCharacterGuid = targetCharacterGuid;
}
- void SetComplaintType(GMSupportComplaintType type) { _complaintType = type; }
+ void SetReportType(ReportType reportType) { _reportType = reportType; }
+ void SetMajorCategory(ReportMajorCategory majorCategory) { _majorCategory = majorCategory; }
+ void SetMinorCategoryFlags(ReportMinorCategory minorCategoryFlags) { _minorCategoryFlags = minorCategoryFlags; }
void SetChatLog(ChatLog const& log) { _chatLog = log; }
void SetNote(std::string const& note) { _note = note; }
@@ -155,7 +194,9 @@ public:
private:
ObjectGuid _targetCharacterGuid;
- GMSupportComplaintType _complaintType;
+ ReportType _reportType;
+ ReportMajorCategory _majorCategory;
+ ReportMinorCategory _minorCategoryFlags;
ChatLog _chatLog;
std::string _note;
};