TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattlegroundEY Class Reference

#include <BattlegroundEY.h>

Public Member Functions

 BattlegroundEY ()
 
 ~BattlegroundEY ()
 
void AddPlayer (Player *player) override
 
void StartingEventCloseDoors () override
 
void StartingEventOpenDoors () override
 
ObjectGuid GetFlagPickerGUID (int32=-1) const override
 
void SetFlagPicker (ObjectGuid guid)
 
bool IsFlagPickedup () const
 
uint8 GetFlagState () const
 
void RespawnFlag (bool send_message)
 
void RespawnFlagAfterDrop ()
 
void RemovePlayer (Player *player, ObjectGuid guid, uint32 team) override
 
void HandleAreaTrigger (Player *source, uint32 trigger, bool entered) override
 
void HandleKillPlayer (Player *player, Player *killer) override
 
WorldSafeLocsEntry constGetClosestGraveYard (Player *player) override
 
bool SetupBattleground () override
 
void Reset () override
 
void UpdateTeamScore (uint32 Team)
 
void EndBattleground (uint32 winner) override
 
bool UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true) override
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void SetDroppedFlagGUID (ObjectGuid guid, int32=-1) override
 
ObjectGuid GetDroppedFlagGUID () const
 
void EventPlayerClickedOnFlag (Player *Source, GameObject *target_obj) override
 
void EventPlayerDroppedFlag (Player *Source) override
 
bool IsAllNodesControlledByTeam (uint32 team) const override
 
uint32 GetPrematureWinner () override
 
- Public Member Functions inherited from Battleground
 Battleground ()
 
virtual ~Battleground ()
 
void Update (uint32 diff)
 
virtual void ResetBGSubclass ()
 
virtual void DestroyGate (Player *, GameObject *)
 
void StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
std::string constGetName () const
 
uint64 GetQueueId () const
 
BattlegroundTypeId GetTypeID (bool GetRandom=false) const
 
BattlegroundBracketId GetBracketId () const
 
uint32 GetInstanceID () const
 
BattlegroundStatus GetStatus () const
 
uint32 GetClientInstanceID () const
 
uint32 GetElapsedTime () const
 
uint32 GetRemainingTime () const
 
uint32 GetLastResurrectTime () const
 
uint32 GetMaxPlayers () const
 
uint32 GetMinPlayers () const
 
uint32 GetMinLevel () const
 
uint32 GetMaxLevel () const
 
uint32 GetMaxPlayersPerTeam () const
 
uint32 GetMinPlayersPerTeam () const
 
int32 GetStartDelayTime () const
 
uint8 GetArenaType () const
 
BattlegroundTeamId GetWinner () const
 
uint32 GetScriptId () const
 
uint32 GetBonusHonorFromKill (uint32 kills) const
 
bool IsRandom () const
 
void SetQueueId (uint64 queueId)
 
void SetName (std::string const &name)
 
void SetTypeID (BattlegroundTypeId TypeID)
 
void SetRandomTypeID (BattlegroundTypeId TypeID)
 
void SetBracket (PvPDifficultyEntry const *bracketEntry)
 
void SetInstanceID (uint32 InstanceID)
 
void SetStatus (BattlegroundStatus Status)
 
void SetClientInstanceID (uint32 InstanceID)
 
void SetElapsedTime (uint32 Time)
 
void SetRemainingTime (uint32 Time)
 
void SetLastResurrectTime (uint32 Time)
 
void SetMaxPlayers (uint32 MaxPlayers)
 
void SetMinPlayers (uint32 MinPlayers)
 
void SetLevelRange (uint32 min, uint32 max)
 
void SetRated (bool state)
 
void SetArenaType (uint8 type)
 
void SetArenaorBGType (bool _isArena)
 
void SetWinner (BattlegroundTeamId winnerTeamId)
 
void SetScriptId (uint32 scriptId)
 
void ModifyStartDelayTime (int diff)
 
void SetStartDelayTime (int Time)
 
void SetMaxPlayersPerTeam (uint32 MaxPlayers)
 
void SetMinPlayersPerTeam (uint32 MinPlayers)
 
void AddToBGFreeSlotQueue ()
 
void RemoveFromBGFreeSlotQueue ()
 
void DecreaseInvitedCount (uint32 team)
 
void IncreaseInvitedCount (uint32 team)
 
void SetRandom (bool isRandom)
 
uint32 GetInvitedCount (uint32 team) const
 
bool HasFreeSlots () const
 
uint32 GetFreeSlotsForTeam (uint32 Team) const
 
bool isArena () const
 
bool isBattleground () const
 
bool isRated () const
 
BattlegroundPlayerMap constGetPlayers () const
 
uint32 GetPlayersSize () const
 
uint32 GetPlayerScoresSize () const
 
uint32 GetReviveQueueSize () const
 
void AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid)
 
void RemovePlayerFromResurrectQueue (ObjectGuid player_guid)
 
void RelocateDeadPlayers (ObjectGuid guideGuid)
 Relocate all players in ReviveQueue to the closest graveyard. More...
 
void StartBattleground ()
 
GameObjectGetBGObject (uint32 type, bool logError=true)
 
CreatureGetBGCreature (uint32 type, bool logError=true)
 
void SetMapId (uint32 MapID)
 
uint32 GetMapId () const
 
void SetBgMap (BattlegroundMap *map)
 
BattlegroundMapGetBgMap () const
 
BattlegroundMapFindBgMap () const
 
void SetTeamStartPosition (TeamId teamId, Position const &pos)
 
Position constGetTeamStartPosition (TeamId teamId) const
 
void SetStartMaxDist (float startMaxDist)
 
float GetStartMaxDist () const
 
void SendPacketToTeam (uint32 TeamID, WorldPacket const *packet, Player *sender=NULL, bool self=true) const
 
void SendPacketToAll (WorldPacket const *packet) const
 
void SendChatMessage (Creature *source, uint8 textId, WorldObject *target=NULL)
 
template<class Do >
void BroadcastWorker (Do &_do)
 
void PlaySoundToTeam (uint32 SoundID, uint32 TeamID)
 
void PlaySoundToAll (uint32 SoundID)
 
void CastSpellOnTeam (uint32 SpellID, uint32 TeamID)
 
void RemoveAuraOnTeam (uint32 SpellID, uint32 TeamID)
 
void RewardHonorToTeam (uint32 Honor, uint32 TeamID)
 
void RewardReputationToTeam (uint32 faction_id, uint32 Reputation, uint32 TeamID)
 
void UpdateWorldState (uint32 variable, uint32 value, bool hidden=false)
 
void BlockMovement (Player *player)
 
void SendMessageToAll (uint32 entry, ChatMsg type, Player const *source=NULL)
 
void PSendMessageToAll (uint32 entry, ChatMsg type, Player const *source,...)
 
void SendMessage2ToAll (uint32 entry, ChatMsg type, Player const *source, uint32 strId1=0, uint32 strId2=0)
 
GroupGetBgRaid (uint32 TeamID) const
 
void SetBgRaid (uint32 TeamID, Group *bg_raid)
 
void BuildPvPLogDataPacket (WorldPackets::Battleground::PVPLogData &pvpLogData)
 
uint32 GetPlayersCountByTeam (uint32 Team) const
 
uint32 GetAlivePlayersCountByTeam (uint32 Team) const
 
void UpdatePlayersCountByTeam (uint32 Team, bool remove)
 
virtual void CheckWinConditions ()
 
void SetArenaTeamIdForTeam (uint32 Team, uint32 ArenaTeamId)
 
uint32 GetArenaTeamIdForTeam (uint32 Team) const
 
uint32 GetArenaTeamIdByIndex (uint32 index) const
 
void SetArenaMatchmakerRating (uint32 Team, uint32 MMR)
 
uint32 GetArenaMatchmakerRating (uint32 Team) const
 
virtual void HandleKillUnit (Creature *, Player *)
 
void EventPlayerLoggedIn (Player *player)
 
void EventPlayerLoggedOut (Player *player)
 
virtual void ProcessEvent (WorldObject *, uint32, WorldObject *=NULL)
 
virtual void DoAction (uint32, ObjectGuid)
 
virtual void HandlePlayerResurrect (Player *)
 
void AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team)
 
virtual void RemovePlayerAtLeave (ObjectGuid guid, bool Transport, bool SendPacket)
 
void HandleTriggerBuff (ObjectGuid go_guid)
 
void SetHoliday (bool is_holiday)
 
void SpawnBGObject (uint32 type, uint32 respawntime)
 
