TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattlegroundBFG.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 __BATTLEGROUNDBFG_H
19 #define __BATTLEGROUNDBFG_H
20 
21 #include "Battleground.h"
22 #include "BattlegroundScore.h"
23 
25 {
26  protected:
27  BattlegroundBFGScore(ObjectGuid playerGuid, uint32 team) : BattlegroundScore(playerGuid, team), BasesAssaulted(0), BasesDefended(0) { }
28 
29  void UpdateScore(uint32 type, uint32 value) override
30  {
31  switch (type)
32  {
35  break;
38  break;
39  default:
40  BattlegroundScore::UpdateScore(type, value);
41  break;
42  }
43  }
44 
45  void BuildObjectivesBlock(std::vector<int32>& stats) override
46  {
47  stats.push_back(BasesAssaulted);
48  stats.push_back(BasesDefended);
49  }
50 
51  uint32 GetAttr1() const final override { return BasesAssaulted; }
52  uint32 GetAttr2() const final override { return BasesDefended; }
53 
56 };
57 
59 {
60  public:
63 };
64 
65 #endif
uint32 GetAttr1() const finaloverride
Definition: BattlegroundBFG.h:51
virtual void UpdateScore(uint32 type, uint32 value)
Definition: BattlegroundScore.h:65
BattlegroundBFGScore(ObjectGuid playerGuid, uint32 team)
Definition: BattlegroundBFG.h:27
BattlegroundBFG()
Definition: BattlegroundBFG.cpp:20
Definition: BattlegroundScore.h:54
uint32 GetAttr2() const finaloverride
Definition: BattlegroundBFG.h:52
Definition: BattlegroundScore.h:39
uint32_t uint32
Definition: Define.h:150
~BattlegroundBFG()
Definition: BattlegroundBFG.cpp:24
uint32 BasesAssaulted
Definition: BattlegroundBFG.h:54
void UpdateScore(uint32 type, uint32 value) override
Definition: BattlegroundBFG.h:29
Definition: Battleground.h:235
uint32 BasesDefended
Definition: BattlegroundBFG.h:55
const FieldDescriptor value
Definition: descriptor.h:1522
Definition: BattlegroundBFG.h:24
Definition: ObjectGuid.h:189
#define const
Definition: zconf.h:217
Definition: BattlegroundBFG.h:58
void BuildObjectivesBlock(std::vector< int32 > &stats) override
Definition: BattlegroundBFG.h:45
Definition: BattlegroundScore.h:40