TrinityCore
ReputationPackets.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef ReputationPackets_h__
19#define ReputationPackets_h__
20
21#include "Packet.h"
22#include <array>
23
24namespace WorldPackets
25{
26 namespace Reputation
27 {
28 static constexpr uint16 FactionCount = 1000;
29
30 class InitializeFactions final : public ServerPacket
31 {
32 public:
34
35 WorldPacket const* Write() override;
36
37 std::array<int32, FactionCount> FactionStandings = { };
38 std::array<bool, FactionCount> FactionHasBonus = { };
39 std::array<uint16, FactionCount> FactionFlags = { };
40 };
41
43 {
44 public:
46
47 void Read() override { }
48 };
49
51 {
54 };
55
56 class SetForcedReactions final : public ServerPacket
57 {
58 public:
60
61 WorldPacket const* Write() override;
62
63 std::vector<ForcedReaction> Reactions;
64 };
65
67 {
69 FactionStandingData(int32 index, int32 standing) : Index(index), Standing(standing) { }
70
73 };
74
75 class SetFactionStanding final : public ServerPacket
76 {
77 public:
79
80 WorldPacket const* Write() override;
81
83 std::vector<FactionStandingData> Faction;
84 bool ShowVisual = false;
85 };
86 }
87}
88
89#endif // ReputationPackets_h__
int32_t int32
Definition: Define.h:138
uint16_t uint16
Definition: Define.h:143
std::array< int32, FactionCount > FactionStandings
std::array< bool, FactionCount > FactionHasBonus
std::array< uint16, FactionCount > FactionFlags
std::vector< FactionStandingData > Faction
@ CMSG_REQUEST_FORCED_REACTIONS
Definition: Opcodes.h:714
@ SMSG_SET_FACTION_STANDING
Definition: Opcodes.h:1911
@ SMSG_INITIALIZE_FACTIONS
Definition: Opcodes.h:1426
@ SMSG_SET_FORCED_REACTIONS
Definition: Opcodes.h:1914
static constexpr uint16 FactionCount
STL namespace.
FactionStandingData(int32 index, int32 standing)