virtual bool AddObject (uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
 
bool AddObject (uint32 type, uint32 entry, Position const &pos, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
 
virtual CreatureAddCreature (uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=NULL)
 
CreatureAddCreature (uint32 entry, uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=NULL)
 
bool DelCreature (uint32 type)
 
bool DelObject (uint32 type)
 
virtual bool AddSpiritGuide (uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL)
 
bool AddSpiritGuide (uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL)
 
int32 GetObjectType (ObjectGuid guid)
 
void DoorOpen (uint32 type)
 
void DoorClose (uint32 type)
 
virtual bool HandlePlayerUnderMap (Player *)
 
uint32 GetPlayerTeam (ObjectGuid guid) const
 
uint32 GetOtherTeam (uint32 teamId) const
 
bool IsPlayerInBattleground (ObjectGuid guid) const
 
bool ToBeDeleted () const
 
void SetDeleteThis ()
 
void RewardXPAtKill (Player *killer, Player *victim)
 
bool CanAwardArenaPoints () const
 
virtual void HandleQuestComplete (uint32, Player *)
 
virtual bool CanActivateGO (int32, uint32) const
 
virtual bool IsSpellAllowed (uint32, Player const *) const
 
uint32 GetTeamScore (uint32 TeamID) const
 
uint8 GetUniqueBracketId () const
 

Protected Member Functions

void PostUpdateImpl (uint32 diff) override
 Post-update hook. More...
 
void GetPlayerPositionData (std::vector< WorldPackets::Battleground::BattlegroundPlayerPosition > *positions) const override
 
void EventPlayerCapturedFlag (Player *Source, uint32 BgObjectType)
 
void EventTeamCapturedPoint (Player *Source, uint32 Point)
 
void EventTeamLostPoint (Player *Source, uint32 Point)
 
void UpdatePointsCount (uint32 Team)
 
void UpdatePointsIcons (uint32 Team, uint32 Point)
 
- Protected Member Functions inherited from Battleground
void EndNow ()
 
void PlayerAddedToBGCheckIfBGIsRunning (Player *player)
 
Player_GetPlayer (ObjectGuid guid, bool offlineRemove, const char *context) const
 
Player_GetPlayer (BattlegroundPlayerMap::iterator itr, const char *context)
 
Player_GetPlayer (BattlegroundPlayerMap::const_iterator itr, const char *context) const
 
Player_GetPlayerForTeam (uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char *context) const
 
virtual bool PreUpdateImpl (uint32)
 Pre-update hook. More...
 
void _ProcessOfflineQueue ()
 
void _ProcessResurrect (uint32 diff)
 
void _ProcessProgress (uint32 diff)
 
void _ProcessLeave (uint32 diff)
 
void _ProcessJoin (uint32 diff)
 
void _CheckSafePositions (uint32 diff)
 
void _ProcessPlayerPositionBroadcast (uint32 diff)
 

Private Member Functions

void CheckSomeoneLeftPoint ()
 
void CheckSomeoneJoinedPoint ()
 
void UpdatePointStatuses ()
 
void AddPoints (uint32 Team, uint32 Points)
 
void RemovePoint (uint32 TeamID, uint32 Points=1)
 
void SetTeamPoint (uint32 TeamID, uint32 Points=0)
 

Private Attributes

uint32 m_HonorScoreTics [2]
 
uint32 m_TeamPointsCount [2]
 
uint32 m_Points_Trigger [EY_POINTS_MAX]
 
ObjectGuid m_FlagKeeper
 
ObjectGuid m_DroppedFlagGUID
 
uint32 m_FlagCapturedBgObjectType
 
uint8 m_FlagState
 
int32 m_FlagsTimer
 
int32 m_TowerCapCheckTimer
 
uint32 m_PointOwnedByTeam [EY_POINTS_MAX]
 
uint8 m_PointState [EY_POINTS_MAX]
 
int32 m_PointBarStatus [EY_POINTS_MAX]
 
GuidVector m_PlayersNearPoint [EY_POINTS_MAX+1]
 
uint8 m_CurrentPointPlayersCount [2 *EY_POINTS_MAX]
 
int32 m_PointAddingTimer
 
uint32 m_HonorTics
 

Additional Inherited Members

- Public Types inherited from Battleground
typedef std::map< ObjectGuid,
BattlegroundPlayer
BattlegroundPlayerMap
 
typedef std::map< ObjectGuid,
BattlegroundScore * > 
BattlegroundScoreMap
 
- Static Public Member Functions inherited from Battleground
static TeamId GetTeamIndexByTeamId (uint32 Team)
 
- Public Attributes inherited from Battleground
GuidVector BgObjects
 
GuidVector BgCreatures
 
- Protected Attributes inherited from Battleground
BattlegroundScoreMap PlayerScores
 
BattlegroundPlayerMap m_Players
 
std::map< ObjectGuid, GuidVectorm_ReviveQueue
 
uint8 m_Events
 
BattlegroundStartTimeIntervals StartDelayTimes [BG_STARTING_EVENT_COUNT]
 
uint32 StartMessageIds [BG_STARTING_EVENT_COUNT]
 
bool m_BuffChange
 
bool m_IsRandom
 
BGHonorMode m_HonorMode
 
int32 m_TeamScores [BG_TEAMS_COUNT]
 
ArenaTeamScore _arenaTeamScores [BG_TEAMS_COUNT]
 

Constructor & Destructor Documentation

BattlegroundEY::BattlegroundEY ( )
35 {
36  m_BuffChange = true;
51  m_FlagsTimer = 0;
54  m_HonorTics = 0;
55 
56  for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
57  {
61  }
62 
63  for (uint8 i = 0; i < 2 * EY_POINTS_MAX; ++i)
65 
70 }
Definition: BattlegroundEY.h:242
uint8 m_CurrentPointPlayersCount[2 *EY_POINTS_MAX]
Definition: BattlegroundEY.h:434
Definition: Battleground.h:199
bool m_BuffChange
Definition: Battleground.h:558
Definition: BattlegroundEY.h:132
Definition: Language.h:655
Definition: Battleground.h:200
Definition: BattlegroundEY.h:233
int32 m_TowerCapCheckTimer
Definition: BattlegroundEY.h:428
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
Definition: BattlegroundEY.h:154
Definition: BattlegroundEY.h:115
int32 m_FlagsTimer
Definition: BattlegroundEY.h:427
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423
Definition: Battleground.h:198
uint32 m_HonorTics
Definition: BattlegroundEY.h:437
uint32 m_FlagCapturedBgObjectType
Definition: BattlegroundEY.h:425
uint32 m_HonorScoreTics[2]
Definition: BattlegroundEY.h:418
Definition: BattlegroundEY.h:219
Definition: BattlegroundEY.h:137
uint8 m_FlagState
Definition: BattlegroundEY.h:426
GuidVector BgObjects
Definition: Battleground.h:452
int32 m_PointAddingTimer
Definition: BattlegroundEY.h:436
GuidVector BgCreatures
Definition: Battleground.h:453
Definition: BattlegroundEY.h:116
uint32 StartMessageIds[BG_STARTING_EVENT_COUNT]
Definition: Battleground.h:556
Definition: BattlegroundEY.h:114
Definition: Language.h:653
Definition: BattlegroundEY.h:133
Definition: SharedDefines.h:992
uint32 m_Points_Trigger[EY_POINTS_MAX]
Definition: BattlegroundEY.h:421
void Clear()
Definition: ObjectGuid.h:215
Definition: BattlegroundEY.h:134
int32 m_PointBarStatus[EY_POINTS_MAX]
Definition: BattlegroundEY.h:432
Definition: BattlegroundEY.h:68
Definition: Language.h:656
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
Definition: BattlegroundEY.h:113
uint8_t uint8
Definition: Define.h:152
Definition: Language.h:654
ObjectGuid m_DroppedFlagGUID
Definition: BattlegroundEY.h:424
Definition: BattlegroundEY.h:241
Definition: SharedDefines.h:993
Definition: BattlegroundEY.h:131
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
Definition: Battleground.h:197

+ Here is the call graph for this function:

BattlegroundEY::~BattlegroundEY ( )
72 { }

Member Function Documentation

void BattlegroundEY::AddPlayer ( Player player)
overridevirtual

Reimplemented from Battleground.

376 {
377  Battleground::AddPlayer(player);
378  PlayerScores[player->GetGUID()] = new BattlegroundEYScore(player->GetGUID(), player->GetBGTeam());
379 
380  m_PlayersNearPoint[EY_POINTS_MAX].push_back(player->GetGUID());
381 }
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
Definition: BattlegroundEY.h:326
Definition: BattlegroundEY.h:137
virtual void AddPlayer(Player *player)
Definition: Battleground.cpp:1079
BattlegroundScoreMap PlayerScores
Definition: Battleground.h:543

+ Here is the call graph for this function:

void BattlegroundEY::AddPoints ( uint32  Team,
uint32  Points 
)
private
160 {
161  TeamId team_index = GetTeamIndexByTeamId(Team);
162  m_TeamScores[team_index] += Points;
163  m_HonorScoreTics[team_index] += Points;
164  if (m_HonorScoreTics[team_index] >= m_HonorTics)
165  {
167  m_HonorScoreTics[team_index] -= m_HonorTics;
168  }
169  UpdateTeamScore(team_index);
170 }
int32 m_TeamScores[BG_TEAMS_COUNT]
Definition: Battleground.h:562
uint32 GetBonusHonorFromKill(uint32 kills) const
Definition: Battleground.cpp:907
Points
Definition: ScriptedEscortAI.cpp:31
uint32 m_HonorTics
Definition: BattlegroundEY.h:437
uint32 m_HonorScoreTics[2]
Definition: BattlegroundEY.h:418
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399
Team
Definition: SharedDefines.h:997
TeamId
Definition: SharedDefines.h:990
void RewardHonorToTeam(uint32 Honor, uint32 TeamID)
Definition: Battleground.cpp:709
void UpdateTeamScore(uint32 Team)
Definition: BattlegroundEY.cpp:303

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::CheckSomeoneJoinedPoint ( )
private
173 {
174  GameObject* obj = NULL;
175  for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
176  {
178  if (obj)
179  {
180  uint8 j = 0;
181  while (j < m_PlayersNearPoint[EY_POINTS_MAX].size())
182  {
183  Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
184  if (!player)
185  {
186  TC_LOG_ERROR("bg.battleground", "BattlegroundEY:CheckSomeoneJoinedPoint: Player (%s) not found!", m_PlayersNearPoint[EY_POINTS_MAX][j].ToString().c_str());
187  ++j;
188  continue;
189  }
190  if (player->CanCaptureTowerPoint() && player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
191  {
192  //player joined point!
193  //show progress bar
194  player->SendUpdateWorldState(PROGRESS_BAR_PERCENT_GREY, BG_EY_PROGRESS_BAR_PERCENT_GREY);
195  player->SendUpdateWorldState(PROGRESS_BAR_STATUS, m_PointBarStatus[i]);
196  player->SendUpdateWorldState(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_SHOW);
197  //add player to point
198  m_PlayersNearPoint[i].push_back(m_PlayersNearPoint[EY_POINTS_MAX][j]);
199  //remove player from "free space"
200  m_PlayersNearPoint[EY_POINTS_MAX].erase(m_PlayersNearPoint[EY_POINTS_MAX].begin() + j);
201  }
202  else
203  ++j;
204  }
205  }
206  }
207 }
arena_t NULL
Definition: jemalloc_internal.h:624
BattlegroundMap * GetBgMap() const
Definition: Battleground.h:356
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
Definition: BattlegroundEY.h:54
Definition: BattlegroundEY.h:67
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: BattlegroundEY.h:137
string ToString(int i)
Definition: strutil.h:491
GuidVector BgObjects
Definition: Battleground.h:452
Definition: GameObject.h:880
Definition: BattlegroundEY.h:53
int32 m_PointBarStatus[EY_POINTS_MAX]
Definition: BattlegroundEY.h:432
Definition: BattlegroundEY.h:52
uint8_t uint8
Definition: Define.h:152
Definition: BattlegroundEY.h:64
Definition: BattlegroundEY.h:66
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
Definition: BattlegroundEY.h:197

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::CheckSomeoneLeftPoint ( )
private
210 {
211  //reset current point counts
212  for (uint8 i = 0; i < 2*EY_POINTS_MAX; ++i)
214  GameObject* obj = NULL;
215  for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
216  {
218  if (obj)
219  {
220  uint8 j = 0;
221  while (j < m_PlayersNearPoint[i].size())
222  {
224  if (!player)
225  {
226  TC_LOG_ERROR("bg.battleground", "BattlegroundEY:CheckSomeoneLeftPoint Player (%s) not found!", m_PlayersNearPoint[i][j].ToString().c_str());
227  //move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
229  m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
230  continue;
231  }
232  if (!player->CanCaptureTowerPoint() || !player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
233  //move player out of point (add him to players that are out of points
234  {
236  m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
237  player->SendUpdateWorldState(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_DONT_SHOW);
238  }
239  else
240  {
241  //player is neat flag, so update count:
242  m_CurrentPointPlayersCount[2 * i + GetTeamIndexByTeamId(player->GetTeam())]++;
243  ++j;
244  }
245  }
246  }
247  }
248 }
uint8 m_CurrentPointPlayersCount[2 *EY_POINTS_MAX]
Definition: BattlegroundEY.h:434
arena_t NULL
Definition: jemalloc_internal.h:624
BattlegroundMap * GetBgMap() const
Definition: Battleground.h:356
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
Definition: BattlegroundEY.h:54
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: BattlegroundEY.h:137
string ToString(int i)
Definition: strutil.h:491
GuidVector BgObjects
Definition: Battleground.h:452
Definition: BattlegroundEY.h:65
Definition: GameObject.h:880
uint8_t uint8
Definition: Define.h:152
Definition: BattlegroundEY.h:64
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
Definition: BattlegroundEY.h:197

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::EndBattleground ( uint32  winner)
overridevirtual

Reimplemented from Battleground.

333 {
334  // Win reward
335  if (winner == ALLIANCE)
337  if (winner == HORDE)
339  // Complete map reward
342 
344 }
uint32 GetBonusHonorFromKill(uint32 kills) const
Definition: Battleground.cpp:907
Definition: SharedDefines.h:1000
void RewardHonorToTeam(uint32 Honor, uint32 TeamID)
Definition: Battleground.cpp:709
Definition: SharedDefines.h:999
virtual void EndBattleground(uint32 winner)
Definition: Battleground.cpp:744

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::EventPlayerCapturedFlag ( Player Source,
uint32  BgObjectType 
)
protected
806 {
807  if (GetStatus() != STATUS_IN_PROGRESS || GetFlagPickerGUID() != player->GetGUID())
808  return;
809 
812  player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
813 
814  player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
815 
816  if (player->GetTeam() == ALLIANCE)
818  else
820 
821  SpawnBGObject(BgObjectType, RESPAWN_IMMEDIATELY);
822 
824  m_FlagCapturedBgObjectType = BgObjectType;
825 
826  uint8 team_id = 0;
827  if (player->GetTeam() == ALLIANCE)
828  {
829  team_id = TEAM_ALLIANCE;
831  }
832  else
833  {
834  team_id = TEAM_HORDE;
836  }
837 
838  if (m_TeamPointsCount[team_id] > 0)
839  AddPoints(player->GetTeam(), BG_EY_FlagPoints[m_TeamPointsCount[team_id] - 1]);
840 
842 }
const uint32 BG_EY_FlagPoints[EY_POINTS_MAX]
Definition: BattlegroundEY.h:301
Definition: Battleground.h:159
Definition: Battleground.h:129
Definition: BattlegroundScore.h:35
void AddPoints(uint32 Team, uint32 Points)
Definition: BattlegroundEY.cpp:159
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: BattlegroundEY.h:79
Definition: BattlegroundEY.h:234
Definition: Language.h:696
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
int32 m_FlagsTimer
Definition: BattlegroundEY.h:427
uint32 m_FlagCapturedBgObjectType
Definition: BattlegroundEY.h:425
Definition: SharedDefines.h:1000
void SendMessageToAll(uint32 entry, ChatMsg type, Player const *source=NULL)
Definition: Battleground.cpp:1706
Definition: BattlegroundEY.h:87
void PlaySoundToAll(uint32 SoundID)
Definition: Battleground.cpp:681
uint8 m_FlagState
Definition: BattlegroundEY.h:426
bool UpdatePlayerScore(Player *player, uint32 type, uint32 value, bool doAddHonor=true) override
Definition: BattlegroundEY.cpp:844
Definition: BattlegroundEY.h:81
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:30
Definition: SharedDefines.h:4268
void SetFlagPicker(ObjectGuid guid)
Definition: BattlegroundEY.h:369
Definition: SharedDefines.h:4269
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
uint8_t uint8
Definition: Define.h:152
ObjectGuid GetFlagPickerGUID(int32=-1) const override
Definition: BattlegroundEY.h:368
Definition: SharedDefines.h:993
Definition: Language.h:695

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::EventPlayerClickedOnFlag ( Player Source,
GameObject target_obj 
)
overridevirtual

Reimplemented from Battleground.

659 {
660  if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !player->IsWithinDistInMap(target_obj, 10))
661  return;
662 
663  if (player->GetTeam() == ALLIANCE)
664  {
667  }
668  else
669  {
672  }
673 
677 
679  SetFlagPicker(player->GetGUID());
680  //get flag aura on player
681  player->CastSpell(player, BG_EY_NETHERSTORM_FLAG_SPELL, true);
682  player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
683 
684  if (player->GetTeam() == ALLIANCE)
686  else
688 }
Definition: Battleground.h:159
Definition: BattlegroundEY.h:201
Definition: BattlegroundEY.h:58
Definition: BattlegroundEY.h:233
Definition: BattlegroundEY.h:78
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
arena_t NULL
Definition: jemalloc_internal.h:624
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: SharedDefines.h:1000
Definition: BattlegroundEY.h:87
void PlaySoundToAll(uint32 SoundID)
Definition: Battleground.cpp:681
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: Battleground.h:128
Definition: BattlegroundEY.h:235
Definition: BattlegroundEY.h:55
Definition: BattlegroundEY.h:57
Definition: SharedDefines.h:4268
void SetFlagPicker(ObjectGuid guid)
Definition: BattlegroundEY.h:369
bool IsFlagPickedup() const
Definition: BattlegroundEY.h:370
Definition: SharedDefines.h:4269
Definition: Language.h:694
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735
void PSendMessageToAll(uint32 entry, ChatMsg type, Player const *source,...)
Definition: Battleground.cpp:1716
Definition: BattlegroundEY.h:80

+ Here is the call graph for this function:

void BattlegroundEY::EventPlayerDroppedFlag ( Player Source)
overridevirtual

Reimplemented from Battleground.

623 {
624  if (GetStatus() != STATUS_IN_PROGRESS)
625  {
626  // if not running, do not cast things at the dropper player, neither send unnecessary messages
627  // just take off the aura
628  if (IsFlagPickedup() && GetFlagPickerGUID() == player->GetGUID())
629  {
631  player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
632  }
633  return;
634  }
635 
636  if (!IsFlagPickedup())
637  return;
638 
639  if (GetFlagPickerGUID() != player->GetGUID())
640  return;
641 
643  player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
646  player->CastSpell(player, SPELL_RECENTLY_DROPPED_FLAG, true);
647  player->CastSpell(player, BG_EY_PLAYER_DROPPED_FLAG_SPELL, true);
648  //this does not work correctly :((it should remove flag carrier name)
651 
652  if (player->GetTeam() == ALLIANCE)
654  else
656 }
Definition: Battleground.h:159
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: BattlegroundEY.h:234
Definition: BattlegroundEY.h:58
Definition: BattlegroundEY.h:88
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
arena_t NULL
Definition: jemalloc_internal.h:624
int32 m_FlagsTimer
Definition: BattlegroundEY.h:427
Definition: SharedDefines.h:1000
void SendMessageToAll(uint32 entry, ChatMsg type, Player const *source=NULL)
Definition: Battleground.cpp:1706
Definition: BattlegroundEY.h:87
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: Battleground.h:113
Definition: Language.h:697
Definition: BattlegroundEY.h:57
Definition: BattlegroundEY.h:30
Definition: SharedDefines.h:4268
Definition: BattlegroundEY.h:236
void SetFlagPicker(ObjectGuid guid)
Definition: BattlegroundEY.h:369
bool IsFlagPickedup() const
Definition: BattlegroundEY.h:370
Definition: SharedDefines.h:4269
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735
ObjectGuid GetFlagPickerGUID(int32=-1) const override
Definition: BattlegroundEY.h:368

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::EventTeamCapturedPoint ( Player Source,
uint32  Point 
)
protected
739 {
740  if (GetStatus() != STATUS_IN_PROGRESS)
741  return;
742 
743  uint32 Team = player->GetTeam();
744 
745  SpawnBGObject(m_CapturingPointTypes[Point].DespawnNeutralObjectType, RESPAWN_ONE_DAY);
746  SpawnBGObject(m_CapturingPointTypes[Point].DespawnNeutralObjectType + 1, RESPAWN_ONE_DAY);
747  SpawnBGObject(m_CapturingPointTypes[Point].DespawnNeutralObjectType + 2, RESPAWN_ONE_DAY);
748 
749  if (Team == ALLIANCE)
750  {
752  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeAlliance, RESPAWN_IMMEDIATELY);
753  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeAlliance + 1, RESPAWN_IMMEDIATELY);
754  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeAlliance + 2, RESPAWN_IMMEDIATELY);
755  }
756  else
757  {
759  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeHorde, RESPAWN_IMMEDIATELY);
760  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeHorde + 1, RESPAWN_IMMEDIATELY);
761  SpawnBGObject(m_CapturingPointTypes[Point].SpawnObjectTypeHorde + 2, RESPAWN_IMMEDIATELY);
762  }
763 
764  //buff isn't respawned
765 
766  m_PointOwnedByTeam[Point] = Team;
768 
769  if (Team == ALLIANCE)
770  SendMessageToAll(m_CapturingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
771  else
772  SendMessageToAll(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
773 
774  if (!BgCreatures[Point].IsEmpty())
775  DelCreature(Point);
776 
777  WorldSafeLocsEntry const* sg = NULL;
778  sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
779  if (!sg || !AddSpiritGuide(Point, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.124139f, GetTeamIndexByTeamId(Team)))
780  TC_LOG_ERROR("bg.battleground", "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
781  Point, Team, m_CapturingPointTypes[Point].GraveYardId);
782 
783 // SpawnBGCreature(Point, RESPAWN_IMMEDIATELY);
784 
785  UpdatePointsIcons(Team, Point);
786  UpdatePointsCount(Team);
787 
788  if (Point >= EY_POINTS_MAX)
789  return;
790 
791  Creature* trigger = GetBGCreature(Point + 6, false);//0-5 spirit guides
792  if (!trigger)
793  trigger = AddCreature(WORLD_TRIGGER, Point+6, BG_EY_TriggerPositions[Point], GetTeamIndexByTeamId(Team));
794 
795  //add bonus honor aura trigger creature when node is accupied
796  //cast bonus aura (+50% honor in 25yards)
797  //aura should only apply to players who have accupied the node, set correct faction for trigger
798  if (trigger)
799  {
800  trigger->setFaction(Team == ALLIANCE ? 84 : 83);
801  trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
802  }
803 }
Definition: Battleground.h:159
Definition: Battleground.h:129
float Z
Definition: DBCEnums.h:36
void UpdatePointsIcons(uint32 Team, uint32 Point)
Definition: BattlegroundEY.cpp:354
float Y
Definition: DBCEnums.h:35
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsfmt)
Definition: BattlegroundEY.h:243
virtual bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL)
Definition: Battleground.cpp:1676
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
#define WORLD_TRIGGER
Definition: Unit.h:33
virtual Creature * AddCreature(uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=NULL)
Definition: Battleground.cpp:1580
Definition: DBCStructure.h:1434
arena_t NULL
Definition: jemalloc_internal.h:624
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: Creature.h:467
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399
Definition: SharedDefines.h:1000
void setFaction(uint32 faction)
Definition: Unit.h:1467
void SendMessageToAll(uint32 entry, ChatMsg type, Player const *source=NULL)
Definition: Battleground.cpp:1706
Team
Definition: SharedDefines.h:997
Position const BG_EY_TriggerPositions[EY_POINTS_MAX]
Definition: BattlegroundEY.h:260
Definition: BattlegroundEY.h:137
GuidVector BgCreatures
Definition: Battleground.h:453
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:992
Definition: Battleground.h:128
float X
Definition: DBCEnums.h:34
DBCPosition3D Loc
Definition: DBCStructure.h:1438
Definition: Battleground.h:115
Definition: SharedDefines.h:4268
bool DelCreature(uint32 type)
Definition: Battleground.cpp:1640
Definition: SharedDefines.h:4269
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX]
Definition: BattlegroundEY.h:318
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Creature * GetBGCreature(uint32 type, bool logError=true)
Definition: Battleground.cpp:1549
Definition: SharedDefines.h:993
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
void UpdatePointsCount(uint32 Team)
Definition: BattlegroundEY.cpp:346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::EventTeamLostPoint ( Player Source,
uint32  Point 
)
protected
691 {
692  if (GetStatus() != STATUS_IN_PROGRESS)
693  return;
694 
695  //Natural point
696  uint32 Team = m_PointOwnedByTeam[Point];
697 
698  if (!Team)
699  return;
700 
701  if (Team == ALLIANCE)
702  {
704  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeAlliance, RESPAWN_ONE_DAY);
705  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeAlliance + 1, RESPAWN_ONE_DAY);
706  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeAlliance + 2, RESPAWN_ONE_DAY);
707  }
708  else
709  {
711  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeHorde, RESPAWN_ONE_DAY);
712  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeHorde + 1, RESPAWN_ONE_DAY);
713  SpawnBGObject(m_LosingPointTypes[Point].DespawnObjectTypeHorde + 2, RESPAWN_ONE_DAY);
714  }
715 
716  SpawnBGObject(m_LosingPointTypes[Point].SpawnNeutralObjectType, RESPAWN_IMMEDIATELY);
717  SpawnBGObject(m_LosingPointTypes[Point].SpawnNeutralObjectType + 1, RESPAWN_IMMEDIATELY);
718  SpawnBGObject(m_LosingPointTypes[Point].SpawnNeutralObjectType + 2, RESPAWN_IMMEDIATELY);
719 
720  //buff isn't despawned
721 
724 
725  if (Team == ALLIANCE)
726  SendMessageToAll(m_LosingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
727  else
728  SendMessageToAll(m_LosingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
729 
730  UpdatePointsIcons(Team, Point);
731  UpdatePointsCount(Team);
732 
733  //remove bonus honor aura trigger creature when node is lost
734  if (Point < EY_POINTS_MAX)
735  DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides
736 }
Definition: Battleground.h:159
Definition: Battleground.h:129
void UpdatePointsIcons(uint32 Team, uint32 Point)
Definition: BattlegroundEY.cpp:354
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: SharedDefines.h:1000
void SendMessageToAll(uint32 entry, ChatMsg type, Player const *source=NULL)
Definition: Battleground.cpp:1706
Team
Definition: SharedDefines.h:997
Definition: BattlegroundEY.h:137
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:992
Definition: Battleground.h:128
Definition: SharedDefines.h:4268
bool DelCreature(uint32 type)
Definition: Battleground.cpp:1640
Definition: SharedDefines.h:4269
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
const BattlegroundEYLosingPointStruct m_LosingPointTypes[EY_POINTS_MAX]
Definition: BattlegroundEY.h:311
Definition: BattlegroundEY.h:241
Definition: SharedDefines.h:993
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
void UpdatePointsCount(uint32 Team)
Definition: BattlegroundEY.cpp:346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
overridevirtual

Reimplemented from Battleground.

861 {
864  packet.Worldstates.emplace_back(0xAB6, 0x0);
865  packet.Worldstates.emplace_back(0xAB5, 0x0);
866  packet.Worldstates.emplace_back(0xAB4, 0x0);
867  packet.Worldstates.emplace_back(0xAB3, 0x0);
868  packet.Worldstates.emplace_back(0xAB2, 0x0);
869  packet.Worldstates.emplace_back(0xAB1, 0x0);
870  packet.Worldstates.emplace_back(0xAB0, 0x0);
871  packet.Worldstates.emplace_back(0xAAF, 0x0);
872 
886 
887  packet.Worldstates.emplace_back(0xAD2, 0x1);
888  packet.Worldstates.emplace_back(0xAD1, 0x1);
889 
890  packet.Worldstates.emplace_back(0xABE, int32(GetTeamScore(TEAM_HORDE)));
891  packet.Worldstates.emplace_back(0xABD, int32(GetTeamScore(TEAM_ALLIANCE)));
892 
893  packet.Worldstates.emplace_back(0xA05, 0x8E);
894  packet.Worldstates.emplace_back(0xAA0, 0x0);
895  packet.Worldstates.emplace_back(0xA9F, 0x0);
896  packet.Worldstates.emplace_back(0xA9E, 0x0);
897  packet.Worldstates.emplace_back(0xC0D, 0x17B);
898 }
Definition: BattlegroundEY.h:46
Definition: BattlegroundEY.h:132
Definition: BattlegroundEY.h:41
Definition: BattlegroundEY.h:243
Definition: BattlegroundEY.h:48
Definition: BattlegroundEY.h:233
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
Definition: BattlegroundEY.h:49
Definition: BattlegroundEY.h:47
Definition: SharedDefines.h:1000
uint32 GetTeamScore(uint32 TeamID) const
Definition: Battleground.cpp:1924
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: BattlegroundEY.h:44
Definition: BattlegroundEY.h:38
Definition: BattlegroundEY.h:133
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:55
Definition: SharedDefines.h:999
Definition: BattlegroundEY.h:134
Definition: BattlegroundEY.h:39
Definition: BattlegroundEY.h:40
Definition: BattlegroundEY.h:51
int32_t int32
Definition: g3dmath.h:167
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
Definition: BattlegroundEY.h:43
uint32_t uint32
Definition: g3dmath.h:168
Definition: BattlegroundEY.h:50
Definition: SharedDefines.h:993
Definition: BattlegroundEY.h:131
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
Definition: BattlegroundEY.h:42
Definition: BattlegroundEY.h:45

+ Here is the call graph for this function:

WorldSafeLocsEntry const * BattlegroundEY::GetClosestGraveYard ( Player player)
overridevirtual

Reimplemented from Battleground.

901 {
902  uint32 g_id = 0;
903 
904  switch (player->GetTeam())
905  {
906  case ALLIANCE: g_id = EY_GRAVEYARD_MAIN_ALLIANCE; break;
907  case HORDE: g_id = EY_GRAVEYARD_MAIN_HORDE; break;
908  default: return NULL;
909  }
910 
911  float distance, nearestDistance;
912 
913  WorldSafeLocsEntry const* entry = NULL;
914  WorldSafeLocsEntry const* nearestEntry = NULL;
915  entry = sWorldSafeLocsStore.LookupEntry(g_id);
916  nearestEntry = entry;
917 
918  if (!entry)
919  {
920  TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
921  return NULL;
922  }
923 
924  float plr_x = player->GetPositionX();
925  float plr_y = player->GetPositionY();
926  float plr_z = player->GetPositionZ();
927 
928  distance = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x) + (entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y) + (entry->Loc.Z - plr_z)*(entry->Loc.Z - plr_z);
929  nearestDistance = distance;
930 
931  for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
932  {
933  if (m_PointOwnedByTeam[i] == player->GetTeam() && m_PointState[i] == EY_POINT_UNDER_CONTROL)
934  {
935  entry = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId);
936  if (!entry)
937  TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId);
938  else
939  {
940  distance = (entry->Loc.X - plr_x)*(entry->Loc.X - plr_x) + (entry->Loc.Y - plr_y)*(entry->Loc.Y - plr_y) + (entry->Loc.Z - plr_z)*(entry->Loc.Z - plr_z);
941  if (distance < nearestDistance)
942  {
943  nearestDistance = distance;
944  nearestEntry = entry;
945  }
946  }
947  }
948  }
949 
950  return nearestEntry;
951 }
float Z
Definition: DBCEnums.h:36
float Y
Definition: DBCEnums.h:35
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsfmt)
Definition: BattlegroundEY.h:243
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
Definition: DBCStructure.h:1434
arena_t NULL
Definition: jemalloc_internal.h:624
double distance(double x, double y)
Definition: g3dmath.h:731
Definition: SharedDefines.h:1000
Definition: BattlegroundEY.h:137
Definition: BattlegroundEY.h:122
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundEY.h:121
float X
Definition: DBCEnums.h:34
DBCPosition3D Loc
Definition: DBCStructure.h:1438
Definition: SharedDefines.h:999
uint8_t uint8
Definition: Define.h:152
const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX]
Definition: BattlegroundEY.h:318
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430

