TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Battleground.h File Reference
#include "ArenaScore.h"
#include "Common.h"
#include "SharedDefines.h"
#include "DBCEnums.h"
#include "WorldPacket.h"
#include "Object.h"
#include "GameObject.h"
#include "Packets/WorldStatePackets.h"
#include "Packets/BattlegroundPackets.h"
#include "EventMap.h"
+ Include dependency graph for Battleground.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BattlegroundPlayer
 
struct  BattlegroundObjectInfo
 
class  Battleground
 

Macros

#define BG_STARTING_EVENT_COUNT   4
 
#define BG_AWARD_ARENA_POINTS_MIN_LEVEL   71
 
#define ARENA_TIMELIMIT_POINTS_LOSS   -16
 

Enumerations

enum  BattlegroundCriteriaId {
  BG_CRITERIA_CHECK_RESILIENT_VICTORY, BG_CRITERIA_CHECK_SAVE_THE_DAY, BG_CRITERIA_CHECK_EVERYTHING_COUNTS, BG_CRITERIA_CHECK_AV_PERFECTION,
  BG_CRITERIA_CHECK_DEFENSE_OF_THE_ANCIENTS, BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH
}
 
enum  BattlegroundSounds { SOUND_HORDE_WINS = 8454, SOUND_ALLIANCE_WINS = 8455, SOUND_BG_START = 3439, SOUND_BG_START_L70ETC = 11803 }
 
enum  BattlegroundQuests {
  SPELL_WS_QUEST_REWARD = 43483, SPELL_AB_QUEST_REWARD = 43484, SPELL_AV_QUEST_REWARD = 43475, SPELL_AV_QUEST_KILLED_BOSS = 23658,
  SPELL_EY_QUEST_REWARD = 43477, SPELL_SA_QUEST_REWARD = 61213, SPELL_AB_QUEST_REWARD_4_BASES = 24061, SPELL_AB_QUEST_REWARD_5_BASES = 24064
}
 
enum  BattlegroundMarks {
  SPELL_WS_MARK_LOSER = 24950, SPELL_WS_MARK_WINNER = 24951, SPELL_AB_MARK_LOSER = 24952, SPELL_AB_MARK_WINNER = 24953,
  SPELL_AV_MARK_LOSER = 24954, SPELL_AV_MARK_WINNER = 24955, SPELL_SA_MARK_WINNER = 61160, SPELL_SA_MARK_LOSER = 61159,
  ITEM_AV_MARK_OF_HONOR = 20560, ITEM_WS_MARK_OF_HONOR = 20558, ITEM_AB_MARK_OF_HONOR = 20559, ITEM_EY_MARK_OF_HONOR = 29024,
  ITEM_SA_MARK_OF_HONOR = 42425
}
 
enum  BattlegroundMarksCount { ITEM_WINNER_COUNT = 3, ITEM_LOSER_COUNT = 1 }
 
enum  BattlegroundCreatures { BG_CREATURE_ENTRY_A_SPIRITGUIDE = 13116, BG_CREATURE_ENTRY_H_SPIRITGUIDE = 13117 }
 
enum  BattlegroundSpells {
  SPELL_WAITING_FOR_RESURRECT = 2584, SPELL_SPIRIT_HEAL_CHANNEL = 22011, SPELL_SPIRIT_HEAL = 22012, SPELL_RESURRECTION_VISUAL = 24171,
  SPELL_ARENA_PREPARATION = 32727, SPELL_PREPARATION = 44521, SPELL_SPIRIT_HEAL_MANA = 44535, SPELL_RECENTLY_DROPPED_FLAG = 42792,
  SPELL_AURA_PLAYER_INACTIVE = 43681, SPELL_HONORABLE_DEFENDER_25Y = 68652, SPELL_HONORABLE_DEFENDER_60Y = 66157
}
 
