TrinityCore
Loading...
Searching...
No Matches
ArenaScore.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 TRINITY_ARENA_SCORE_H
19
#define TRINITY_ARENA_SCORE_H
20
21
#include "
BattlegroundScore.h
"
22
#include <sstream>
23
24
struct
TC_GAME_API
ArenaScore
final :
public
BattlegroundScore
25
{
26
friend
class
Arena
;
27
28
protected
:
29
ArenaScore
(
ObjectGuid
playerGuid,
uint32
team) :
BattlegroundScore
(playerGuid),
TeamId
(team ==
ALLIANCE
?
PVP_TEAM_ALLIANCE
:
PVP_TEAM_HORDE
) { }
30
31
void
AppendToPacket
(
WorldPackets::Battleground::PVPLogData_Player
& playerData)
override
;
32
void
BuildObjectivesBlock
(
WorldPackets::Battleground::PVPLogData_Player
& playerData)
override
;
33
34
// For Logging purpose
35
std::string
ToString
()
const override
36
{
37
std::ostringstream stream;
38
stream <<
"Damage done: "
<< DamageDone <<
", Healing done: "
<< HealingDone <<
", Killing blows: "
<<
KillingBlows
;
39
return
stream.str();
40
}
41
42
uint8
TeamId
;
// PvPTeamId
43
};
44
45
struct
TC_GAME_API
ArenaTeamScore
46
{
47
friend
class
Arena
;
48
friend
class
Battleground
;
49
50
protected
:
51
ArenaTeamScore
() : RatingChange(0), MatchmakerRating(0) { }
52
53
void
Reset
()
54
{
55
RatingChange = 0;
56
MatchmakerRating = 0;
57
TeamName.clear();
58
}
59
60
void
Assign
(
int32
ratingChange,
uint32
matchMakerRating, std::string
const
& teamName)
61
{
62
RatingChange = ratingChange;
63
MatchmakerRating = matchMakerRating;
64
TeamName = teamName;
65
}
66
67
int32
RatingChange
;
68
uint32
MatchmakerRating
;
69
std::string
TeamName
;
70
};
71
72
#endif
// TRINITY_ARENA_SCORE_H
BattlegroundScore.h
TC_GAME_API
#define TC_GAME_API
Definition
Define.h:114
uint8
uint8_t uint8
Definition
Define.h:135
int32
int32_t int32
Definition
Define.h:129
uint32
uint32_t uint32
Definition
Define.h:133
PVP_TEAM_HORDE
@ PVP_TEAM_HORDE
Definition
SharedDefines.h:3562
PVP_TEAM_ALLIANCE
@ PVP_TEAM_ALLIANCE
Definition
SharedDefines.h:3563
TeamId
TeamId
Definition
SharedDefines.h:846
ALLIANCE
@ ALLIANCE
Definition
SharedDefines.h:855
Arena
Definition
Arena.h:48
Battleground
Definition
Battleground.h:249
ObjectGuid
Definition
ObjectGuid.h:138
ArenaScore
Definition
ArenaScore.h:25
ArenaScore::TeamId
uint8 TeamId
Definition
ArenaScore.h:42
ArenaScore::ArenaScore
ArenaScore(ObjectGuid playerGuid, uint32 team)
Definition
ArenaScore.h:29
ArenaScore::ToString
std::string ToString() const override
Definition
ArenaScore.h:35
ArenaTeamScore
Definition
ArenaScore.h:46
ArenaTeamScore::Assign
void Assign(int32 ratingChange, uint32 matchMakerRating, std::string const &teamName)
Definition
ArenaScore.h:60
ArenaTeamScore::MatchmakerRating
uint32 MatchmakerRating
Definition
ArenaScore.h:68
ArenaTeamScore::RatingChange
int32 RatingChange
Definition
ArenaScore.h:67
ArenaTeamScore::Reset
void Reset()
Definition
ArenaScore.h:53
ArenaTeamScore::ArenaTeamScore
ArenaTeamScore()
Definition
ArenaScore.h:51
ArenaTeamScore::TeamName
std::string TeamName
Definition
ArenaScore.h:69
BattlegroundScore
Definition
BattlegroundScore.h:62
BattlegroundScore::KillingBlows
uint32 KillingBlows
Definition
BattlegroundScore.h:122
BattlegroundScore::BuildObjectivesBlock
virtual void BuildObjectivesBlock(WorldPackets::Battleground::PVPLogData_Player &playerData)=0
BattlegroundScore::AppendToPacket
virtual void AppendToPacket(WorldPackets::Battleground::PVPLogData_Player &playerData)
Definition
Battleground.cpp:46
WorldPackets::Battleground::PVPLogData_Player
Definition
BattlegroundPackets.h:100
server
game
Battlegrounds
ArenaScore.h
Generated on Sun May 10 2026 02:30:13 for TrinityCore by
1.9.8