TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OutdoorPvPHP.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 OUTDOOR_PVP_HP_
19 #define OUTDOOR_PVP_HP_
20 
21 #include "OutdoorPvP.h"
22 
24 {
25  TEXT_OVERLOOK_TAKEN_ALLIANCE = 14841, // '|cffffff00The Overlook has been taken by the Alliance!|r'
26  TEXT_OVERLOOK_TAKEN_HORDE = 14842, // '|cffffff00The Overlook has been taken by the Horde!|r'
27  TEXT_STADIUM_TAKEN_ALLIANCE = 14843, // '|cffffff00The Stadium has been taken by the Alliance!|r'
28  TEXT_STADIUM_TAKEN_HORDE = 14844, // '|cffffff00The Stadium has been taken by the Horde!|r'
29  TEXT_BROKEN_HILL_TAKEN_ALLIANCE = 14845, // '|cffffff00Broken Hill has been taken by the Alliance!|r'
30  TEXT_BROKEN_HILL_TAKEN_HORDE = 14846, // '|cffffff00Broken Hill has been taken by the Horde!|r'
31 };
32 
33 #define OutdoorPvPHPBuffZonesNum 6
34  // HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
35 const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
36 
38 {
41  AllianceBuff = 32071,
42  HordeBuff = 32049
43 };
44 
46 {
51 };
52 
53 const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032, 19028, 19029};
54 
55 const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404, 11396, 11388};
56 
57 const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403, 11395, 11387};
58 
60 {
63 
66 };
67 
68 const uint32 HP_MAP_N[HP_TOWER_NUM] = {0x9b5, 0x9b2, 0x9a8};
69 
70 const uint32 HP_MAP_A[HP_TOWER_NUM] = {0x9b3, 0x9b0, 0x9a7};
71 
72 const uint32 HP_MAP_H[HP_TOWER_NUM] = {0x9b4, 0x9b1, 0x9a6};
73 
74 const uint32 HP_TowerArtKit_A[HP_TOWER_NUM] = {65, 62, 67};
75 
76 const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64, 61, 68};
77 
78 const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66, 63, 69};
79 
81 {
82  {182175, 530, -471.462f, 3451.09f, 34.6432f, 0.174533f, 0.0f, 0.0f, 0.087156f, 0.996195f}, // 0 - Broken Hill
83  {182174, 530, -184.889f, 3476.93f, 38.205f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f}, // 1 - Overlook
84  {182173, 530, -290.016f, 3702.42f, 56.6729f, 0.034907f, 0.0f, 0.0f, 0.017452f, 0.999848f} // 2 - Stadium
85 };
86 
88 {
89  {183514, 530, -467.078f, 3528.17f, 64.7121f, 3.14159f, 0.0f, 0.0f, 1.0f, 0.0f}, // 0 broken hill
90  {182525, 530, -187.887f, 3459.38f, 60.0403f, -3.12414f, 0.0f, 0.0f, 0.999962f, -0.008727f}, // 1 overlook
91  {183515, 530, -289.610f, 3696.83f, 75.9447f, 3.12414f, 0.0f, 0.0f, 0.999962f, 0.008727f} // 2 stadium
92 };
93 
95 {
96  public:
98 
99  void ChangeState() override;
100 
102 
103  private:
105 };
106 
107 class OutdoorPvPHP : public OutdoorPvP
108 {
109  public:
110  OutdoorPvPHP();
111 
112  bool SetupOutdoorPvP() override;
113 
114  void HandlePlayerEnterZone(Player* player, uint32 zone) override;
115  void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
116 
117  bool Update(uint32 diff) override;
118 
120 
121  void SendRemoveWorldStates(Player* player) override;
122 
123  void HandleKillImpl(Player* player, Unit* killed) override;
124 
127 
129  void SetHordeTowersControlled(uint32 count);
130 
131  private:
132  // how many towers are controlled
135 };
136 
137 #endif
Definition: OutdoorPvPHP.h:47
Definition: OutdoorPvPHP.h:26
Definition: OutdoorPvPHP.h:41
const go_type HPTowerFlags[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:87
bool Update(uint32 diff) override
Definition: OutdoorPvPHP.cpp:113
const go_type HPCapturePoints[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:80
uint32 m_HordeTowersControlled
Definition: OutdoorPvPHP.h:134
void HandlePlayerLeaveZone(Player *player, uint32 zone) override
Definition: OutdoorPvPHP.cpp:99
Definition: OutdoorPvP.h:87
Definition: OutdoorPvPHP.h:40
const uint32 HP_MAP_N[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:68
Definition: OutdoorPvPHP.h:65
const uint32 HP_MAP_H[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:72
uint32 GetHordeTowersControlled() const
Definition: OutdoorPvPHP.cpp:310
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: OutdoorPvPHP.cpp:262
void SetHordeTowersControlled(uint32 count)
Definition: OutdoorPvPHP.cpp:315
Definition: OutdoorPvPHP.h:28
uint32 m_AllianceTowersControlled
Definition: OutdoorPvPHP.h:133
Definition: OutdoorPvPHP.h:25
void HandleKillImpl(Player *player, Unit *killed) override
Definition: OutdoorPvPHP.cpp:289
bool SetupOutdoorPvP() override
Definition: OutdoorPvPHP.cpp:64
Definition: OutdoorPvPHP.h:29
const uint32 HP_CREDITMARKER[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:53
const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:57
Definition: OutdoorPvPHP.h:30
Definition: OutdoorPvPHP.h:64
Definition: OutdoorPvPHP.h:39
const uint32 HP_TowerArtKit_N[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:78
Definition: OutdoorPvPHP.h:42
DefenseMessages
Definition: OutdoorPvPHP.h:23
uint32 GetAllianceTowersControlled() const
Definition: OutdoorPvPHP.cpp:300
Definition: OutdoorPvPHP.h:48
Definition: OutdoorPvPHP.h:27
uint32_t uint32
Definition: Define.h:150
const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:55
Definition: WorldStatePackets.h:27
OutdoorPvPHP()
Definition: OutdoorPvPHP.cpp:57
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: OutdoorPvPHP.cpp:148
Definition: OutdoorPvPHP.h:107
Definition: OutdoorPvPHP.h:94
Definition: OutdoorPvPHP.h:61
Definition: OutdoorPvP.h:188
void HandlePlayerEnterZone(Player *player, uint32 zone) override
Definition: OutdoorPvPHP.cpp:83
const uint32 HP_TowerArtKit_A[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:74
Definition: OutdoorPvPHP.h:62
OutdoorPvPHPTowerType m_TowerType
Definition: OutdoorPvPHP.h:104
const uint32 HP_MAP_A[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:70
#define OutdoorPvPHPBuffZonesNum
Definition: OutdoorPvPHP.h:33
OutdoorPvPHPTowerType
Definition: OutdoorPvPHP.h:45
Definition: OutdoorPvPHP.h:49
void SetAllianceTowersControlled(uint32 count)
Definition: OutdoorPvPHP.cpp:305
void SendRemoveWorldStates(Player *player) override
Definition: OutdoorPvPHP.cpp:133
const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum]
Definition: OutdoorPvPHP.h:35
OutdoorPvPHPWorldStates
Definition: OutdoorPvPHP.h:59
Definition: OutdoorPvPHP.h:50
OutdoorPvPHPSpells
Definition: OutdoorPvPHP.h:37
const uint32 HP_TowerArtKit_H[HP_TOWER_NUM]
Definition: OutdoorPvPHP.h:76
Definition: Unit.h:1305
Definition: OutdoorPvP.h:53
OPvPCapturePointHP(OutdoorPvP *pvp, OutdoorPvPHPTowerType type)
Definition: OutdoorPvPHP.cpp:31
void ChangeState() override
Definition: OutdoorPvPHP.cpp:159