TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ReputationPackets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 
23 namespace WorldPackets
24 {
25  namespace Reputation
26  {
27  static uint16 const FactionCount = 256;
28 
29  class InitializeFactions final : public ServerPacket
30  {
31  public:
33  {
34  for (uint16 i = 0; i < FactionCount; ++i)
35  {
36  FactionStandings[i] = 0;
37  FactionHasBonus[i] = false;
38  FactionFlags[i] = 0;
39  }
40  }
41 
42  WorldPacket const* Write() override;
43 
47  };
48 
49  class RequestForcedReactions final : public ClientPacket
50  {
51  public:
53 
54  void Read() override { }
55  };
56 
58  {
61  };
62 
63  class SetForcedReactions final : public ServerPacket
64  {
65  public:
67 
68  WorldPacket const* Write() override;
69 
70  std::vector<ForcedReaction> Reactions;
71  };
72 
74  {
76  FactionStandingData(int32 index, int32 standing) : Index(index), Standing(standing) { }
77 
78  int32 Index = 0;
80  };
81 
82  class SetFactionStanding final : public ServerPacket
83  {
84  public:
86 
87  WorldPacket const* Write() override;
88 
89  float ReferAFriendBonus = 0.0f;
91  std::vector<FactionStandingData> Faction;
92  bool ShowVisual = false;
93  };
94  }
95 }
96 
97 #endif // ReputationPackets_h__
static uint16 const FactionCount
Definition: ReputationPackets.h:27
FactionStandingData(int32 index, int32 standing)
Definition: ReputationPackets.h:76
Definition: ReputationPackets.h:63
InitializeFactions()
Definition: ReputationPackets.h:32
Definition: Opcodes.h:1120
float ReferAFriendBonus
Definition: ReputationPackets.h:89
Faction
Definition: boss_zum_rah.cpp:50
Definition: Opcodes.h:564
WorldPacket const * Write() override
Definition: ReputationPackets.cpp:43
STL namespace.
SetForcedReactions()
Definition: ReputationPackets.h:66
Definition: ReputationPackets.h:49
Definition: Opcodes.h:1504
std::vector< FactionStandingData > Faction
Definition: ReputationPackets.h:91
bool ShowVisual
Definition: ReputationPackets.h:92
int32 Reaction
Definition: ReputationPackets.h:60
Definition: Packet.h:59
Definition: Opcodes.h:1501
Definition: ReputationPackets.h:73
Definition: ReputationPackets.h:57
Definition: ReputationPackets.h:29
void Read() override
Definition: ReputationPackets.h:54
WorldPacket const * Write() override
Definition: ReputationPackets.cpp:20
RequestForcedReactions(WorldPacket &&packet)
Definition: ReputationPackets.h:52
Definition: Packet.h:46
int32 Standing
Definition: ReputationPackets.h:79
Definition: ReputationPackets.h:82
int32_t int32
Definition: Define.h:146
uint16_t uint16
Definition: Define.h:151
std::vector< ForcedReaction > Reactions
Definition: ReputationPackets.h:70
WorldPacket const * Write() override
Definition: ReputationPackets.cpp:61
int32 Index
Definition: ReputationPackets.h:78
Definition: BattlegroundMgr.h:57
uint8_t uint8
Definition: Define.h:152
float BonusFromAchievementSystem
Definition: ReputationPackets.h:90
SetFactionStanding()
Definition: ReputationPackets.h:85
FactionFlags
Definition: ReputationMgr.h:35
int32 FactionStandings[FactionCount]
Definition: ReputationPackets.h:44
Definition: WorldPacket.h:26
bool FactionHasBonus[FactionCount]
Definition: ReputationPackets.h:45
FactionStandingData()
Definition: ReputationPackets.h:75