+ Here is the call graph for this function:

ObjectGuid BattlegroundEY::GetDroppedFlagGUID ( ) const
inline
386 { return m_DroppedFlagGUID; }
ObjectGuid m_DroppedFlagGUID
Definition: BattlegroundEY.h:424

+ Here is the caller graph for this function:

ObjectGuid BattlegroundEY::GetFlagPickerGUID ( int32  = -1) const
inlineoverridevirtual

Reimplemented from Battleground.

368 { return m_FlagKeeper; }
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423

+ Here is the caller graph for this function:

uint8 BattlegroundEY::GetFlagState ( ) const
inline
371 { return m_FlagState; }
uint8 m_FlagState
Definition: BattlegroundEY.h:426
void BattlegroundEY::GetPlayerPositionData ( std::vector< WorldPackets::Battleground::BattlegroundPlayerPosition > *  positions) const
overrideprotectedvirtual

Reimplemented from Battleground.

119 {
121  {
123  position.Guid = player->GetGUID();
124  position.Pos.x = player->GetPositionX();
125  position.Pos.y = player->GetPositionY();
128  positions->push_back(position);
129  }
130 }
int8 IconID
Definition: BattlegroundPackets.h:349
ObjectGuid Guid
Definition: BattlegroundPackets.h:347
int8 ArenaSlot
Definition: BattlegroundPackets.h:350
Definition: Battleground.h:218
BattlegroundMap * GetBgMap() const
Definition: Battleground.h:356
Definition: BattlegroundPackets.h:345
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423
Definition: SharedDefines.h:1000
float y
Definition: Vector2.h:50
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:184
G3D::Vector2 Pos
Definition: BattlegroundPackets.h:348
float x
Definition: Vector2.h:49
Definition: Battleground.h:217
Definition: Battleground.h:220

