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
25{
26 friend class Arena;
27
28 protected:
30
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
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
69 std::string TeamName;
70};
71
72#endif // TRINITY_ARENA_SCORE_H
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ PVP_TEAM_HORDE
@ PVP_TEAM_ALLIANCE
TeamId
@ ALLIANCE
Definition Arena.h:48
uint8 TeamId
Definition ArenaScore.h:42
ArenaScore(ObjectGuid playerGuid, uint32 team)
Definition ArenaScore.h:29
std::string ToString() const override
Definition ArenaScore.h:35
void Assign(int32 ratingChange, uint32 matchMakerRating, std::string const &teamName)
Definition ArenaScore.h:60
uint32 MatchmakerRating
Definition ArenaScore.h:68
int32 RatingChange
Definition ArenaScore.h:67
std::string TeamName
Definition ArenaScore.h:69
virtual void BuildObjectivesBlock(WorldPackets::Battleground::PVPLogData_Player &playerData)=0
virtual void AppendToPacket(WorldPackets::Battleground::PVPLogData_Player &playerData)