Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
BattlegroundVOP.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#ifndef SF_BATTLEGROUND_VOP_H
7
#define SF_BATTLEGROUND_VOP_H
8
9
#include "
Battleground.h
"
10
11
#define BG_VOP_MAX_TEAM_SCORE 1600
12
13
enum
BG_VOP_Spells
14
{
15
BG_VOP_SPELL_ORB_PICKED_UP_1
= 121164,
16
BG_VOP_SPELL_ORB_PICKED_UP_2
= 121175,
17
BG_VOP_SPELL_ORB_PICKED_UP_3
= 121176,
18
BG_VOP_SPELL_ORB_PICKED_UP_4
= 121177,
19
20
BG_VOP_SPELL_ORB_AURA_1
= 121217,
21
BG_VOP_SPELL_ORB_AURA_2
= 121219,
22
BG_VOP_SPELL_ORB_AURA_3
= 121220,
23
BG_VOP_SPELL_ORB_AURA_4
= 121221
24
};
25
26
enum
BG_VOP_Objects
27
{
28
BG_VOP_OBJECT_DOOR_A
= 0,
29
BG_VOP_OBJECT_DOOR_H
= 1,
30
BG_VOP_OBJECT_ORB_1
= 2,
31
BG_VOP_OBJECT_ORB_2
= 3,
32
BG_VOP_OBJECT_ORB_3
= 4,
33
BG_VOP_OBJECT_ORB_4
= 5,
34
BG_VOP_OBJECT_BUFF_NORTH
= 6,
35
BG_VOP_OBJECT_BUFF_SOUTH
= 7,
36
BG_VOP_OBJECT_MAX
= 8
37
};
38
39
enum
BG_VOP_Creatures
40
{
41
BG_VOP_CREATURE_ORB_AURA_1
= 0,
42
BG_VOP_CREATURE_ORB_AURA_2
= 1,
43
BG_VOP_CREATURE_ORB_AURA_3
= 2,
44
BG_VOP_CREATURE_ORB_AURA_4
= 3,
45
BG_VOP_CREATURE_SPIRIT_1
= 4,
46
BG_VOP_CREATURE_SPIRIT_2
= 5,
47
BG_VOP_CREATURE_MAX
= 6
48
};
49
50
enum
BG_VOP_Objets_Entry
51
{
52
BG_VOP_OBJECT_DOOR_ENTRY
= 213172,
53
BG_VOP_OBJECT_ORB_1_ENTRY
= 212091,
54
BG_VOP_OBJECT_ORB_2_ENTRY
= 212092,
55
BG_VOP_OBJECT_ORB_3_ENTRY
= 212093,
56
BG_VOP_OBJECT_ORB_4_ENTRY
= 212094,
57
};
58
enum
BG_VOP_WorldStates
59
{
60
BG_VOP_OP_RESOURCES_MAX
= 1780,
61
BG_VOP_OP_RESOURCES_A
= 6303,
62
BG_VOP_OP_RESOURCES_H
= 6304
63
};
64
65
// Tick intervals and given points: case 0, 1, 2, 3, 4
66
const
uint32
BG_VOP_TickIntervals
[5] = { 15000, 12000, 9000, 6000, 3000 };
67
const
uint32
BG_VOP_TickPoints
[5] = { 0, 10, 10, 10, 10 };
68
69
const
uint32
BG_VOP_PK_VP
= 10;
70
const
uint32
BG_VOP_SOUND_ORB
= 8174;
71
72
struct
BattlegroundVOPScore
:
public
BattlegroundScore
73
{
74
BattlegroundVOPScore
() :
OrbControl
(0),
OrbScore
(0) { }
75
~BattlegroundVOPScore
() { }
76
uint32
OrbControl
;
77
uint32
OrbScore
;
78
};
79
80
class
BattlegroundVOP
:
public
Battleground
81
{
82
public
:
83
BattlegroundVOP
();
84
~BattlegroundVOP
() { }
85
86
/* inherited from BattlegroundClass */
87
void
AddPlayer
(
Player
* player)
OVERRIDE
;
88
void
StartingEventCloseDoors
()
OVERRIDE
;
89
void
StartingEventOpenDoors
()
OVERRIDE
;
90
/* Battleground Events */
91
void
EventPlayerClickedOnFlag
(
Player
* Source,
GameObject
* target_obj)
OVERRIDE
;
92
void
RemovePlayer
(
Player
* player,
uint64
guid,
uint32
team)
OVERRIDE
;
93
void
HandleKillPlayer
(
Player
* player,
Player
* killer)
OVERRIDE
;
94
WorldSafeLocsEntry
const*
GetClosestGraveYard
(
Player
* player)
OVERRIDE
;
95
bool
SetupBattleground
()
OVERRIDE
;
96
void
Reset
()
OVERRIDE
;
97
void
UpdateTeamScore
(
uint32
Team
);
98
void
EndBattleground
(
uint32
winner);
99
void
UpdatePlayerScore
(
Player
* Source,
uint32
type,
uint32
value,
bool
doAddHonor = true)
OVERRIDE
;
100
void
FillInitialWorldStates
(
WorldStateBuilder
& builder)
OVERRIDE
;
101
uint32
GetPrematureWinner
()
OVERRIDE
;
102
void
PostUpdateImpl
(
uint32
diff)
OVERRIDE
;
103
104
private:
105
uint64
m_FlagKeeper
[4] = { };
106
uint32
m_HonorScoreTics
[
BG_TEAMS_COUNT
] = { };
107
uint32
m_HonorTics
;
108
uint32
m_lastTick
[
BG_TEAMS_COUNT
] = { };
109
bool
m_TeamScores500Disadvantage
[
BG_TEAMS_COUNT
] = { };
110
};
111
112
#endif
Battleground.h
BG_TEAMS_COUNT
#define BG_TEAMS_COUNT
Definition
Battleground.h:221
BG_VOP_TickIntervals
const uint32 BG_VOP_TickIntervals[5]
Definition
BattlegroundVOP.h:66
BG_VOP_TickPoints
const uint32 BG_VOP_TickPoints[5]
Definition
BattlegroundVOP.h:67
BG_VOP_PK_VP
const uint32 BG_VOP_PK_VP
Definition
BattlegroundVOP.h:69
BG_VOP_Objets_Entry
BG_VOP_Objets_Entry
Definition
BattlegroundVOP.h:51
BG_VOP_OBJECT_ORB_4_ENTRY
@ BG_VOP_OBJECT_ORB_4_ENTRY
Definition
BattlegroundVOP.h:56
BG_VOP_OBJECT_ORB_2_ENTRY
@ BG_VOP_OBJECT_ORB_2_ENTRY
Definition
BattlegroundVOP.h:54
BG_VOP_OBJECT_DOOR_ENTRY
@ BG_VOP_OBJECT_DOOR_ENTRY
Definition
BattlegroundVOP.h:52
BG_VOP_OBJECT_ORB_3_ENTRY
@ BG_VOP_OBJECT_ORB_3_ENTRY
Definition
BattlegroundVOP.h:55
BG_VOP_OBJECT_ORB_1_ENTRY
@ BG_VOP_OBJECT_ORB_1_ENTRY
Definition
BattlegroundVOP.h:53
BG_VOP_WorldStates
BG_VOP_WorldStates
Definition
BattlegroundVOP.h:59
BG_VOP_OP_RESOURCES_MAX
@ BG_VOP_OP_RESOURCES_MAX
Definition
BattlegroundVOP.h:60
BG_VOP_OP_RESOURCES_A
@ BG_VOP_OP_RESOURCES_A
Definition
BattlegroundVOP.h:61
BG_VOP_OP_RESOURCES_H
@ BG_VOP_OP_RESOURCES_H
Definition
BattlegroundVOP.h:62
BG_VOP_Objects
BG_VOP_Objects
Definition
BattlegroundVOP.h:27
BG_VOP_OBJECT_MAX
@ BG_VOP_OBJECT_MAX
Definition
BattlegroundVOP.h:36
BG_VOP_OBJECT_DOOR_H
@ BG_VOP_OBJECT_DOOR_H
Definition
BattlegroundVOP.h:29
BG_VOP_OBJECT_ORB_3
@ BG_VOP_OBJECT_ORB_3
Definition
BattlegroundVOP.h:32
BG_VOP_OBJECT_ORB_4
@ BG_VOP_OBJECT_ORB_4
Definition
BattlegroundVOP.h:33
BG_VOP_OBJECT_ORB_1
@ BG_VOP_OBJECT_ORB_1
Definition
BattlegroundVOP.h:30
BG_VOP_OBJECT_BUFF_SOUTH
@ BG_VOP_OBJECT_BUFF_SOUTH
Definition
BattlegroundVOP.h:35
BG_VOP_OBJECT_ORB_2
@ BG_VOP_OBJECT_ORB_2
Definition
BattlegroundVOP.h:31
BG_VOP_OBJECT_BUFF_NORTH
@ BG_VOP_OBJECT_BUFF_NORTH
Definition
BattlegroundVOP.h:34
BG_VOP_OBJECT_DOOR_A
@ BG_VOP_OBJECT_DOOR_A
Definition
BattlegroundVOP.h:28
BG_VOP_SOUND_ORB
const uint32 BG_VOP_SOUND_ORB
Definition
BattlegroundVOP.h:70
BG_VOP_Spells
BG_VOP_Spells
Definition
BattlegroundVOP.h:14
BG_VOP_SPELL_ORB_PICKED_UP_1
@ BG_VOP_SPELL_ORB_PICKED_UP_1
Definition
BattlegroundVOP.h:15
BG_VOP_SPELL_ORB_PICKED_UP_3
@ BG_VOP_SPELL_ORB_PICKED_UP_3
Definition
BattlegroundVOP.h:17
BG_VOP_SPELL_ORB_AURA_1
@ BG_VOP_SPELL_ORB_AURA_1
Definition
BattlegroundVOP.h:20
BG_VOP_SPELL_ORB_PICKED_UP_4
@ BG_VOP_SPELL_ORB_PICKED_UP_4
Definition
BattlegroundVOP.h:18
BG_VOP_SPELL_ORB_AURA_4
@ BG_VOP_SPELL_ORB_AURA_4
Definition
BattlegroundVOP.h:23
BG_VOP_SPELL_ORB_AURA_2
@ BG_VOP_SPELL_ORB_AURA_2
Definition
BattlegroundVOP.h:21
BG_VOP_SPELL_ORB_AURA_3
@ BG_VOP_SPELL_ORB_AURA_3
Definition
BattlegroundVOP.h:22
BG_VOP_SPELL_ORB_PICKED_UP_2
@ BG_VOP_SPELL_ORB_PICKED_UP_2
Definition
BattlegroundVOP.h:16
BG_VOP_Creatures
BG_VOP_Creatures
Definition
BattlegroundVOP.h:40
BG_VOP_CREATURE_MAX
@ BG_VOP_CREATURE_MAX
Definition
BattlegroundVOP.h:47
BG_VOP_CREATURE_SPIRIT_2
@ BG_VOP_CREATURE_SPIRIT_2
Definition
BattlegroundVOP.h:46
BG_VOP_CREATURE_ORB_AURA_1
@ BG_VOP_CREATURE_ORB_AURA_1
Definition
BattlegroundVOP.h:41
BG_VOP_CREATURE_ORB_AURA_4
@ BG_VOP_CREATURE_ORB_AURA_4
Definition
BattlegroundVOP.h:44
BG_VOP_CREATURE_SPIRIT_1
@ BG_VOP_CREATURE_SPIRIT_1
Definition
BattlegroundVOP.h:45
BG_VOP_CREATURE_ORB_AURA_2
@ BG_VOP_CREATURE_ORB_AURA_2
Definition
BattlegroundVOP.h:42
BG_VOP_CREATURE_ORB_AURA_3
@ BG_VOP_CREATURE_ORB_AURA_3
Definition
BattlegroundVOP.h:43
uint32
std::uint32_t uint32
Definition
Define.h:77
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
uint64
std::uint64_t uint64
Definition
Define.h:76
Team
Team
Definition
SharedDefines.h:875
Battleground::Battleground
Battleground()
Definition
Battleground.cpp:105
BattlegroundVOP::m_FlagKeeper
uint64 m_FlagKeeper[4]
Definition
BattlegroundVOP.h:105
BattlegroundVOP::FillInitialWorldStates
void FillInitialWorldStates(WorldStateBuilder &builder) OVERRIDE
Definition
BattlegroundVOP.cpp:389
BattlegroundVOP::HandleKillPlayer
void HandleKillPlayer(Player *player, Player *killer) OVERRIDE
Definition
BattlegroundVOP.cpp:289
BattlegroundVOP::AddPlayer
void AddPlayer(Player *player) OVERRIDE
Definition
BattlegroundVOP.cpp:281
BattlegroundVOP::EndBattleground
void EndBattleground(uint32 winner)
Definition
BattlegroundVOP.cpp:249
BattlegroundVOP::m_HonorTics
uint32 m_HonorTics
Definition
BattlegroundVOP.h:107
BattlegroundVOP::UpdateTeamScore
void UpdateTeamScore(uint32 Team)
Definition
BattlegroundVOP.cpp:114
BattlegroundVOP::RemovePlayer
void RemovePlayer(Player *player, uint64 guid, uint32 team) OVERRIDE
Definition
BattlegroundVOP.cpp:112
BattlegroundVOP::BattlegroundVOP
BattlegroundVOP()
Definition
BattlegroundVOP.cpp:16
BattlegroundVOP::EventPlayerClickedOnFlag
void EventPlayerClickedOnFlag(Player *Source, GameObject *target_obj) OVERRIDE
Definition
BattlegroundVOP.cpp:133
BattlegroundVOP::GetClosestGraveYard
WorldSafeLocsEntry const * GetClosestGraveYard(Player *player) OVERRIDE
Definition
BattlegroundVOP.cpp:364
BattlegroundVOP::m_lastTick
uint32 m_lastTick[BG_TEAMS_COUNT]
Definition
BattlegroundVOP.h:108
BattlegroundVOP::m_HonorScoreTics
uint32 m_HonorScoreTics[BG_TEAMS_COUNT]
Definition
BattlegroundVOP.h:106
BattlegroundVOP::Reset
void Reset() OVERRIDE
Definition
BattlegroundVOP.cpp:263
BattlegroundVOP::StartingEventOpenDoors
void StartingEventOpenDoors() OVERRIDE
Definition
BattlegroundVOP.cpp:103
BattlegroundVOP::PostUpdateImpl
void PostUpdateImpl(uint32 diff) OVERRIDE
Post-update hook.
Definition
BattlegroundVOP.cpp:28
BattlegroundVOP::GetPrematureWinner
uint32 GetPrematureWinner() OVERRIDE
Definition
BattlegroundVOP.cpp:398
BattlegroundVOP::m_TeamScores500Disadvantage
bool m_TeamScores500Disadvantage[BG_TEAMS_COUNT]
Definition
BattlegroundVOP.h:109
BattlegroundVOP::StartingEventCloseDoors
void StartingEventCloseDoors() OVERRIDE
Definition
BattlegroundVOP.cpp:94
BattlegroundVOP::UpdatePlayerScore
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor=true) OVERRIDE
Definition
BattlegroundVOP.cpp:344
BattlegroundVOP::~BattlegroundVOP
~BattlegroundVOP()
Definition
BattlegroundVOP.h:84
BattlegroundVOP::SetupBattleground
bool SetupBattleground() OVERRIDE
Definition
BattlegroundVOP.cpp:185
GameObject
Definition
GameObject.h:629
Player
Definition
Player.h:1289
WorldStateBuilder
Definition
WorldStateBuilder.h:16
BattlegroundScore::BattlegroundScore
BattlegroundScore()
Definition
Battleground.h:250
BattlegroundVOPScore::OrbControl
uint32 OrbControl
Definition
BattlegroundVOP.h:76
BattlegroundVOPScore::OrbScore
uint32 OrbScore
Definition
BattlegroundVOP.h:77
BattlegroundVOPScore::~BattlegroundVOPScore
~BattlegroundVOPScore()
Definition
BattlegroundVOP.h:75
BattlegroundVOPScore::BattlegroundVOPScore
BattlegroundVOPScore()
Definition
BattlegroundVOP.h:74
WorldSafeLocsEntry
Definition
DBCStructure.h:2977
src
server
game
Battlegrounds
Zones
BattlegroundVOP.h
Generated on
for Project SkyFire Core by
1.17.0