+ Here is the call graph for this function:

uint32 BattlegroundEY::GetPrematureWinner ( )
overridevirtual

Reimplemented from Battleground.

964 {
966  return ALLIANCE;
968  return HORDE;
969 
971 }
virtual uint32 GetPrematureWinner()
Definition: Battleground.cpp:405
Definition: SharedDefines.h:1000
uint32 GetTeamScore(uint32 TeamID) const
Definition: Battleground.cpp:1924
Definition: SharedDefines.h:992
Definition: SharedDefines.h:999
Definition: SharedDefines.h:993

+ Here is the call graph for this function:

void BattlegroundEY::HandleAreaTrigger ( Player source,
uint32  trigger,
bool  entered 
)
overridevirtual

Reimplemented from Battleground.

408 {
409  if (GetStatus() != STATUS_IN_PROGRESS)
410  return;
411 
412  if (!player->IsAlive()) //hack code, must be removed later
413  return;
414 
415  switch (trigger)
416  {
417  case TR_BLOOD_ELF_POINT:
419  if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
421  break;
422  case TR_FEL_REAVER_POINT:
424  if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
426  break;
427  case TR_MAGE_TOWER_POINT:
429  if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
431  break;
434  if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
436  break;
437  case 4512:
438  case 4515:
439  case 4517:
440  case 4519:
441  case 4530:
442  case 4531:
443  case 4568:
444  case 4569:
445  case 4570:
446  case 4571:
447  case 5866:
448  break;
449  default:
450  Battleground::HandleAreaTrigger(player, trigger, entered);
451  break;
452  }
453 }
Definition: Battleground.h:159
Definition: BattlegroundEY.h:132
Definition: BattlegroundEY.h:243
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
Definition: BattlegroundEY.h:109
void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
Definition: BattlegroundEY.cpp:805
Definition: BattlegroundEY.h:110
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: BattlegroundEY.h:133
Definition: BattlegroundEY.h:111
Definition: BattlegroundEY.h:203
Definition: BattlegroundEY.h:112
Definition: BattlegroundEY.h:134
Definition: BattlegroundEY.h:204
Definition: BattlegroundEY.h:202
Definition: BattlegroundEY.h:205
ObjectGuid GetFlagPickerGUID(int32=-1) const override
Definition: BattlegroundEY.h:368
virtual void HandleAreaTrigger(Player *, uint32, bool)
Definition: Battleground.cpp:1933
Definition: BattlegroundEY.h:131
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430

