1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
/*
* 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 TRINITYCORE_TICKET_PACKETS_H
#define TRINITYCORE_TICKET_PACKETS_H
#include "Packet.h"
#include "LFGPacketsCommon.h"
#include "Optional.h"
#include "Position.h"
namespace WorldPackets
{
namespace Ticket
{
struct SupportTicketHeader
{
int32 MapID = 0;
TaggedPosition<::Position::XYZ> Position;
float Facing = 0.0f;
int32 Program = 0;
};
class GMTicketGetSystemStatus final : public ClientPacket
{
public:
explicit GMTicketGetSystemStatus(WorldPacket&& packet) : ClientPacket(CMSG_GM_TICKET_GET_SYSTEM_STATUS, std::move(packet)) { }
void Read() override { }
};
class GMTicketSystemStatus final : public ServerPacket
{
public:
explicit GMTicketSystemStatus() : ServerPacket(SMSG_GM_TICKET_SYSTEM_STATUS, 4) { }
WorldPacket const* Write() override;
int32 Status = 0;
};
class GMTicketGetCaseStatus final : public ClientPacket
{
public:
explicit GMTicketGetCaseStatus(WorldPacket&& packet) : ClientPacket(CMSG_GM_TICKET_GET_CASE_STATUS, std::move(packet)) { }
void Read() override { }
};
class GMTicketCaseStatus final : public ServerPacket
{
public:
struct GMTicketCase
{
int32 CaseID = 0;
Timestamp<> CaseOpened;
int32 CaseStatus = 0;
uint16 CfgRealmID = 0;
uint64 CharacterID = 0;
int32 WaitTimeOverrideMinutes = 0;
std::string Url;
std::string WaitTimeOverrideMessage;
std::string Title;
std::string Description;
};
GMTicketCaseStatus() : ServerPacket(SMSG_GM_TICKET_CASE_STATUS, 12) { }
WorldPacket const* Write() override;
std::vector<GMTicketCase> Cases;
};
class GMTicketAcknowledgeSurvey final : public ClientPacket
{
public:
explicit GMTicketAcknowledgeSurvey(WorldPacket&& packet) : ClientPacket(CMSG_GM_TICKET_ACKNOWLEDGE_SURVEY, std::move(packet)) { }
void Read() override;
int32 CaseID = 0;
};
class SubmitUserFeedback final : public ClientPacket
{
public:
explicit SubmitUserFeedback(WorldPacket&& packet) : ClientPacket(CMSG_SUBMIT_USER_FEEDBACK, std::move(packet)) { }
void Read() override;
SupportTicketHeader Header;
std::string Note;
bool IsSuggestion = false;
};
struct SupportTicketChatLine
{
SupportTicketChatLine() { }
SupportTicketChatLine(time_t timestamp, std::string_view text);
WorldPackets::Timestamp<> Timestamp;
std::string Text;
};
struct SupportTicketChatLog
{
Array<SupportTicketChatLine, 255> Lines;
Optional<uint32> ReportLineIndex;
};
struct SupportTicketHorusChatLine
{
struct ServerSpec
{
uint32 Realm;
uint16 Server;
uint8 Type;
};
WorldPackets::Timestamp<> Timestamp;
ObjectGuid PlayerGuid;
Optional<uint64> ClubID;
Optional<ObjectGuid> ChannelGuid;
Optional<ServerSpec> WorldServer;
Optional<int32> Cmd;
std::string Text;
};
struct SupportTicketHorusChatLog
{
Array<SupportTicketHorusChatLine, 255> Lines;
};
struct SupportTicketMailInfo
{
int64 MailID = 0;
std::string MailSubject;
std::string MailBody;
};
struct SupportTicketCalendarEventInfo
{
uint64 EventID = 0;
uint64 InviteID = 0;
std::string EventTitle;
};
struct SupportTicketPetInfo
{
ObjectGuid PetID;
std::string PetName;
};
struct SupportTicketGuildInfo
{
ObjectGuid GuildID;
std::string GuildName;
};
struct SupportTicketLFGListEntryInfo
{
WorldPackets::LFG::RideTicket Ticket;
uint32 ActivityID = 0;
uint8 FactionID = 0;
ObjectGuid LastTouchedName;
ObjectGuid LastTouchedComment;
ObjectGuid LastTouchedVoiceChat;
ObjectGuid LastTouchedAny;
ObjectGuid PartyGuid;
std::string Name;
std::string Comment;
std::string VoiceChat;
};
struct SupportTicketLFGListApplicant
{
WorldPackets::LFG::RideTicket Ticket;
std::string Comment;
};
struct SupportTicketVoiceChatInfo
{
bool TargetIsCurrentlyInVoiceChatWithPlayer = false;
};
struct SupportTicketClubFinderInfo
{
uint64 PostingID = 0;
uint64 ClubID = 0;
ObjectGuid GuildID;
std::string PostingDescription;
};
struct SupportTicketArenaTeamInfo
{
std::string ArenaTeamName;
ObjectGuid ArenaTeamID;
};
struct SupportTicketHouseInfo
{
std::string NeighborhoodName;
ObjectGuid Unknown_1127_1;
ObjectGuid Unknown_1127_2;
ObjectGuid Unknown_1127_3;
uint8 Unknown_1127_4 = 0;
};
class SupportTicketSubmitComplaint final : public ClientPacket
{
public:
explicit SupportTicketSubmitComplaint(WorldPacket&& packet) : ClientPacket(CMSG_SUPPORT_TICKET_SUBMIT_COMPLAINT, std::move(packet)) { }
void Read() override;
SupportTicketHeader Header;
SupportTicketChatLog ChatLog;
ObjectGuid TargetCharacterGUID;
int32 ReportType = 0;
int32 MajorCategory = 0;
int32 MinorCategoryFlags = 0;
SupportTicketHorusChatLog HorusChatLog;
std::string Note;
Optional<SupportTicketMailInfo> MailInfo;
Optional<SupportTicketCalendarEventInfo> CalenderInfo;
Optional<SupportTicketPetInfo> PetInfo;
Optional<SupportTicketGuildInfo> GuildInfo;
Optional<SupportTicketLFGListEntryInfo> LfgListEntryInfo;
Optional<SupportTicketLFGListApplicant> LfgListAppInfo;
Optional<SupportTicketVoiceChatInfo> VoiceChatInfo;
Optional<SupportTicketClubFinderInfo> ClubFinderInfo;
Optional<SupportTicketArenaTeamInfo> ArenaTeamInfo;
Optional<SupportTicketHouseInfo> HouseInfo;
};
class Complaint final : public ClientPacket
{
public:
struct ComplaintOffender
{
ObjectGuid PlayerGuid;
uint32 RealmAddress = 0;
uint32 TimeSinceOffence = 0;
};
struct ComplaintChat
{
uint32 Command = 0;
uint32 ChannelID = 0;
std::string MessageLog;
};
explicit Complaint(WorldPacket&& packet) : ClientPacket(CMSG_COMPLAINT, std::move(packet)) { }
void Read() override;
uint8 ComplaintType = 0;
ComplaintOffender Offender;
uint64 MailID = 0;
ComplaintChat Chat;
uint64 EventGuid = 0;
uint64 InviteGuid = 0;
};
class ComplaintResult final : public ServerPacket
{
public:
explicit ComplaintResult() : ServerPacket(SMSG_COMPLAINT_RESULT, 9) { }
WorldPacket const* Write() override;
uint32 ComplaintType = 0;
uint8 Result = 0;
};
class BugReport final : public ClientPacket
{
public:
explicit BugReport(WorldPacket&& packet) : ClientPacket(CMSG_BUG_REPORT, std::move(packet)) { }
void Read() override;
uint32 Type = 0;
std::string Text;
std::string DiagInfo;
};
}
}
#endif // TRINITYCORE_TICKET_PACKETS_H
|