TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OutdoorPvPTF.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_TF_
19 #define OUTDOOR_PVP_TF_
20 
21 #include "OutdoorPvP.h"
22 
24 {
25  TEXT_BONE_WASTES_TAKEN_ALLIANCE = 16120, // (NYI) '|cffffff00The Alliance has taken control of The Bone Wastes!|r'
26  TEXT_BONE_WASTES_TAKEN_HORDE = 16119, // (NYI) '|cffffff00The Horde has taken control of The Bone Wastes!|r'
27  TEXT_SPIRIT_TOWER_TAKEN_ALLIANCE = 18285, // '|cffffff00The Alliance has taken control of a Spirit Tower!|r'
28  TEXT_SPIRIT_TOWER_TAKEN_HORDE = 18286, // '|cffffff00The Horde has taken control of a Spirit Tower!|r'
29  TEXT_SPIRIT_TOWER_LOSE_ALLIANCE = 18288, // '|cffffff00The Alliance has lost control of a Spirit Tower!|r'
30  TEXT_SPIRIT_TOWER_LOSE_HORDE = 18287 // '|cffffff00The Horde has lost control of a Spirit Tower!|r'
31 };
32 
34 
36 {
37  3519 /*Terokkar Forest*/,
38  3791 /*Sethekk Halls*/,
39  3789 /*Shadow Labyrinth*/,
40  3792 /*Mana-Tombs*/,
41  3790 /*Auchenai Crypts*/
42 };
43 
44 // locked for 6 hours after capture
45 const uint32 TF_LOCK_TIME = 3600 * 6 * 1000;
46 
47 // update lock timer every 1/4 minute (overkill, but this way it's sure the timer won't "jump" 2 minutes at once.)
49 
50 // blessing of auchindoun
51 #define TF_CAPTURE_BUFF 33377
52 
53 const uint32 TF_ALLY_QUEST = 11505;
54 const uint32 TF_HORDE_QUEST = 11506;
55 
57 {
64 };
65 
67 {
68  {183104, 530, -3081.65f, 5335.03f, 17.1853f, -2.14675f, 0.0f, 0.0f, 0.878817f, -0.477159f},
69  {183411, 530, -2939.9f, 4788.73f, 18.987f, 2.77507f, 0.0f, 0.0f, 0.983255f, 0.182236f},
70  {183412, 530, -3174.94f, 4440.97f, 16.2281f, 1.86750f, 0.0f, 0.0f, 0.803857f, 0.594823f},
71  {183413, 530, -3603.31f, 4529.15f, 20.9077f, 0.994838f, 0.0f, 0.0f, 0.477159f, 0.878817f},
72  {183414, 530, -3812.37f, 4899.3f, 17.7249f, 0.087266f, 0.0f, 0.0f, 0.043619f, 0.999048f}
73 };
74 
76 {
80 };
81 
83 {
84  {0xa79, 0xa7a, 0xa7b},
85  {0xa7e, 0xa7d, 0xa7c},
86  {0xa82, 0xa81, 0xa80},
87  {0xa88, 0xa87, 0xa86},
88  {0xa85, 0xa84, 0xa83}
89 };
90 
92 {
93  12226,
94  12497,
95  12486,
96  12499,
97  12501
98 };
99 
101 {
102  12225,
103  12496,
104  12487,
105  12498,
106  12500
107 };
108 
110 {
114 
121 };
122 
124 {
128 };
129 
131 {
132  public:
134 
135  bool Update(uint32 diff) override;
136 
137  void ChangeState() override;
138 
140 
141  void UpdateTowerState();
142 
143  protected:
145 
147 };
148 
149 class OutdoorPvPTF : public OutdoorPvP
150 {
151  public:
152  OutdoorPvPTF();
153 
154  bool SetupOutdoorPvP() override;
155 
156  void HandlePlayerEnterZone(Player* player, uint32 zone) override;
157  void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
158 
159  bool Update(uint32 diff) override;
160 
162 
163  void SendRemoveWorldStates(Player* player) override;
164 
167 
169  void SetHordeTowersControlled(uint32 count);
170 
171  bool IsLocked() const;
172 
173  private:
177 
180 
182 };
183 
184 #endif
uint32 hours_left
Definition: OutdoorPvPTF.h:181
const uint32 TF_LOCK_TIME_UPDATE
Definition: OutdoorPvPTF.h:48
uint32 a
Definition: OutdoorPvPTF.h:79
Definition: OutdoorPvPTF.h:25
OutdoorPvPTF_TowerType m_TowerType
Definition: OutdoorPvPTF.h:144
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: OutdoorPvPTF.cpp:49
TFWorldStates
Definition: OutdoorPvPTF.h:109
Definition: OutdoorPvPTF.h:116
void SetAllianceTowersControlled(uint32 count)
Definition: OutdoorPvPTF.cpp:196
Definition: OutdoorPvPTF.h:30
Definition: OutdoorPvP.h:87
Definition: OutdoorPvPTF.h:62
void SetHordeTowersControlled(uint32 count)
Definition: OutdoorPvPTF.cpp:206
Definition: OutdoorPvPTF.h:149
uint32 second_digit
Definition: OutdoorPvPTF.h:181
Definition: OutdoorPvPTF.h:120
uint32 GetHordeTowersControlled() const
Definition: OutdoorPvPTF.cpp:201
uint32 m_AllianceTowersControlled
Definition: OutdoorPvPTF.h:178
uint32 first_digit
Definition: OutdoorPvPTF.h:181
void UpdateTowerState()
Definition: OutdoorPvPTF.cpp:95
bool Update(uint32 diff) override
Definition: OutdoorPvPTF.cpp:243
const uint32 TF_ALLY_QUEST
Definition: OutdoorPvPTF.h:53
Definition: OutdoorPvPTF.h:125
Definition: OutdoorPvPTF.h:126
Definition: OutdoorPvPTF.h:26
Definition: OutdoorPvPTF.h:29
uint32 m_LockTimerUpdate
Definition: OutdoorPvPTF.h:176
Definition: OutdoorPvPTF.h:112
uint32 GetAllianceTowersControlled() const
Definition: OutdoorPvPTF.cpp:191
TFTowerStates
Definition: OutdoorPvPTF.h:123
Definition: OutdoorPvPTF.h:75
const uint32 TF_LOCK_TIME
Definition: OutdoorPvPTF.h:45
uint32 m_TowerState
Definition: OutdoorPvPTF.h:146
void HandlePlayerLeaveZone(Player *player, uint32 zone) override
Definition: OutdoorPvPTF.cpp:184
void ChangeState() override
Definition: OutdoorPvPTF.cpp:253
Definition: OutdoorPvPTF.h:63
OPvPCapturePointTF(OutdoorPvP *pvp, OutdoorPvPTF_TowerType type)
Definition: OutdoorPvPTF.cpp:43
const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM]
Definition: OutdoorPvPTF.h:100
DefenseMessages
Definition: OutdoorPvPHP.h:23
bool SetupOutdoorPvP() override
Definition: OutdoorPvPTF.cpp:216
Definition: OutdoorPvPTF.h:111
const go_type TFCapturePoints[TF_TOWER_NUM]
Definition: OutdoorPvPTF.h:66
Definition: OutdoorPvPTF.h:61
uint32_t uint32
Definition: Define.h:150
Definition: WorldStatePackets.h:27
Definition: OutdoorPvPTF.h:119
const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM]
Definition: OutdoorPvPTF.h:82
bool m_IsLocked
Definition: OutdoorPvPTF.h:174
Definition: OutdoorPvPTF.h:28
const uint32 OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum]
Definition: OutdoorPvPTF.h:35
Definition: OutdoorPvPTF.h:127
Definition: OutdoorPvP.h:188
Definition: OutdoorPvPTF.h:115
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: OutdoorPvPTF.cpp:56
Definition: OutdoorPvPTF.h:118
Definition: OutdoorPvPTF.h:27
void SendRemoveWorldStates(Player *player) override
Definition: OutdoorPvPTF.cpp:73
Definition: OutdoorPvPTF.h:117
uint8_t uint8
Definition: Define.h:152
Definition: OutdoorPvPTF.h:60
Definition: OutdoorPvPTF.h:130
const uint32 TF_HORDE_QUEST
Definition: OutdoorPvPTF.h:54
void HandlePlayerEnterZone(Player *player, uint32 zone) override
Definition: OutdoorPvPTF.cpp:169
uint32 h
Definition: OutdoorPvPTF.h:78
const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM]
Definition: OutdoorPvPTF.h:91
uint32 m_LockTimer
Definition: OutdoorPvPTF.h:175
bool Update(uint32 diff) override
Definition: OutdoorPvPTF.cpp:102
Definition: OutdoorPvPTF.h:58
Definition: OutdoorPvP.h:53
bool IsLocked() const
Definition: OutdoorPvPTF.cpp:211
Definition: OutdoorPvPTF.h:59
OutdoorPvPTF()
Definition: OutdoorPvPTF.cpp:27
OutdoorPvPTF_TowerType
Definition: OutdoorPvPTF.h:56
const uint8 OutdoorPvPTFBuffZonesNum
Definition: OutdoorPvPTF.h:33
uint32 m_HordeTowersControlled
Definition: OutdoorPvPTF.h:179
uint32 n
Definition: OutdoorPvPTF.h:77
Definition: OutdoorPvPTF.h:113