+ Here is the call graph for this function:

void BattlegroundEY::HandleKillPlayer ( Player player,
Player killer 
)
overridevirtual

Reimplemented from Battleground.

614 {
615  if (GetStatus() != STATUS_IN_PROGRESS)
616  return;
617 
618  Battleground::HandleKillPlayer(player, killer);
619  EventPlayerDroppedFlag(player);
620 }
Definition: Battleground.h:159
void EventPlayerDroppedFlag(Player *Source) override
Definition: BattlegroundEY.cpp:622
virtual void HandleKillPlayer(Player *player, Player *killer)
Definition: Battleground.cpp:1784
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266

+ Here is the call graph for this function:

bool BattlegroundEY::IsAllNodesControlledByTeam ( uint32  team) const
overridevirtual

Reimplemented from Battleground.

954 {
955  uint32 count = 0;
956  for (int i = 0; i < EY_POINTS_MAX; ++i)
958  ++count;
959 
960  return count == EY_POINTS_MAX;
961 }
Definition: BattlegroundEY.h:243
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
Definition: BattlegroundEY.h:137
uint32_t uint32
Definition: Define.h:150
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
bool BattlegroundEY::IsFlagPickedup ( ) const
inline
370 { return !m_FlagKeeper.IsEmpty(); }
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423
bool IsEmpty() const
Definition: ObjectGuid.h:242

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::PostUpdateImpl ( uint32  )
overrideprotectedvirtual

Post-update hook.

Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.

Parameters
diffa time difference between two worldserver update loops in milliseconds.
See also
Update(), PreUpdateImpl().

Reimplemented from Battleground.

75 {
77  {
78  m_PointAddingTimer -= diff;
79  if (m_PointAddingTimer <= 0)
80  {
86  }
87 
89  {
90  m_FlagsTimer -= diff;
91 
92  if (m_FlagsTimer < 0)
93  {
94  m_FlagsTimer = 0;
96  RespawnFlag(true);
97  else
99  }
100  }
101 
102  m_TowerCapCheckTimer -= diff;
103  if (m_TowerCapCheckTimer <= 0)
104  {
105  //check if player joined point
106  /*I used this order of calls, because although we will check if one player is in gameobject's distance 2 times
107  but we can count of players on current point in CheckSomeoneLeftPoint
108  */
109  this->CheckSomeoneJoinedPoint();
110  //check if player left point
111  this->CheckSomeoneLeftPoint();
112  this->UpdatePointStatuses();
114  }
115  }
116 }
Definition: Battleground.h:159
void RespawnFlagAfterDrop()
Definition: BattlegroundEY.cpp:600
void AddPoints(uint32 Team, uint32 Points)
Definition: BattlegroundEY.cpp:159
Definition: BattlegroundEY.h:234
int32 m_TowerCapCheckTimer
Definition: BattlegroundEY.h:428
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
const uint8 BG_EY_TickPoints[EY_POINTS_MAX]
Definition: BattlegroundEY.h:300
int32 m_FlagsTimer
Definition: BattlegroundEY.h:427
Definition: SharedDefines.h:1000
void RespawnFlag(bool send_message)
Definition: BattlegroundEY.cpp:582
uint8 m_FlagState
Definition: BattlegroundEY.h:426
int32 m_PointAddingTimer
Definition: BattlegroundEY.h:436
Definition: BattlegroundEY.h:31
Definition: SharedDefines.h:992
Definition: SharedDefines.h:999
void CheckSomeoneLeftPoint()
Definition: BattlegroundEY.cpp:209
Definition: BattlegroundEY.h:236
void UpdatePointStatuses()
Definition: BattlegroundEY.cpp:250
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
void CheckSomeoneJoinedPoint()
Definition: BattlegroundEY.cpp:172
Definition: SharedDefines.h:993