enum  BattlegroundTimeIntervals {
  CHECK_PLAYER_POSITION_INVERVAL = 1000, RESURRECTION_INTERVAL = 30000, INVITATION_REMIND_TIME = 20000, INVITE_ACCEPT_WAIT_TIME = 90000,
  TIME_AUTOCLOSE_BATTLEGROUND = 120000, MAX_OFFLINE_TIME = 300, RESPAWN_ONE_DAY = 86400, RESPAWN_IMMEDIATELY = 0,
  BUFF_RESPAWN_TIME = 180, BATTLEGROUND_COUNTDOWN_MAX = 120, ARENA_COUNTDOWN_MAX = 60, PLAYER_POSITION_UPDATE_INTERVAL = 5
}
 
enum  BattlegroundStartTimeIntervals {
  BG_START_DELAY_2M = 120000, BG_START_DELAY_1M = 60000, BG_START_DELAY_30S = 30000, BG_START_DELAY_15S = 15000,
  BG_START_DELAY_NONE = 0
}
 
enum  BattlegroundBuffObjects { BG_OBJECTID_SPEEDBUFF_ENTRY = 179871, BG_OBJECTID_REGENBUFF_ENTRY = 179904, BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905 }
 
enum  BattlegroundStatus {
  STATUS_NONE = 0, STATUS_WAIT_QUEUE = 1, STATUS_WAIT_JOIN = 2, STATUS_IN_PROGRESS = 3,
  STATUS_WAIT_LEAVE = 4
}
 
enum  ArenaType { ARENA_TYPE_2v2 = 2, ARENA_TYPE_3v3 = 3, ARENA_TYPE_5v5 = 5 }
 
enum  BattlegroundStartingEvents {
  BG_STARTING_EVENT_NONE = 0x00, BG_STARTING_EVENT_1 = 0x01, BG_STARTING_EVENT_2 = 0x02, BG_STARTING_EVENT_3 = 0x04,
  BG_STARTING_EVENT_4 = 0x08
}
 
enum  BattlegroundStartingEventsIds { BG_STARTING_EVENT_FIRST = 0, BG_STARTING_EVENT_SECOND = 1, BG_STARTING_EVENT_THIRD = 2, BG_STARTING_EVENT_FOURTH = 3 }
 
enum  BGHonorMode { BG_NORMAL = 0, BG_HOLIDAY, BG_HONOR_MODE_NUM }
 
enum  BattlegroundPlayerPositionConstants {
  PLAYER_POSITION_ICON_NONE = 0, PLAYER_POSITION_ICON_HORDE_FLAG = 1, PLAYER_POSITION_ICON_ALLIANCE_FLAG = 2, PLAYER_POSITION_ARENA_SLOT_NONE = 1,
  PLAYER_POSITION_ARENA_SLOT_1 = 2, PLAYER_POSITION_ARENA_SLOT_2 = 3, PLAYER_POSITION_ARENA_SLOT_3 = 4, PLAYER_POSITION_ARENA_SLOT_4 = 5,
  PLAYER_POSITION_ARENA_SLOT_5 = 6
}
 

Variables

uint32 const Buff_Entries [3] = { BG_OBJECTID_SPEEDBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY }
 

Macro Definition Documentation

#define ARENA_TIMELIMIT_POINTS_LOSS   -16
#define BG_AWARD_ARENA_POINTS_MIN_LEVEL   71
#define BG_STARTING_EVENT_COUNT   4

Enumeration Type Documentation

enum ArenaType
Enumerator
ARENA_TYPE_2v2 
ARENA_TYPE_3v3 
ARENA_TYPE_5v5 
180 {
181  ARENA_TYPE_2v2 = 2,
182  ARENA_TYPE_3v3 = 3,
183  ARENA_TYPE_5v5 = 5
184 };
Definition: Battleground.h:183
Definition: Battleground.h:182
Definition: Battleground.h:181
Enumerator
BG_OBJECTID_SPEEDBUFF_ENTRY 
BG_OBJECTID_REGENBUFF_ENTRY 
BG_OBJECTID_BERSERKERBUFF_ENTRY 
146 {
150 };
Definition: Battleground.h:148
Definition: Battleground.h:149
Definition: Battleground.h:147
Enumerator
BG_CREATURE_ENTRY_A_SPIRITGUIDE 
BG_CREATURE_ENTRY_H_SPIRITGUIDE 
99 {
100  BG_CREATURE_ENTRY_A_SPIRITGUIDE = 13116, // alliance
101  BG_CREATURE_ENTRY_H_SPIRITGUIDE = 13117 // horde
102 };
Definition: Battleground.h:101
Definition: Battleground.h:100
Enumerator
BG_CRITERIA_CHECK_RESILIENT_VICTORY 
BG_CRITERIA_CHECK_SAVE_THE_DAY 
BG_CRITERIA_CHECK_EVERYTHING_COUNTS 
BG_CRITERIA_CHECK_AV_PERFECTION 
BG_CRITERIA_CHECK_DEFENSE_OF_THE_ANCIENTS 
BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH 
Enumerator
SPELL_WS_MARK_LOSER 
SPELL_WS_MARK_WINNER 
SPELL_AB_MARK_LOSER 
SPELL_AB_MARK_WINNER 
SPELL_AV_MARK_LOSER 
SPELL_AV_MARK_WINNER 
SPELL_SA_MARK_WINNER 
SPELL_SA_MARK_LOSER 
ITEM_AV_MARK_OF_HONOR 
ITEM_WS_MARK_OF_HONOR 
ITEM_AB_MARK_OF_HONOR 
ITEM_EY_MARK_OF_HONOR 
ITEM_SA_MARK_OF_HONOR 
76 {
77  SPELL_WS_MARK_LOSER = 24950,
78  SPELL_WS_MARK_WINNER = 24951,
79  SPELL_AB_MARK_LOSER = 24952,
80  SPELL_AB_MARK_WINNER = 24953,
81  SPELL_AV_MARK_LOSER = 24954,
82  SPELL_AV_MARK_WINNER = 24955,
83  SPELL_SA_MARK_WINNER = 61160,
84  SPELL_SA_MARK_LOSER = 61159,
85  ITEM_AV_MARK_OF_HONOR = 20560,
86  ITEM_WS_MARK_OF_HONOR = 20558,
87  ITEM_AB_MARK_OF_HONOR = 20559,
88  ITEM_EY_MARK_OF_HONOR = 29024,
89  ITEM_SA_MARK_OF_HONOR = 42425
90 };
Definition: Battleground.h:80
Definition: Battleground.h:82
Definition: Battleground.h:86
Definition: Battleground.h:78
Definition: Battleground.h:88
Definition: Battleground.h:83
Definition: Battleground.h:81
Definition: Battleground.h:79
Definition: Battleground.h:85
Definition: Battleground.h:77
Definition: Battleground.h:84
Definition: Battleground.h:87
Definition: Battleground.h:89
Enumerator
ITEM_WINNER_COUNT 
ITEM_LOSER_COUNT 
93 {
96 };
Definition: Battleground.h:94
Definition: Battleground.h:95
Enumerator
PLAYER_POSITION_ICON_NONE 
PLAYER_POSITION_ICON_HORDE_FLAG 
PLAYER_POSITION_ICON_ALLIANCE_FLAG 
PLAYER_POSITION_ARENA_SLOT_NONE 
PLAYER_POSITION_ARENA_SLOT_1 
PLAYER_POSITION_ARENA_SLOT_2 
PLAYER_POSITION_ARENA_SLOT_3 
PLAYER_POSITION_ARENA_SLOT_4 
PLAYER_POSITION_ARENA_SLOT_5 
215 {
219 
226 };
Definition: Battleground.h:223
Definition: Battleground.h:224
Definition: Battleground.h:218
Definition: Battleground.h:216
Definition: Battleground.h:222
Definition: Battleground.h:217
Definition: Battleground.h:220
Definition: Battleground.h:221
Definition: Battleground.h:225
Enumerator
SPELL_WS_QUEST_REWARD 
SPELL_AB_QUEST_REWARD 
SPELL_AV_QUEST_REWARD 
SPELL_AV_QUEST_KILLED_BOSS 
SPELL_EY_QUEST_REWARD 
SPELL_SA_QUEST_REWARD 
SPELL_AB_QUEST_REWARD_4_BASES 
SPELL_AB_QUEST_REWARD_5_BASES 
64 {
65  SPELL_WS_QUEST_REWARD = 43483,
66  SPELL_AB_QUEST_REWARD = 43484,
67  SPELL_AV_QUEST_REWARD = 43475,
69  SPELL_EY_QUEST_REWARD = 43477,
70  SPELL_SA_QUEST_REWARD = 61213,
73 };
Definition: Battleground.h:66
Definition: Battleground.h:69
Definition: Battleground.h:70
Definition: Battleground.h:72
Definition: Battleground.h:67
Definition: Battleground.h:68
Definition: Battleground.h:65
Definition: Battleground.h:71
Enumerator
SOUND_HORDE_WINS 
SOUND_ALLIANCE_WINS 
SOUND_BG_START 
SOUND_BG_START_L70ETC 
56 {
57  SOUND_HORDE_WINS = 8454,
58  SOUND_ALLIANCE_WINS = 8455,
59  SOUND_BG_START = 3439,
60  SOUND_BG_START_L70ETC = 11803
61 };
Definition: Battleground.h:58
Definition: Battleground.h:59
Definition: Battleground.h:60
Definition: Battleground.h:57
Enumerator
SPELL_WAITING_FOR_RESURRECT 
SPELL_SPIRIT_HEAL_CHANNEL 
SPELL_SPIRIT_HEAL 
SPELL_RESURRECTION_VISUAL 
SPELL_ARENA_PREPARATION 
SPELL_PREPARATION 
SPELL_SPIRIT_HEAL_MANA 
SPELL_RECENTLY_DROPPED_FLAG 
SPELL_AURA_PLAYER_INACTIVE 
SPELL_HONORABLE_DEFENDER_25Y 
SPELL_HONORABLE_DEFENDER_60Y 
105 {
106  SPELL_WAITING_FOR_RESURRECT = 2584, // Waiting to Resurrect
107  SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel
108  SPELL_SPIRIT_HEAL = 22012, // Spirit Heal
109  SPELL_RESURRECTION_VISUAL = 24171, // Resurrection Impact Visual
110  SPELL_ARENA_PREPARATION = 32727, // use this one, 32728 not correct
111  SPELL_PREPARATION = 44521, // Preparation
112  SPELL_SPIRIT_HEAL_MANA = 44535, // Spirit Heal
113  SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
114  SPELL_AURA_PLAYER_INACTIVE = 43681, // Inactive
115  SPELL_HONORABLE_DEFENDER_25Y = 68652, // +50% honor when standing at a capture point that you control, 25yards radius (added in 3.2)
116  SPELL_HONORABLE_DEFENDER_60Y = 66157 // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
117 };
Definition: Battleground.h:112
Definition: Battleground.h:109
Definition: Battleground.h:107
Definition: Battleground.h:108
Definition: Battleground.h:113
Definition: Battleground.h:106
Definition: Battleground.h:115
Definition: Battleground.h:116
Definition: Battleground.h:114
Definition: Battleground.h:111
Definition: Battleground.h:110
Enumerator
BG_STARTING_EVENT_NONE 
BG_STARTING_EVENT_1 
BG_STARTING_EVENT_2 
BG_STARTING_EVENT_3 
BG_STARTING_EVENT_4 
187 {
188  BG_STARTING_EVENT_NONE = 0x00,
189  BG_STARTING_EVENT_1 = 0x01,
190  BG_STARTING_EVENT_2 = 0x02,
191  BG_STARTING_EVENT_3 = 0x04,
192  BG_STARTING_EVENT_4 = 0x08
193 };
Definition: Battleground.h:189
Definition: Battleground.h:192
Definition: Battleground.h:188
Definition: Battleground.h:191
Definition: Battleground.h:190
Enumerator
BG_STARTING_EVENT_FIRST 
BG_STARTING_EVENT_SECOND 
BG_STARTING_EVENT_THIRD 
BG_STARTING_EVENT_FOURTH 
196 {
201 };
Definition: Battleground.h:199
Definition: Battleground.h:200
Definition: Battleground.h:198
Definition: Battleground.h:197
Enumerator
BG_START_DELAY_2M 
BG_START_DELAY_1M 
BG_START_DELAY_30S 
BG_START_DELAY_15S 
BG_START_DELAY_NONE 
137 {
138  BG_START_DELAY_2M = 120000, // ms (2 minutes)
139  BG_START_DELAY_1M = 60000, // ms (1 minute)
140  BG_START_DELAY_30S = 30000, // ms (30 seconds)
141  BG_START_DELAY_15S = 15000, // ms (15 seconds) Used only in arena
142  BG_START_DELAY_NONE = 0 // ms
143 };
Definition: Battleground.h:142
Definition: Battleground.h:139
Definition: Battleground.h:140
Definition: Battleground.h:141
Definition: Battleground.h:138
Enumerator
STATUS_NONE 
STATUS_WAIT_QUEUE 
STATUS_WAIT_JOIN 
STATUS_IN_PROGRESS 
STATUS_WAIT_LEAVE 
155 {
156  STATUS_NONE = 0, // first status, should mean bg is not instance
157  STATUS_WAIT_QUEUE = 1, // means bg is empty and waiting for queue
158  STATUS_WAIT_JOIN = 2, // this means, that BG has already started and it is waiting for more players
159  STATUS_IN_PROGRESS = 3, // means bg is running
160  STATUS_WAIT_LEAVE = 4 // means some faction has won BG and it is ending
161 };
Definition: Battleground.h:159
Definition: Battleground.h:157
Definition: Battleground.h:158
Definition: Battleground.h:160
Definition: Battleground.h:156
Enumerator
CHECK_PLAYER_POSITION_INVERVAL 
RESURRECTION_INTERVAL 
INVITATION_REMIND_TIME 
INVITE_ACCEPT_WAIT_TIME 
TIME_AUTOCLOSE_BATTLEGROUND 
MAX_OFFLINE_TIME 
RESPAWN_ONE_DAY 
RESPAWN_IMMEDIATELY 
BUFF_RESPAWN_TIME 
BATTLEGROUND_COUNTDOWN_MAX 
ARENA_COUNTDOWN_MAX 
PLAYER_POSITION_UPDATE_INTERVAL 
120 {
121  CHECK_PLAYER_POSITION_INVERVAL = 1000, // ms
122  RESURRECTION_INTERVAL = 30000, // ms
123  //REMIND_INTERVAL = 10000, // ms
124  INVITATION_REMIND_TIME = 20000, // ms
125  INVITE_ACCEPT_WAIT_TIME = 90000, // ms
126  TIME_AUTOCLOSE_BATTLEGROUND = 120000, // ms
127  MAX_OFFLINE_TIME = 300, // secs
128  RESPAWN_ONE_DAY = 86400, // secs
129  RESPAWN_IMMEDIATELY = 0, // secs
130  BUFF_RESPAWN_TIME = 180, // secs
131  BATTLEGROUND_COUNTDOWN_MAX = 120, // secs
132  ARENA_COUNTDOWN_MAX = 60, // secs
134 };
Definition: Battleground.h:121
Definition: Battleground.h:129
Definition: Battleground.h:127
Definition: Battleground.h:125
Definition: Battleground.h:122
Definition: Battleground.h:126
Definition: Battleground.h:128
Definition: Battleground.h:130
Definition: Battleground.h:133
Definition: Battleground.h:124
Definition: Battleground.h:132
Definition: Battleground.h:131
Enumerator
BG_NORMAL 
BG_HOLIDAY 
BG_HONOR_MODE_NUM 
205 {
206  BG_NORMAL = 0,
207  BG_HOLIDAY,
209 };
Definition: Battleground.h:208
Definition: Battleground.h:206
Definition: Battleground.h:207

Variable Documentation