TrinityCore
Loading...
Searching...
No Matches
OutdoorPvPTF.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 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
42
56
84
93
94class OutdoorPvPTF;
95
97{
98public:
99 explicit TFControlZoneHandler(OutdoorPvPTF* pvp, uint32 worldstateHorde, uint32 worldstateAlliance, uint32 worldstateNeutral);
100
101 void HandleProgressEventHorde([[maybe_unused]] GameObject* controlZone) override;
102 void HandleProgressEventAlliance([[maybe_unused]] GameObject* controlZone) override;
103 void HandleNeutralEventHorde([[maybe_unused]] GameObject* controlZone) override;
104 void HandleNeutralEventAlliance([[maybe_unused]] GameObject* controlZone) override;
105 void HandleNeutralEvent([[maybe_unused]] GameObject* controlZone) override;
106
110
112
113private:
117};
118
120{
121 public:
122 OutdoorPvPTF(Map* map);
123
124 bool SetupOutdoorPvP() override;
125 void OnGameObjectCreate(GameObject* go) override;
126 void HandlePlayerEnterZone(Player* player, uint32 zone) override;
127 void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
128 void Update(uint32 diff) override;
129 void SendRemoveWorldStates(Player* player) override;
130
135 bool IsLocked() const;
136
137 void ProcessEvent(WorldObject* obj, uint32 eventId, WorldObject* invoker) override;
138 void HandleCapture(TeamId team);
139 private:
147 std::unordered_map<uint32 /*control zone entry*/, std::unique_ptr<TFControlZoneHandler>> _controlZoneHandlers;
148};
149
150#endif
uint32_t uint32
Definition Define.h:154
std::unordered_set< ObjectGuid > GuidUnorderedSet
Definition ObjectGuid.h:435
DefenseMessages
TFWorldStates
@ TF_UI_LOCKED_TIME_MINUTES_FIRST_DIGIT
@ TF_UI_LOCKED_DISPLAY_ALLIANCE
@ TF_UI_LOCKED_TIME_MINUTES_SECOND_DIGIT
@ TF_UI_LOCKED_DISPLAY_NEUTRAL
@ TF_UI_LOCKED_DISPLAY_HORDE
@ TF_UI_TOWER_COUNT_H
@ TF_UI_TOWERS_CONTROLLED_DISPLAY
@ TF_UI_TOWER_COUNT_A
@ TF_UI_LOCKED_TIME_HOURS
OutdoorPvPTF_TowerType
@ TF_TOWER_SE
@ TF_TOWER_N
@ TF_TOWER_NE
@ TF_TOWER_NW
@ TF_TOWER_NUM
@ TF_TOWER_S
@ TEXT_SPIRIT_TOWER_LOSE_HORDE
@ TEXT_SPIRIT_TOWER_TAKEN_ALLIANCE
@ TEXT_SPIRIT_TOWER_TAKEN_HORDE
@ TEXT_BONE_WASTES_TAKEN_HORDE
@ TEXT_BONE_WASTES_TAKEN_ALLIANCE
@ TEXT_SPIRIT_TOWER_LOSE_ALLIANCE
TFGameEvents
@ TF_EVENT_TOWER_S_NEUTRAL_ALLIANCE
@ TF_EVENT_TOWER_S_NEUTRAL_HORDE
@ TF_EVENT_TOWER_NE_HORDE_PROGRESS
@ TF_EVENT_TOWER_NW_NEUTRAL_HORDE
@ TF_EVENT_TOWER_SE_HORDE_PROGRESS
@ TF_EVENT_TOWER_SE_NEUTRAL_ALLIANCE
@ TF_EVENT_TOWER_SE_ALLIANCE_PROGRESS
@ TF_EVENT_TOWER_NE_ALLIANCE_PROGRESS
@ TF_EVENT_TOWER_NE_NEUTRAL_HORDE
@ TF_EVENT_TOWER_SE_NEUTRAL_HORDE
@ TF_EVENT_TOWER_NE_NEUTRAL_ALLIANCE
@ TF_EVENT_TOWER_N_HORDE_PROGRESS
@ TF_EVENT_TOWER_S_HORDE_PROGRESS
@ TF_EVENT_TOWER_NW_NEUTRAL_ALLIANCE
@ TF_EVENT_TOWER_NW_ALLIANCE_PROGRESS
@ TF_EVENT_TOWER_N_ALLIANCE_PROGRESS
@ TF_EVENT_TOWER_S_ALLIANCE_PROGRESS
@ TF_EVENT_TOWER_N_NEUTRAL_HORDE
@ TF_EVENT_TOWER_N_NEUTRAL_ALLIANCE
@ TF_EVENT_TOWER_NW_HORDE_PROGRESS
TFGameObjects
@ TF_ENTRY_TOWER_SE
@ TF_ENTRY_TOWER_N
@ TF_ENTRY_TOWER_NW
@ TF_ENTRY_TOWER_S
@ TF_ENTRY_TOWER_NE
Definition Map.h:225
void HandlePlayerEnterZone(Player *player, uint32 zone) override
void SendRemoveWorldStates(Player *player) override
void SetHordeTowersControlled(uint32 count)
void ProcessEvent(WorldObject *obj, uint32 eventId, WorldObject *invoker) override
uint32 GetHordeTowersControlled() const
void OnGameObjectCreate(GameObject *go) override
uint32 GetAllianceTowersControlled() const
uint32 m_HordeTowersControlled
bool IsLocked() const
uint32 m_AllianceTowersControlled
uint32 second_digit
uint32 m_LockTimer
void HandlePlayerLeaveZone(Player *player, uint32 zone) override
void HandleCapture(TeamId team)
bool SetupOutdoorPvP() override
uint32 m_LockTimerUpdate
void Update(uint32 diff) override
std::unordered_map< uint32, std::unique_ptr< TFControlZoneHandler > > _controlZoneHandlers
uint32 hours_left
uint32 first_digit
GuidUnorderedSet _controlZoneGUIDs
void SetAllianceTowersControlled(uint32 count)
void HandleNeutralEventAlliance(GameObject *controlZone) override
void HandleNeutralEvent(GameObject *controlZone) override
void HandleNeutralEventHorde(GameObject *controlZone) override
void HandleProgressEventAlliance(GameObject *controlZone) override
uint32 GetWorldStateAlliance()
uint32 GetWorldStateNeutral()
void HandleProgressEventHorde(GameObject *controlZone) override
OutdoorPvPTF * GetOutdoorPvPTF() const