TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DuelPackets.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 DuelPackets_h__
19 #define DuelPackets_h__
20 
21 #include "Packet.h"
22 #include "ObjectGuid.h"
23 
24 namespace WorldPackets
25 {
26  namespace Duel
27  {
28  class CanDuel final : public ClientPacket
29  {
30  public:
31  CanDuel(WorldPacket&& packet) : ClientPacket(CMSG_CAN_DUEL, std::move(packet)) { }
32 
33  void Read() override;
34 
36  };
37 
38  class CanDuelResult final : public ServerPacket
39  {
40  public:
42 
43  WorldPacket const* Write() override;
44 
46  bool Result = false;
47  };
48 
49  class DuelComplete final : public ServerPacket
50  {
51  public:
53 
54  WorldPacket const* Write() override;
55 
56  bool Started = false;
57  };
58 
59  class DuelCountdown final : public ServerPacket
60  {
61  public:
63 
64  WorldPacket const* Write() override;
65 
67  };
68 
69  class DuelInBounds final : public ServerPacket
70  {
71  public:
73 
74  WorldPacket const* Write() override { return &_worldPacket; }
75  };
76 
77  class DuelOutOfBounds final : public ServerPacket
78  {
79  public:
81 
82  WorldPacket const* Write() override { return &_worldPacket; }
83  };
84 
85  class DuelRequested final : public ServerPacket
86  {
87  public:
89 
90  WorldPacket const* Write() override;
91 
95  };
96 
97  class DuelResponse : public ClientPacket
98  {
99  public:
101 
102  void Read() override;
103 
105  bool Accepted = false;
106  };
107 
108  class DuelWinner final : public ServerPacket
109  {
110  public:
112 
113  WorldPacket const* Write() override;
114 
115  std::string BeatenName;
116  std::string WinnerName;
119  bool Fled = false;
120  };
121  }
122 }
123 
124 #endif // DuelPackets_h__
Definition: Opcodes.h:965
ObjectGuid TargetGUID
Definition: DuelPackets.h:45
DuelOutOfBounds()
Definition: DuelPackets.h:80
WorldPacket const * Write() override
Definition: DuelPackets.cpp:42
ObjectGuid RequestedByWowAccount
Definition: DuelPackets.h:94
DuelCountdown(uint32 countdown)
Definition: DuelPackets.h:62
DuelComplete()
Definition: DuelPackets.h:52
Definition: Opcodes.h:967
Definition: Opcodes.h:871
DuelRequested()
Definition: DuelPackets.h:88
WorldPacket const * Write() override
Definition: DuelPackets.cpp:64
Definition: DuelPackets.h:28
STL namespace.
std::string WinnerName
Definition: DuelPackets.h:116
Definition: Opcodes.h:257
DuelInBounds()
Definition: DuelPackets.h:72
Definition: DuelPackets.h:97
bool Accepted
Definition: DuelPackets.h:105
Definition: DuelPackets.h:85
WorldPacket _worldPacket
Definition: Packet.h:43
bool Result
Definition: DuelPackets.h:46
uint32 BeatenVirtualRealmAddress
Definition: DuelPackets.h:117
Definition: DuelPackets.h:77
WorldPacket const * Write() override
Definition: DuelPackets.cpp:49
Definition: Opcodes.h:962
Definition: Packet.h:59
WorldPacket const * Write() override
Definition: DuelPackets.cpp:34
Definition: DuelPackets.h:59
Definition: Opcodes.h:964
void Read() override
Definition: DuelPackets.cpp:58
ObjectGuid RequestedByGUID
Definition: DuelPackets.h:93
Definition: Packet.h:46
bool Started
Definition: DuelPackets.h:56
Definition: Opcodes.h:966
ObjectGuid ArbiterGUID
Definition: DuelPackets.h:104
uint32_t uint32
Definition: Define.h:150
DuelWinner()
Definition: DuelPackets.h:111
WorldPacket const * Write() override
Definition: DuelPackets.h:82
DuelResponse(WorldPacket &&packet)
Definition: DuelPackets.h:100
WorldPacket const * Write() override
Definition: DuelPackets.cpp:25
Definition: Opcodes.h:153
Definition: BattlegroundMgr.h:57
uint32 WinnerVirtualRealmAddress
Definition: DuelPackets.h:118
CanDuel(WorldPacket &&packet)
Definition: DuelPackets.h:31
Definition: DuelPackets.h:38
void Read() override
Definition: DuelPackets.cpp:20
CanDuelResult()
Definition: DuelPackets.h:41
std::string BeatenName
Definition: DuelPackets.h:115
Definition: Opcodes.h:963
WorldPacket const * Write() override
Definition: DuelPackets.h:74
Definition: DuelPackets.h:69
bool Fled
Definition: DuelPackets.h:119
ObjectGuid ArbiterGUID
Definition: DuelPackets.h:92
Definition: ObjectGuid.h:189
Definition: DuelPackets.h:108
ObjectGuid TargetGUID
Definition: DuelPackets.h:35
Definition: WorldPacket.h:26
Definition: DuelPackets.h:49
uint32 Countdown
Definition: DuelPackets.h:66