+ Here is the call graph for this function:

void BattlegroundEY::RemovePlayer ( Player player,
ObjectGuid  guid,
uint32  team 
)
overridevirtual

Reimplemented from Battleground.

384 {
385  // sometimes flag aura not removed :(
386  for (int j = EY_POINTS_MAX; j >= 0; --j)
387  {
388  for (size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
389  if (m_PlayersNearPoint[j][i] == guid)
390  m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
391  }
392  if (IsFlagPickedup())
393  {
394  if (m_FlagKeeper == guid)
395  {
396  if (player)
397  EventPlayerDroppedFlag(player);
398  else
399  {
401  RespawnFlag(true);
402  }
403  }
404  }
405 }
void EventPlayerDroppedFlag(Player *Source) override
Definition: BattlegroundEY.cpp:622
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423
void RespawnFlag(bool send_message)
Definition: BattlegroundEY.cpp:582
Definition: BattlegroundEY.h:137
void SetFlagPicker(ObjectGuid guid)
Definition: BattlegroundEY.h:369
bool IsFlagPickedup() const
Definition: BattlegroundEY.h:370

+ Here is the call graph for this function:

void BattlegroundEY::RemovePoint ( uint32  TeamID,
uint32  Points = 1 
)
inlineprivate
int32 m_TeamScores[BG_TEAMS_COUNT]
Definition: Battleground.h:562
Points
Definition: ScriptedEscortAI.cpp:31
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399

+ Here is the call graph for this function:

void BattlegroundEY::Reset ( )
overridevirtual

Reimplemented from Battleground.

551 {
552  //call parent's class reset
554 
565  m_PointAddingTimer = 0;
567  bool isBGWeekend = sBattlegroundMgr->IsBGWeekend(GetTypeID());
569 
570  for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
571  {
575  m_PlayersNearPoint[i].clear();
576  m_PlayersNearPoint[i].reserve(15); //tip size
577  }
580 }
#define BG_EY_EYWeekendHonorTicks
Definition: BattlegroundEY.h:223
Definition: BattlegroundEY.h:242
int32 m_TeamScores[BG_TEAMS_COUNT]
Definition: Battleground.h:562
Definition: BattlegroundEY.h:233
#define BG_EY_NotEYWeekendHonorTicks
Definition: BattlegroundEY.h:222
int32 m_TowerCapCheckTimer
Definition: BattlegroundEY.h:428
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423
uint32 m_HonorTics
Definition: BattlegroundEY.h:437
uint32 m_FlagCapturedBgObjectType
Definition: BattlegroundEY.h:425
uint32 m_HonorScoreTics[2]
Definition: BattlegroundEY.h:418
Definition: BattlegroundEY.h:137
uint8 m_FlagState
Definition: BattlegroundEY.h:426
int32 m_PointAddingTimer
Definition: BattlegroundEY.h:436
virtual void Reset()
Definition: Battleground.cpp:1034
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:136
void Clear()
Definition: ObjectGuid.h:215
int32 m_PointBarStatus[EY_POINTS_MAX]
Definition: BattlegroundEY.h:432
Definition: BattlegroundEY.h:68
#define sBattlegroundMgr
Definition: BattlegroundMgr.h:181
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
uint8_t uint8
Definition: Define.h:152
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
Definition: Battleground.h:263
ObjectGuid m_DroppedFlagGUID
Definition: BattlegroundEY.h:424
Definition: BattlegroundEY.h:241
Definition: SharedDefines.h:993
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430

+ Here is the call graph for this function:

void BattlegroundEY::RespawnFlag ( bool  send_message)
583 {
586 
590 
591  if (send_message)
592  {
594  PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound...
595  }
596 
598 }
Definition: Battleground.h:129
Definition: BattlegroundEY.h:82
Definition: BattlegroundEY.h:201
Definition: BattlegroundEY.h:233
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
uint32 m_FlagCapturedBgObjectType
Definition: BattlegroundEY.h:425
void SendMessageToAll(uint32 entry, ChatMsg type, Player const *source=NULL)
Definition: Battleground.cpp:1706
void PlaySoundToAll(uint32 SoundID)
Definition: Battleground.cpp:681
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: SharedDefines.h:4267
Definition: Battleground.h:128
Definition: Language.h:698
Definition: BattlegroundEY.h:55
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::RespawnFlagAfterDrop ( )
601 {
602  RespawnFlag(true);
603 
605  if (obj)
606  obj->Delete();
607  else
608  TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown dropped flag (%s)", GetDroppedFlagGUID().ToString().c_str());
609 
611 }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
void SetDroppedFlagGUID(ObjectGuid guid, int32=-1) override
Definition: BattlegroundEY.h:385
BattlegroundMap * GetBgMap() const
Definition: Battleground.h:356
void RespawnFlag(bool send_message)
Definition: BattlegroundEY.cpp:582
string ToString(int i)
Definition: strutil.h:491
ObjectGuid GetDroppedFlagGUID() const
Definition: BattlegroundEY.h:386
Definition: GameObject.h:880
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
void Delete()
Definition: GameObject.cpp:726

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::SetDroppedFlagGUID ( ObjectGuid  guid,
int32  = -1 
)
inlineoverridevirtual

Reimplemented from Battleground.

385 { m_DroppedFlagGUID = guid; }
ObjectGuid m_DroppedFlagGUID
Definition: BattlegroundEY.h:424

+ Here is the caller graph for this function:

void BattlegroundEY::SetFlagPicker ( ObjectGuid  guid)
inline
369 { m_FlagKeeper = guid; }
ObjectGuid m_FlagKeeper
Definition: BattlegroundEY.h:423

+ Here is the caller graph for this function:

void BattlegroundEY::SetTeamPoint ( uint32  TeamID,
uint32  Points = 0 
)
inlineprivate
int32 m_TeamScores[BG_TEAMS_COUNT]
Definition: Battleground.h:562
Points
Definition: ScriptedEscortAI.cpp:31
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399

+ Here is the call graph for this function:

bool BattlegroundEY::SetupBattleground ( )
overridevirtual

Reimplemented from Battleground.

456 {
457  // doors
458  if (!AddObject(BG_EY_OBJECT_DOOR_A, BG_OBJECT_A_DOOR_EY_ENTRY, 2527.6f, 1596.91f, 1262.13f, -3.12414f, -0.173642f, -0.001515f, 0.98477f, -0.008594f, RESPAWN_IMMEDIATELY)
459  || !AddObject(BG_EY_OBJECT_DOOR_H, BG_OBJECT_H_DOOR_EY_ENTRY, 1803.21f, 1539.49f, 1261.09f, 3.14159f, 0.173648f, 0, 0.984808f, 0, RESPAWN_IMMEDIATELY)
460  // banners (alliance)
461  || !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2057.46f, 1735.07f, 1187.91f, -0.925024f, 0, 0, 0.446198f, -0.894934f, RESPAWN_ONE_DAY)
462  || !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2032.25f, 1729.53f, 1190.33f, 1.8675f, 0, 0, 0.803857f, 0.594823f, RESPAWN_ONE_DAY)
463  || !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2092.35f, 1775.46f, 1187.08f, -0.401426f, 0, 0, 0.199368f, -0.979925f, RESPAWN_ONE_DAY)
464  || !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2047.19f, 1349.19f, 1189.0f, -1.62316f, 0, 0, 0.725374f, -0.688354f, RESPAWN_ONE_DAY)
465  || !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2074.32f, 1385.78f, 1194.72f, 0.488692f, 0, 0, 0.241922f, 0.970296f, RESPAWN_ONE_DAY)
466  || !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2025.13f, 1386.12f, 1192.74f, 2.3911f, 0, 0, 0.930418f, 0.366501f, RESPAWN_ONE_DAY)
467  || !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2276.8f, 1400.41f, 1196.33f, 2.44346f, 0, 0, 0.939693f, 0.34202f, RESPAWN_ONE_DAY)
468  || !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2305.78f, 1404.56f, 1199.38f, 1.74533f, 0, 0, 0.766044f, 0.642788f, RESPAWN_ONE_DAY)
469  || !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2245.4f, 1366.41f, 1195.28f, 2.21657f, 0, 0, 0.894934f, 0.446198f, RESPAWN_ONE_DAY)
470  || !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2270.84f, 1784.08f, 1186.76f, 2.42601f, 0, 0, 0.936672f, 0.350207f, RESPAWN_ONE_DAY)
471  || !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2269.13f, 1737.7f, 1186.66f, 0.994838f, 0, 0, 0.477159f, 0.878817f, RESPAWN_ONE_DAY)
472  || !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2300.86f, 1741.25f, 1187.7f, -0.785398f, 0, 0, 0.382683f, -0.92388f, RESPAWN_ONE_DAY)
473  // banners (horde)
474  || !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2057.46f, 1735.07f, 1187.91f, -0.925024f, 0, 0, 0.446198f, -0.894934f, RESPAWN_ONE_DAY)
475  || !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2032.25f, 1729.53f, 1190.33f, 1.8675f, 0, 0, 0.803857f, 0.594823f, RESPAWN_ONE_DAY)
476  || !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2092.35f, 1775.46f, 1187.08f, -0.401426f, 0, 0, 0.199368f, -0.979925f, RESPAWN_ONE_DAY)
477  || !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2047.19f, 1349.19f, 1189.0f, -1.62316f, 0, 0, 0.725374f, -0.688354f, RESPAWN_ONE_DAY)
478  || !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2074.32f, 1385.78f, 1194.72f, 0.488692f, 0, 0, 0.241922f, 0.970296f, RESPAWN_ONE_DAY)
479  || !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2025.13f, 1386.12f, 1192.74f, 2.3911f, 0, 0, 0.930418f, 0.366501f, RESPAWN_ONE_DAY)
480  || !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2276.8f, 1400.41f, 1196.33f, 2.44346f, 0, 0, 0.939693f, 0.34202f, RESPAWN_ONE_DAY)
481  || !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2305.78f, 1404.56f, 1199.38f, 1.74533f, 0, 0, 0.766044f, 0.642788f, RESPAWN_ONE_DAY)
482  || !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2245.4f, 1366.41f, 1195.28f, 2.21657f, 0, 0, 0.894934f, 0.446198f, RESPAWN_ONE_DAY)
483  || !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2270.84f, 1784.08f, 1186.76f, 2.42601f, 0, 0, 0.936672f, 0.350207f, RESPAWN_ONE_DAY)
484  || !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2269.13f, 1737.7f, 1186.66f, 0.994838f, 0, 0, 0.477159f, 0.878817f, RESPAWN_ONE_DAY)
485  || !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2300.86f, 1741.25f, 1187.7f, -0.785398f, 0, 0, 0.382683f, -0.92388f, RESPAWN_ONE_DAY)
486  // banners (natural)
487  || !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2057.46f, 1735.07f, 1187.91f, -0.925024f, 0, 0, 0.446198f, -0.894934f, RESPAWN_ONE_DAY)
488  || !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2032.25f, 1729.53f, 1190.33f, 1.8675f, 0, 0, 0.803857f, 0.594823f, RESPAWN_ONE_DAY)
489  || !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2092.35f, 1775.46f, 1187.08f, -0.401426f, 0, 0, 0.199368f, -0.979925f, RESPAWN_ONE_DAY)
490  || !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2047.19f, 1349.19f, 1189.0f, -1.62316f, 0, 0, 0.725374f, -0.688354f, RESPAWN_ONE_DAY)
491  || !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2074.32f, 1385.78f, 1194.72f, 0.488692f, 0, 0, 0.241922f, 0.970296f, RESPAWN_ONE_DAY)
492  || !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2025.13f, 1386.12f, 1192.74f, 2.3911f, 0, 0, 0.930418f, 0.366501f, RESPAWN_ONE_DAY)
493  || !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2276.8f, 1400.41f, 1196.33f, 2.44346f, 0, 0, 0.939693f, 0.34202f, RESPAWN_ONE_DAY)
494  || !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2305.78f, 1404.56f, 1199.38f, 1.74533f, 0, 0, 0.766044f, 0.642788f, RESPAWN_ONE_DAY)
495  || !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2245.4f, 1366.41f, 1195.28f, 2.21657f, 0, 0, 0.894934f, 0.446198f, RESPAWN_ONE_DAY)
496  || !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2270.84f, 1784.08f, 1186.76f, 2.42601f, 0, 0, 0.936672f, 0.350207f, RESPAWN_ONE_DAY)
497  || !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2269.13f, 1737.7f, 1186.66f, 0.994838f, 0, 0, 0.477159f, 0.878817f, RESPAWN_ONE_DAY)
498  || !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2300.86f, 1741.25f, 1187.7f, -0.785398f, 0, 0, 0.382683f, -0.92388f, RESPAWN_ONE_DAY)
499  // flags
500  || !AddObject(BG_EY_OBJECT_FLAG_NETHERSTORM, BG_OBJECT_FLAG2_EY_ENTRY, 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f, 0, 0, 0.662620f, -0.748956f, RESPAWN_ONE_DAY)
501  || !AddObject(BG_EY_OBJECT_FLAG_FEL_REAVER, BG_OBJECT_FLAG1_EY_ENTRY, 2044.28f, 1729.68f, 1189.96f, -0.017453f, 0, 0, 0.008727f, -0.999962f, RESPAWN_ONE_DAY)
502  || !AddObject(BG_EY_OBJECT_FLAG_BLOOD_ELF, BG_OBJECT_FLAG1_EY_ENTRY, 2048.83f, 1393.65f, 1194.49f, 0.20944f, 0, 0, 0.104528f, 0.994522f, RESPAWN_ONE_DAY)
503  || !AddObject(BG_EY_OBJECT_FLAG_DRAENEI_RUINS, BG_OBJECT_FLAG1_EY_ENTRY, 2286.56f, 1402.36f, 1197.11f, 3.72381f, 0, 0, 0.957926f, -0.287016f, RESPAWN_ONE_DAY)
504  || !AddObject(BG_EY_OBJECT_FLAG_MAGE_TOWER, BG_OBJECT_FLAG1_EY_ENTRY, 2284.48f, 1731.23f, 1189.99f, 2.89725f, 0, 0, 0.992546f, 0.121869f, RESPAWN_ONE_DAY)
505  // tower cap
506  || !AddObject(BG_EY_OBJECT_TOWER_CAP_FEL_REAVER, BG_OBJECT_FR_TOWER_CAP_EY_ENTRY, 2024.600708f, 1742.819580f, 1195.157715f, 2.443461f, 0, 0, 0.939693f, 0.342020f, RESPAWN_ONE_DAY)
507  || !AddObject(BG_EY_OBJECT_TOWER_CAP_BLOOD_ELF, BG_OBJECT_BE_TOWER_CAP_EY_ENTRY, 2050.493164f, 1372.235962f, 1194.563477f, 1.710423f, 0, 0, 0.754710f, 0.656059f, RESPAWN_ONE_DAY)
508  || !AddObject(BG_EY_OBJECT_TOWER_CAP_DRAENEI_RUINS, BG_OBJECT_DR_TOWER_CAP_EY_ENTRY, 2301.010498f, 1386.931641f, 1197.183472f, 1.570796f, 0, 0, 0.707107f, 0.707107f, RESPAWN_ONE_DAY)
509  || !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY)
510 )
511  {
512  TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn some object Battleground not created!");
513  return false;
514  }
515 
516  //buffs
517  for (int i = 0; i < EY_POINTS_MAX; ++i)
518  {
519  AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(m_Points_Trigger[i]);
520  if (!at)
521  {
522  TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
523  continue;
524  }
525  if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
526  || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
527  || !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->Pos.X, at->Pos.Y, at->Pos.Z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
528 )
529  TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Cannot spawn buff");
530  }
531 
532  WorldSafeLocsEntry const* sg = NULL;
534  if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.124139f, TEAM_ALLIANCE))
535  {
536  TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
537  return false;
538  }
539 
541  if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->Loc.X, sg->Loc.Y, sg->Loc.Z, 3.193953f, TEAM_HORDE))
542  {
543  TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
544  return false;
545  }
546 
547  return true;
548 }
Definition: BattlegroundEY.h:198
Definition: BattlegroundEY.h:181
Definition: BattlegroundEY.h:193
Definition: Battleground.h:129
virtual bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
Definition: Battleground.cpp:1446
float Z
Definition: DBCEnums.h:36
float Y
Definition: DBCEnums.h:35
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsfmt)
Definition: BattlegroundEY.h:194
Definition: BattlegroundEY.h:201
Definition: BattlegroundEY.h:173
virtual bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL)
Definition: Battleground.cpp:1676
Definition: BattlegroundEY.h:96
Definition: BattlegroundEY.h:93
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerfmt)
Definition: BattlegroundEY.h:168
Definition: BattlegroundEY.h:190
Definition: BattlegroundEY.h:184
Definition: DBCStructure.h:1434
Definition: BattlegroundEY.h:188
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: BattlegroundEY.h:101
Definition: BattlegroundEY.h:187
Definition: BattlegroundEY.h:200
Definition: BattlegroundEY.h:165
Definition: BattlegroundEY.h:186
Definition: BattlegroundEY.h:185
Definition: BattlegroundEY.h:182
Definition: BattlegroundEY.h:183
Definition: BattlegroundEY.h:94
Definition: BattlegroundEY.h:98
Definition: BattlegroundEY.h:172
Definition: BattlegroundEY.h:137
Definition: BattlegroundEY.h:179
Definition: BattlegroundEY.h:196
Definition: BattlegroundEY.h:166
Definition: BattlegroundEY.h:189
Definition: BattlegroundEY.h:160
DBCPosition3D Pos
Definition: DBCStructure.h:78
Definition: BattlegroundEY.h:100
Definition: BattlegroundEY.h:122
Definition: BattlegroundEY.h:170
Definition: BattlegroundEY.h:159
Definition: BattlegroundEY.h:162
Definition: BattlegroundEY.h:102
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:169
Definition: Battleground.h:128
uint32 m_Points_Trigger[EY_POINTS_MAX]
Definition: BattlegroundEY.h:421
Definition: BattlegroundEY.h:121
Definition: BattlegroundEY.h:195
float X
Definition: DBCEnums.h:34
Definition: BattlegroundEY.h:207
DBCPosition3D Loc
Definition: DBCStructure.h:1438
Definition: BattlegroundEY.h:191
Definition: BattlegroundEY.h:95
Definition: BattlegroundEY.h:164
Definition: BattlegroundEY.h:203
Definition: BattlegroundEY.h:167
Definition: BattlegroundEY.h:204
Definition: BattlegroundEY.h:177
Definition: BattlegroundEY.h:180
Definition: BattlegroundEY.h:199
Definition: BattlegroundEY.h:202
Definition: BattlegroundEY.h:174
Definition: BattlegroundEY.h:99
Definition: BattlegroundEY.h:205
Definition: BattlegroundEY.h:175
Definition: BattlegroundEY.h:163
Definition: BattlegroundEY.h:146
uint32 const Buff_Entries[3]
Definition: Battleground.h:152
Definition: BattlegroundEY.h:171
Definition: BattlegroundEY.h:192
Definition: DBCStructure.h:74
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: BattlegroundEY.h:147
Definition: SharedDefines.h:993
Definition: BattlegroundEY.h:161
Definition: BattlegroundEY.h:178
Definition: BattlegroundEY.h:103
Definition: BattlegroundEY.h:197
Definition: BattlegroundEY.h:176
Definition: BattlegroundEY.h:104

+ Here is the call graph for this function:

void BattlegroundEY::StartingEventCloseDoors ( )
overridevirtual

Reimplemented from Battleground.

133 {
136 
139 }
Definition: Battleground.h:129
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: BattlegroundEY.h:219
Definition: BattlegroundEY.h:160
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundEY.h:159
Definition: Battleground.h:128
Definition: BattlegroundEY.h:161

+ Here is the call graph for this function:

void BattlegroundEY::StartingEventOpenDoors ( )
overridevirtual

Reimplemented from Battleground.

142 {
145 
148  for (uint32 i = 0; i < EY_POINTS_MAX; ++i)
149  {
150  //randomly spawn buff
151  uint8 buff = urand(0, 2);
153  }
154 
155  // Achievement: Flurry
157 }
Definition: Battleground.h:129
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: Battleground.cpp:1905
Definition: BattlegroundEY.h:201
Definition: DBCEnums.h:183
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: BattlegroundEY.h:185
Definition: BattlegroundEY.h:137
Definition: BattlegroundEY.h:160
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundEY.h:159
Definition: Battleground.h:128
Definition: BattlegroundEY.h:207
Definition: BattlegroundEY.h:29
uint8_t uint8
Definition: Define.h:152

+ Here is the call graph for this function:

bool BattlegroundEY::UpdatePlayerScore ( Player player,
uint32  type,
uint32  value,
bool  doAddHonor = true 
)
overridevirtual

Reimplemented from Battleground.

845 {
846  if (!Battleground::UpdatePlayerScore(player, type, value, doAddHonor))
847  return false;
848 
849  switch (type)
850  {
851  case SCORE_FLAG_CAPTURES:
853  break;
854  default:
855  break;
856  }
857  return true;
858 }
Definition: BattlegroundScore.h:35
virtual bool UpdatePlayerScore(Player *player, uint32 type, uint32 value, bool doAddHonor=true)
Definition: Battleground.cpp:1381
const FieldDescriptor value
Definition: descriptor.h:1522
Definition: BattlegroundEY.h:248

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::UpdatePointsCount ( uint32  Team)
protected
347 {
348  if (Team == ALLIANCE)
350  else
352 }
Definition: SharedDefines.h:1000
Team
Definition: SharedDefines.h:997
Definition: BattlegroundEY.h:38
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:39
uint32 m_TeamPointsCount[2]
Definition: BattlegroundEY.h:419
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735
Definition: SharedDefines.h:993

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::UpdatePointsIcons ( uint32  Team,
uint32  Point 
)
protected
355 {
356  //we MUST firstly send 0, after that we can send 1!!!
357  if (m_PointState[Point] == EY_POINT_UNDER_CONTROL)
358  {
359  UpdateWorldState(m_PointsIconStruct[Point].WorldStateControlIndex, 0);
360  if (Team == ALLIANCE)
361  UpdateWorldState(m_PointsIconStruct[Point].WorldStateAllianceControlledIndex, 1);
362  else
363  UpdateWorldState(m_PointsIconStruct[Point].WorldStateHordeControlledIndex, 1);
364  }
365  else
366  {
367  if (Team == ALLIANCE)
368  UpdateWorldState(m_PointsIconStruct[Point].WorldStateAllianceControlledIndex, 0);
369  else
370  UpdateWorldState(m_PointsIconStruct[Point].WorldStateHordeControlledIndex, 0);
371  UpdateWorldState(m_PointsIconStruct[Point].WorldStateControlIndex, 1);
372  }
373 }
Definition: BattlegroundEY.h:243
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
Definition: SharedDefines.h:1000
Team
Definition: SharedDefines.h:997
const BattlegroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX]
Definition: BattlegroundEY.h:304
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::UpdatePointStatuses ( )
private

The original AreaTrigger is covered by a bigger one and not triggered on client side.

251 {
252  for (uint8 point = 0; point < EY_POINTS_MAX; ++point)
253  {
254  if (m_PlayersNearPoint[point].empty())
255  continue;
256  //count new point bar status:
258 
260  //point is fully alliance's
263  //point is fully horde's
265 
266  uint32 pointOwnerTeamId = 0;
267  //find which team should own this point
269  pointOwnerTeamId = HORDE;
271  pointOwnerTeamId = ALLIANCE;
272  else
273  pointOwnerTeamId = EY_POINT_NO_OWNER;
274 
275  for (uint8 i = 0; i < m_PlayersNearPoint[point].size(); ++i)
276  {
278  if (player)
279  {
280  player->SendUpdateWorldState(PROGRESS_BAR_STATUS, m_PointBarStatus[point]);
281  //if point owner changed we must evoke event!
282  if (pointOwnerTeamId != m_PointOwnedByTeam[point])
283  {
284  //point was uncontrolled and player is from team which captured point
285  if (m_PointState[point] == EY_POINT_STATE_UNCONTROLLED && player->GetTeam() == pointOwnerTeamId)
286  this->EventTeamCapturedPoint(player, point);
287 
288  //point was under control and player isn't from team which controlled it
289  if (m_PointState[point] == EY_POINT_UNDER_CONTROL && player->GetTeam() != m_PointOwnedByTeam[point])
290  this->EventTeamLostPoint(player, point);
291  }
292 
294  if (point == FEL_REAVER && m_PointOwnedByTeam[point] == player->GetTeam())
295  if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
296  if (player->GetDistance(2044.0f, 1729.729f, 1190.03f) < 3.0f)
298  }
299  }
300  }
301 }
Definition: BattlegroundEY.h:242
uint8 m_CurrentPointPlayersCount[2 *EY_POINTS_MAX]
Definition: BattlegroundEY.h:434
Definition: BattlegroundEY.h:243
void EventTeamLostPoint(Player *Source, uint32 Point)
Definition: BattlegroundEY.cpp:690
Definition: BattlegroundEY.h:71
uint8 m_PointState[EY_POINTS_MAX]
Definition: BattlegroundEY.h:431
void EventTeamCapturedPoint(Player *Source, uint32 Point)
Definition: BattlegroundEY.cpp:738
GuidVector m_PlayersNearPoint[EY_POINTS_MAX+1]
Definition: BattlegroundEY.h:433
Definition: BattlegroundEY.h:63
void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType)
Definition: BattlegroundEY.cpp:805
Definition: SharedDefines.h:1000
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: BattlegroundEY.h:137
uint8 m_FlagState
Definition: BattlegroundEY.h:426
Definition: BattlegroundEY.h:69
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundEY.h:70
Definition: BattlegroundEY.h:53
Definition: SharedDefines.h:999
int32 m_PointBarStatus[EY_POINTS_MAX]
Definition: BattlegroundEY.h:432
Definition: BattlegroundEY.h:202
uint8_t uint8
Definition: Define.h:152
ObjectGuid GetFlagPickerGUID(int32=-1) const override
Definition: BattlegroundEY.h:368
Definition: BattlegroundEY.h:241
Definition: BattlegroundEY.h:131
uint32 m_PointOwnedByTeam[EY_POINTS_MAX]
Definition: BattlegroundEY.h:430
Definition: BattlegroundEY.h:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundEY::UpdateTeamScore ( uint32  Team)
Todo:
there should be some sound played when one team is near victory!! - and define variables
304 {
305  uint32 score = GetTeamScore(Team);
307  /*if (!m_IsInformedNearVictory && score >= BG_EY_WARNING_NEAR_VICTORY_SCORE)
308  {
309  if (Team == ALLIANCE)
310  SendMessageToAll(LANG_BG_EY_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
311  else
312  SendMessageToAll(LANG_BG_EY_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
313  PlaySoundToAll(BG_EY_SOUND_NEAR_VICTORY);
314  m_IsInformedNearVictory = true;
315  }*/
316 
317  if (score >= BG_EY_MAX_TEAM_SCORE)
318  {
319  score = BG_EY_MAX_TEAM_SCORE;
320  if (Team == TEAM_ALLIANCE)
322  else
324  }
325 
326  if (Team == TEAM_ALLIANCE)
328  else
330 }
void EndBattleground(uint32 winner) override
Definition: BattlegroundEY.cpp:332
Definition: SharedDefines.h:1000
uint32 GetTeamScore(uint32 TeamID) const
Definition: Battleground.cpp:1924
Team
Definition: SharedDefines.h:997
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:992
Definition: BattlegroundEY.h:37
Definition: SharedDefines.h:999
Definition: BattlegroundEY.h:36
void UpdateWorldState(uint32 variable, uint32 value, bool hidden=false)
Definition: Battleground.cpp:735
Definition: BattlegroundEY.h:228

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint8 BattlegroundEY::m_CurrentPointPlayersCount[2 *EY_POINTS_MAX]
private
ObjectGuid BattlegroundEY::m_DroppedFlagGUID
private
uint32 BattlegroundEY::m_FlagCapturedBgObjectType
private
ObjectGuid BattlegroundEY::m_FlagKeeper
private
uint8 BattlegroundEY::m_FlagState
private
int32 BattlegroundEY::m_FlagsTimer
private
uint32 BattlegroundEY::m_HonorScoreTics[2]
private
uint32 BattlegroundEY::m_HonorTics
private
GuidVector BattlegroundEY::m_PlayersNearPoint[EY_POINTS_MAX+1]
private
int32 BattlegroundEY::m_PointAddingTimer
private
int32 BattlegroundEY::m_PointBarStatus[EY_POINTS_MAX]
private
uint32 BattlegroundEY::m_PointOwnedByTeam[EY_POINTS_MAX]
private
uint32 BattlegroundEY::m_Points_Trigger[EY_POINTS_MAX]
private
uint8 BattlegroundEY::m_PointState[EY_POINTS_MAX]
private
uint32 BattlegroundEY::m_TeamPointsCount[2]
private
int32 BattlegroundEY::m_TowerCapCheckTimer
private

The documentation for this class was generated from the following files: