Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
BattlegroundEY.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_BATTLEGROUNDEY_H
7#define SF_BATTLEGROUNDEY_H
8
9#include "Battleground.h"
10#include "Language.h"
11
18
20{
37 PROGRESS_BAR_PERCENT_GREY = 2720, //100 = empty (only grey), 0 = blue|red (no grey)
38 PROGRESS_BAR_STATUS = 2719, //50 init!, 48 ... hordak bere .. 33 .. 0 = full 100% hordacky, 100 = full alliance
39 PROGRESS_BAR_SHOW = 2718, //1 init, 0 druhy send - bez messagu, 1 = controlled aliance
41 //set to 2 when flag is picked up, and to 1 if it is dropped
44};
45
59
69
75
77{
78 BG_OBJECT_A_DOOR_EY_ENTRY = 184719, //Alliance door
79 BG_OBJECT_H_DOOR_EY_ENTRY = 184720, //Horde door
80 BG_OBJECT_FLAG1_EY_ENTRY = 184493, //Netherstorm flag (generic)
81 BG_OBJECT_FLAG2_EY_ENTRY = 184141, //Netherstorm flag (flagstand)
82 BG_OBJECT_FLAG3_EY_ENTRY = 184142, //Netherstorm flag (flagdrop)
83 BG_OBJECT_A_BANNER_EY_ENTRY = 184381, //Visual Banner (Alliance)
84 BG_OBJECT_H_BANNER_EY_ENTRY = 184380, //Visual Banner (Horde)
85 BG_OBJECT_N_BANNER_EY_ENTRY = 184382, //Visual Banner (Neutral)
86 BG_OBJECT_BE_TOWER_CAP_EY_ENTRY = 184080, //BE Tower Cap Pt
87 BG_OBJECT_FR_TOWER_CAP_EY_ENTRY = 184081, //Fel Reaver Cap Pt
88 BG_OBJECT_HU_TOWER_CAP_EY_ENTRY = 184082, //Human Tower Cap Pt
89 BG_OBJECT_DR_TOWER_CAP_EY_ENTRY = 184083 //Draenei Tower Cap Pt
90};
91
103
113
124
141
143{
191 //buffs
205};
206
207#define BG_EY_NotEYWeekendHonorTicks 260
208#define BG_EY_EYWeekendHonorTicks 160
209
215
223
230
235
237{
238 BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex)
239 : WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) { }
243};
244
245// x, y, z, o
247{
248 {2044.28f, 1729.68f, 1189.96f, 0.017453f}, // FEL_REAVER center
249 {2048.83f, 1393.65f, 1194.49f, 0.20944f}, // BLOOD_ELF center
250 {2286.56f, 1402.36f, 1197.11f, 3.72381f}, // DRAENEI_RUINS center
251 {2284.48f, 1731.23f, 1189.99f, 2.89725f} // MAGE_TOWER center
252};
253
255{
256 BattlegroundEYLosingPointStruct(uint32 _SpawnNeutralObjectType, uint32 _DespawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _DespawnObjectTypeHorde, uint32 _MessageIdHorde)
257 : SpawnNeutralObjectType(_SpawnNeutralObjectType),
258 DespawnObjectTypeAlliance(_DespawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
259 DespawnObjectTypeHorde(_DespawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde)
260 { }
261
267};
268
270{
271 BattlegroundEYCapturingPointStruct(uint32 _DespawnNeutralObjectType, uint32 _SpawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _SpawnObjectTypeHorde, uint32 _MessageIdHorde, uint32 _GraveYardId)
272 : DespawnNeutralObjectType(_DespawnNeutralObjectType),
273 SpawnObjectTypeAlliance(_SpawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
274 SpawnObjectTypeHorde(_SpawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde),
275 GraveYardId(_GraveYardId)
276 { }
277
284};
285
286const uint8 BG_EY_TickPoints[EY_POINTS_MAX] = { 1, 2, 5, 10 };
287const uint32 BG_EY_FlagPoints[EY_POINTS_MAX] = { 75, 85, 100, 500 };
288
289//constant arrays:
311
318
320{
321public:
324
325 /* inherited from BattlegroundClass */
326 void AddPlayer(Player* player) OVERRIDE;
329
330 /* BG Flags */
331 uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const OVERRIDE { return m_FlagKeeper; }
332 void SetFlagPicker(uint64 guid) { m_FlagKeeper = guid; }
333 bool IsFlagPickedup() const { return m_FlagKeeper != 0; }
334 uint8 GetFlagState() const { return m_FlagState; }
335 void RespawnFlag(bool send_message);
337
338 void RemovePlayer(Player* player, uint64 guid, uint32 team) OVERRIDE;
339 void HandleBuffUse(uint64 buff_guid);
340 void HandleAreaTrigger(Player* Source, uint32 Trigger) OVERRIDE;
341 void HandleKillPlayer(Player* player, Player* killer) OVERRIDE;
344 void Reset() OVERRIDE;
346 void EndBattleground(uint32 winner);
347 void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true) OVERRIDE;
349 void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) OVERRIDE { m_DroppedFlagGUID = guid; }
351
352 /* Battleground Events */
353 void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) OVERRIDE;
355
356 /* achievement req. */
358
360private:
361 void PostUpdateImpl(uint32 diff) OVERRIDE;
362
363 void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
364 void EventTeamCapturedPoint(Player* Source, uint32 Point);
365 void EventTeamLostPoint(Player* Source, uint32 Point);
367 void UpdatePointsIcons(uint32 Team, uint32 Point);
368
369 /* Point status updating procedures */
372 void UpdatePointStatuses();
373
374 /* Scorekeeping */
376
379
382
384
385 uint64 m_FlagKeeper; // keepers guid
387 uint32 m_FlagCapturedBgObjectType; // type that should be despawned when flag is captured
388 uint8 m_FlagState; // for checking flag state
391
395 typedef std::vector<uint64> PlayersNearPointType;
398
401};
402#endif
BG_EY_FlagState
@ BG_EY_FLAG_STATE_ON_PLAYER
@ BG_EY_FLAG_STATE_ON_BASE
@ BG_EY_FLAG_STATE_ON_GROUND
@ BG_EY_FLAG_STATE_WAIT_RESPAWN
BG_EY_ProgressBarConsts
@ BG_EY_PROGRESS_BAR_NEUTRAL_HIGH
@ BG_EY_PROGRESS_BAR_NEUTRAL_LOW
@ BG_EY_PROGRESS_BAR_DONT_SHOW
@ BG_EY_PROGRESS_BAR_STATE_MIDDLE
@ BG_EY_PROGRESS_BAR_ALI_CONTROLLED
@ BG_EY_PROGRESS_BAR_HORDE_CONTROLLED
@ BG_EY_POINT_MAX_CAPTURERS_COUNT
@ BG_EY_PROGRESS_BAR_PERCENT_GREY
@ BG_EY_POINT_RADIUS
@ BG_EY_PROGRESS_BAR_SHOW
BG_EY_Score
@ BG_EY_WARNING_NEAR_VICTORY_SCORE
@ BG_EY_MAX_TEAM_SCORE
EYBattlegroundGaveyards
@ EY_GRAVEYARD_MAIN_ALLIANCE
@ EY_GRAVEYARD_MAGE_TOWER
@ EY_GRAVEYARD_BLOOD_ELF
@ EY_GRAVEYARD_MAIN_HORDE
@ EY_GRAVEYARD_FEL_REAVER
@ EY_GRAVEYARD_DRAENEI_RUINS
BG_EY_WorldStates
@ BLOOD_ELF_HORDE_CONTROL
@ NETHERSTORM_FLAG_STATE_ALLIANCE
@ BLOOD_ELF_UNCONTROL
@ FEL_REAVER_UNCONTROL
@ EY_HORDE_RESOURCES
@ MAGE_TOWER_ALLIANCE_CONTROL
@ PROGRESS_BAR_SHOW
@ NETHERSTORM_FLAG
@ EY_ALLIANCE_BASE
@ FEL_REAVER_ALLIANCE_CONTROL
@ DRAENEI_RUINS_UNCONTROL
@ NETHERSTORM_FLAG_STATE_HORDE
@ DRAENEI_RUINS_ALLIANCE_CONTROL
@ EY_ALLIANCE_RESOURCES
@ BLOOD_ELF_ALLIANCE_CONTROL
@ DRAENEI_RUINS_HORDE_CONTROL
@ EY_HORDE_BASE
@ MAGE_TOWER_HORDE_CONTROL
@ PROGRESS_BAR_PERCENT_GREY
@ MAGE_TOWER_UNCONTROL
@ PROGRESS_BAR_STATUS
@ FEL_REAVER_HORDE_CONTROL
const BattlegroundEYLosingPointStruct m_LosingPointTypes[EY_POINTS_MAX]
EYBattlegroundPoints
@ DRAENEI_RUINS
@ BLOOD_ELF
@ MAGE_TOWER
@ EY_PLAYERS_OUT_OF_POINTS
@ EY_POINTS_MAX
@ FEL_REAVER
const uint8 BG_EY_TickPoints[EY_POINTS_MAX]
const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX]
BG_EY_Objectives
@ EY_OBJECTIVE_CAPTURE_FLAG
const uint32 BG_EY_FlagPoints[EY_POINTS_MAX]
BG_EY_Misc
@ BG_EY_FPOINTS_TICK_TIME
@ BG_EY_EVENT_START_BATTLE
@ BG_EY_FLAG_RESPAWN_TIME
EYBattlegroundObjectTypes
@ BG_EY_OBJECT_DOOR_H
@ BG_EY_OBJECT_FLAG_BLOOD_ELF
@ BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_LEFT
@ BG_EY_OBJECT_N_BANNER_MAGE_TOWER_RIGHT
@ BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER
@ BG_EY_OBJECT_H_BANNER_FEL_REAVER_RIGHT
@ BG_EY_OBJECT_A_BANNER_MAGE_TOWER_RIGHT
@ BG_EY_OBJECT_TOWER_CAP_BLOOD_ELF
@ BG_EY_OBJECT_TOWER_CAP_FEL_REAVER
@ BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER
@ BG_EY_OBJECT_TOWER_CAP_DRAENEI_RUINS
@ BG_EY_OBJECT_N_BANNER_FEL_REAVER_LEFT
@ BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER
@ BG_EY_OBJECT_A_BANNER_BLOOD_ELF_RIGHT
@ BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER
@ BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER
@ BG_EY_OBJECT_REGENBUFF_FEL_REAVER
@ BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER
@ BG_EY_OBJECT_N_BANNER_BLOOD_ELF_RIGHT
@ BG_EY_OBJECT_A_BANNER_FEL_REAVER_RIGHT
@ BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER
@ BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_RIGHT
@ BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER
@ BG_EY_OBJECT_DOOR_A
@ BG_EY_OBJECT_BERSERKBUFF_BLOOD_ELF
@ BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_LEFT
@ BG_EY_OBJECT_MAX
@ BG_EY_OBJECT_H_BANNER_MAGE_TOWER_RIGHT
@ BG_EY_OBJECT_FLAG_FEL_REAVER
@ BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER
@ BG_EY_OBJECT_BERSERKBUFF_DRAENEI_RUINS
@ BG_EY_OBJECT_FLAG_MAGE_TOWER
@ BG_EY_OBJECT_H_BANNER_BLOOD_ELF_LEFT
@ BG_EY_OBJECT_A_BANNER_BLOOD_ELF_LEFT
@ BG_EY_OBJECT_N_BANNER_FEL_REAVER_RIGHT
@ BG_EY_OBJECT_A_BANNER_FEL_REAVER_LEFT
@ BG_EY_OBJECT_H_BANNER_MAGE_TOWER_LEFT
@ BG_EY_OBJECT_SPEEDBUFF_BLOOD_ELF
@ BG_EY_OBJECT_A_BANNER_MAGE_TOWER_LEFT
@ BG_EY_OBJECT_BERSERKBUFF_MAGE_TOWER
@ BG_EY_OBJECT_H_BANNER_FEL_REAVER_LEFT
@ BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER
@ BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_RIGHT
@ BG_EY_OBJECT_REGENBUFF_DRAENEI_RUINS
@ BG_EY_OBJECT_H_BANNER_BLOOD_ELF_RIGHT
@ BG_EY_OBJECT_SPEEDBUFF_DRAENEI_RUINS
@ BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER
@ BG_EY_OBJECT_REGENBUFF_MAGE_TOWER
@ BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER
@ BG_EY_OBJECT_SPEEDBUFF_MAGE_TOWER
@ BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_LEFT
@ BG_EY_OBJECT_REGENBUFF_BLOOD_ELF
@ BG_EY_OBJECT_FLAG_DRAENEI_RUINS
@ BG_EY_OBJECT_FLAG_NETHERSTORM
@ BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER
@ BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER
@ BG_EY_OBJECT_N_BANNER_BLOOD_ELF_LEFT
@ BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_RIGHT
@ BG_EY_OBJECT_N_BANNER_MAGE_TOWER_LEFT
@ BG_EY_OBJECT_BERSERKBUFF_FEL_REAVER
EYBattlegroundObjectEntry
@ BG_OBJECT_HU_TOWER_CAP_EY_ENTRY
@ BG_OBJECT_BE_TOWER_CAP_EY_ENTRY
@ BG_OBJECT_FLAG3_EY_ENTRY
@ BG_OBJECT_H_BANNER_EY_ENTRY
@ BG_OBJECT_FLAG2_EY_ENTRY
@ BG_OBJECT_FR_TOWER_CAP_EY_ENTRY
@ BG_OBJECT_A_DOOR_EY_ENTRY
@ BG_OBJECT_H_DOOR_EY_ENTRY
@ BG_OBJECT_FLAG1_EY_ENTRY
@ BG_OBJECT_A_BANNER_EY_ENTRY
@ BG_OBJECT_N_BANNER_EY_ENTRY
@ BG_OBJECT_DR_TOWER_CAP_EY_ENTRY
EYBattlegroundCreaturesTypes
@ EY_TRIGGER_BLOOD_ELF
@ EY_SPIRIT_MAIN_HORDE
@ EY_SPIRIT_MAGE_TOWER
@ EY_TRIGGER_FEL_REAVER
@ EY_SPIRIT_FEL_REAVER
@ EY_SPIRIT_BLOOD_ELF
@ EY_SPIRIT_MAIN_ALLIANCE
@ EY_SPIRIT_DRAENEI_RUINS
@ EY_TRIGGER_DRAENEI_RUINS
@ EY_TRIGGER_MAGE_TOWER
@ BG_EY_CREATURES_MAX
const float BG_EY_TriggerPositions[EY_POINTS_MAX][4]
EYBattlegroundPointsTrigger
@ TR_DRAENEI_RUINS_BUFF
@ TR_BLOOD_ELF_POINT
@ TR_BLOOD_ELF_BUFF
@ TR_FEL_REAVER_BUFF
@ TR_DRAENEI_RUINS_POINT
@ TR_MAGE_TOWER_POINT
@ TR_FEL_REAVER_POINT
@ TR_MAGE_TOWER_BUFF
EYBattlegroundPointState
@ EY_POINT_UNDER_CONTROL
@ EY_POINT_NO_OWNER
@ EY_POINT_STATE_UNCONTROLLED
BG_EY_Sounds
@ BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE
@ BG_EY_SOUND_FLAG_CAPTURED_HORDE
@ BG_EY_SOUND_FLAG_PICKED_UP_HORDE
@ BG_EY_SOUND_FLAG_RESET
@ BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE
BG_EY_Spells
@ BG_EY_NETHERSTORM_FLAG_SPELL
@ BG_EY_PLAYER_DROPPED_FLAG_SPELL
const BattlegroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX]
@ IN_MILLISECONDS
Definition Common.h:125
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
@ LANG_BG_EY_HAS_LOST_A_F_RUINS
Definition Language.h:670
@ LANG_BG_EY_HAS_TAKEN_H_B_TOWER
Definition Language.h:661
@ LANG_BG_EY_HAS_LOST_H_M_TOWER
Definition Language.h:665
@ LANG_BG_EY_HAS_LOST_H_B_TOWER
Definition Language.h:669
@ LANG_BG_EY_HAS_TAKEN_H_M_TOWER
Definition Language.h:657
@ LANG_BG_EY_HAS_TAKEN_A_D_RUINS
Definition Language.h:658
@ LANG_BG_EY_HAS_TAKEN_H_F_RUINS
Definition Language.h:663
@ LANG_BG_EY_HAS_TAKEN_A_B_TOWER
Definition Language.h:660
@ LANG_BG_EY_HAS_LOST_A_D_RUINS
Definition Language.h:666
@ LANG_BG_EY_HAS_TAKEN_A_M_TOWER
Definition Language.h:656
@ LANG_BG_EY_HAS_TAKEN_H_D_RUINS
Definition Language.h:659
@ LANG_BG_EY_HAS_LOST_A_M_TOWER
Definition Language.h:664
@ LANG_BG_EY_HAS_TAKEN_A_F_RUINS
Definition Language.h:662
@ LANG_BG_EY_HAS_LOST_H_D_RUINS
Definition Language.h:667
@ LANG_BG_EY_HAS_LOST_H_F_RUINS
Definition Language.h:671
@ LANG_BG_EY_HAS_LOST_A_B_TOWER
Definition Language.h:668
bool IsAllNodesControlledByTeam(uint32 team) const OVERRIDE
void EventTeamCapturedPoint(Player *Source, uint32 Point)
void HandleAreaTrigger(Player *Source, uint32 Trigger) OVERRIDE
uint32 m_FlagCapturedBgObjectType
uint64 GetFlagPickerGUID(int32=-1) const OVERRIDE
uint8 m_PointState[EY_POINTS_MAX]
int32 m_PointBarStatus[EY_POINTS_MAX]
void AddPoints(uint32 Team, uint32 Points)
void CheckSomeoneJoinedPoint()
void HandleKillPlayer(Player *player, Player *killer) OVERRIDE
void StartingEventOpenDoors() OVERRIDE
void EventPlayerDroppedFlag(Player *Source) OVERRIDE
void Reset() OVERRIDE
void SetTeamPoint(uint32 TeamID, uint32 Points=0)
WorldSafeLocsEntry const * GetClosestGraveYard(Player *player) OVERRIDE
uint32 GetPrematureWinner() OVERRIDE
void UpdatePointsCount(uint32 Team)
uint64 GetDroppedFlagGUID() const
void UpdatePointsIcons(uint32 Team, uint32 Point)
bool IsFlagPickedup() const
uint8 GetFlagState() const
uint8 m_CurrentPointPlayersCount[2 *EY_POINTS_MAX]
void EventPlayerClickedOnFlag(Player *Source, GameObject *target_obj) OVERRIDE
uint32 m_Points_Trigger[EY_POINTS_MAX]
void EndBattleground(uint32 winner)
void PostUpdateImpl(uint32 diff) OVERRIDE
Post-update hook.
void FillInitialWorldStates(WorldStateBuilder &builder) OVERRIDE
void RemovePoint(uint32 TeamID, uint32 Points=1)
uint32 m_TeamPointsCount[2]
void SetFlagPicker(uint64 guid)
void StartingEventCloseDoors() OVERRIDE
void RemovePlayer(Player *player, uint64 guid, uint32 team) OVERRIDE
bool SetupBattleground() OVERRIDE
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
uint32 m_HonorScoreTics[2]
void EventTeamLostPoint(Player *Source, uint32 Point)
void UpdateTeamScore(uint32 Team)
std::vector< uint64 > PlayersNearPointType
void AddPlayer(Player *player) OVERRIDE
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor=true) OVERRIDE
PlayersNearPointType m_PlayersNearPoint[EY_POINTS_MAX+1]
void RespawnFlag(bool send_message)
void SetDroppedFlagGUID(uint64 guid, int32=-1) OVERRIDE
void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
void HandleBuffUse(uint64 buff_guid)
static TeamId GetTeamIndexByTeamId(uint32 Team)
int32 m_TeamScores[BG_TEAMS_COUNT]
BattlegroundEYCapturingPointStruct(uint32 _DespawnNeutralObjectType, uint32 _SpawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _SpawnObjectTypeHorde, uint32 _MessageIdHorde, uint32 _GraveYardId)
BattlegroundEYLosingPointStruct(uint32 _SpawnNeutralObjectType, uint32 _DespawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _DespawnObjectTypeHorde, uint32 _MessageIdHorde)
BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex)