![]() |
TrinityCore
|
#include <Battleground.h>
Inheritance diagram for Battleground:Public Types | |
| typedef std::map< ObjectGuid, BattlegroundPlayer > | BattlegroundPlayerMap |
| typedef std::map< ObjectGuid, BattlegroundScore * > | BattlegroundScoreMap |
Static Public Member Functions | |
| static TeamId | GetTeamIndexByTeamId (Team team) |
Protected Member Functions | |
| void | EndNow () |
| void | PlayerAddedToBGCheckIfBGIsRunning (Player *player) |
| Player * | _GetPlayer (ObjectGuid guid, bool offlineRemove, char const *context) const |
| Player * | _GetPlayer (BattlegroundPlayerMap::iterator itr, char const *context) |
| Player * | _GetPlayer (BattlegroundPlayerMap::const_iterator itr, char const *context) const |
| Player * | _GetPlayerForTeam (Team team, BattlegroundPlayerMap::const_iterator itr, char const *context) const |
| virtual bool | PreUpdateImpl (uint32) |
| Pre-update hook. | |
| virtual void | PostUpdateImpl (uint32) |
| Post-update hook. | |
| void | _ProcessOfflineQueue () |
| void | _ProcessProgress (uint32 diff) |
| void | _ProcessLeave (uint32 diff) |
| void | _ProcessJoin (uint32 diff) |
| void | _CheckSafePositions (uint32 diff) |
| void | _ProcessPlayerPositionBroadcast (uint32 diff) |
| virtual void | RemovePlayer (Player *, ObjectGuid, uint32) |
Private Attributes | |
| uint32 | m_InstanceID |
| BattlegroundStatus | m_Status |
| uint32 | m_ClientInstanceID |
| uint32 | m_StartTime |
| uint32 | m_ResetStatTimer |
| uint32 | m_ValidStartPositionTimer |
| int32 | m_EndTime |
| uint8 | m_ArenaType |
| bool | m_InBGFreeSlotQueue |
| bool | m_SetDeleteThis |
| PvPTeamId | _winnerTeamId |
| int32 | m_StartDelayTime |
| bool | m_IsRated |
| bool | m_PrematureCountDown |
| uint32 | m_LastPlayerPositionBroadcast |
| std::deque< ObjectGuid > | m_OfflineQueue |
| uint32 | m_InvitedAlliance |
| uint32 | m_InvitedHorde |
| Group * | m_BgRaids [PVP_TEAMS_COUNT] |
| uint32 | m_PlayersCount [PVP_TEAMS_COUNT] |
| uint32 | m_ArenaTeamMMR [PVP_TEAMS_COUNT] |
| BattlegroundMap * | m_Map |
| Position | StartPosition [PVP_TEAMS_COUNT] |
| BattlegroundTemplate const * | _battlegroundTemplate |
| PVPDifficultyEntry const * | _pvpDifficultyEntry |
| std::unordered_set< uint32 > const * | _pvpStatIds |
| std::vector< WorldPackets::Battleground::BattlegroundPlayerPosition > | _playerPositions |
| time_t | _preparationStartTime |
| Trinity::unique_weak_ptr< Battleground > | m_weakRef |
Definition at line 258 of file Battleground.h.
| typedef std::map<ObjectGuid, BattlegroundPlayer> Battleground::BattlegroundPlayerMap |
Definition at line 328 of file Battleground.h.
| typedef std::map<ObjectGuid, BattlegroundScore*> Battleground::BattlegroundScoreMap |
Definition at line 332 of file Battleground.h.
| Battleground::Battleground | ( | BattlegroundTemplate const * | battlegroundTemplate | ) |
Definition at line 61 of file Battleground.cpp.
References _battlegroundTemplate, _winnerTeamId, ASSERT, BG_START_DELAY_1M, BG_START_DELAY_2M, BG_START_DELAY_30S, BG_START_DELAY_NONE, BG_STARTING_EVENT_FIRST, BG_STARTING_EVENT_FOURTH, BG_STARTING_EVENT_SECOND, BG_STARTING_EVENT_THIRD, BG_TEXT_BATTLE_HAS_BEGUN, BG_TEXT_START_HALF_MINUTE, BG_TEXT_START_ONE_MINUTE, BG_TEXT_START_TWO_MINUTES, m_ArenaTeamMMR, m_ArenaType, m_BgRaids, m_ClientInstanceID, m_EndTime, m_Events, m_InBGFreeSlotQueue, m_InstanceID, m_InvitedAlliance, m_InvitedHorde, m_IsRated, m_LastPlayerPositionBroadcast, m_Map, m_PlayersCount, m_PrematureCountDown, m_ResetStatTimer, m_SetDeleteThis, m_StartDelayTime, m_StartTime, m_Status, m_TeamScores, m_ValidStartPositionTimer, PVP_TEAM_NEUTRAL, StartDelayTimes, StartMessageIds, STATUS_NONE, TEAM_ALLIANCE, and TEAM_HORDE.
|
default |
|
virtual |
Definition at line 113 of file Battleground.cpp.
References _playerPositions, m_BgRaids, m_Map, PlayerScores, RemoveFromBGFreeSlotQueue(), BattlegroundMap::SetBG(), BattlegroundMap::SetUnload(), and Map::UnloadAll().
|
inlineprotected |
Definition at line 203 of file Battleground.cpp.
References CHECK_PLAYER_POSITION_INVERVAL, ObjectAccessor::FindPlayer(), Position::GetExactDistSq(), GetMapId(), GetPlayers(), Position::GetPosition(), GetStartMaxDist(), GetTeamIndexByTeamId(), GetTeamStartPosition(), WorldSafeLocsEntry::Loc, m_ValidStartPositionTimer, and TC_LOG_DEBUG.
Referenced by Update().
|
inlineprotected |
|
inlineprotected |
|
protected |
Definition at line 477 of file Battleground.cpp.
References ObjectAccessor::FindPlayer(), GetMapId(), m_InstanceID, TC_LOG_ERROR, and ObjectGuid::ToString().
Referenced by _GetPlayerForTeam(), _ProcessProgress(), BroadcastWorker(), EndBattleground(), Arena::EndBattleground(), Arena::RemovePlayerAtLeave(), and SendPacketToAll().
|
protected |
Definition at line 491 of file Battleground.cpp.
References _GetPlayer(), and Player::GetEffectiveTeam().
Referenced by CastSpellOnTeam(), RemoveAuraOnTeam(), RewardHonorToTeam(), RewardReputationToTeam(), and SendPacketToTeam().
|
inlineprotected |
Definition at line 329 of file Battleground.cpp.
References _preparationStartTime, Battleground, BG_STARTING_EVENT_1, BG_STARTING_EVENT_2, BG_STARTING_EVENT_3, BG_STARTING_EVENT_4, BG_STARTING_EVENT_FIRST, BG_STARTING_EVENT_FOURTH, BG_STARTING_EVENT_SECOND, BG_STARTING_EVENT_THIRD, CHAT_MSG_BG_SYSTEM_NEUTRAL, CheckWinConditions(), CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, EndNow(), WorldPackets::Battleground::Engaged, FindBgMap(), ObjectAccessor::FindPlayer(), AuraApplication::GetBase(), BattlegroundMap::GetBattlegroundScript(), GetBgMap(), Aura::GetDuration(), GameTime::GetGameTime(), Map::GetId(), GetMapId(), GetMaxLevel(), GetMinLevel(), GetName(), ObjectAccessor::GetPlayer(), GetPlayers(), Aura::GetSpellInfo(), GetStartDelayTime(), SpellInfo::HasAttribute(), Aura::HasEffectType(), IN_MILLISECONDS, isArena(), Aura::IsPermanent(), AuraApplication::IsPositive(), LANG_BG_STARTED_ANNOUNCE_WORLD, m_BgRaids, m_Events, m_InstanceID, m_ResetStatTimer, ModifyStartDelayTime(), BattlegroundScript::OnPrepareStage1(), BattlegroundScript::OnPrepareStage2(), BattlegroundScript::OnPrepareStage3(), BattlegroundScript::OnStart(), PlaySoundToAll(), Pvp, SendBroadcastText(), SendPacketToAll(), SetStartDelayTime(), SetStatus(), SOUND_BG_START, SPELL_ARENA_PREPARATION, SPELL_ATTR0_NO_IMMUNITIES, SPELL_AURA_MOD_INVISIBILITY, SPELL_PREPARATION, StartBattleground, StartDelayTimes, StartMessageIds, STATUS_IN_PROGRESS, sWorld, and TC_LOG_ERROR.
Referenced by Update().
|
inlineprotected |
Definition at line 455 of file Battleground.cpp.
References GetRemainingTime(), m_Players, RemovePlayerAtLeave(), and SetRemainingTime().
Referenced by Update().
|
inlineprotected |
Definition at line 255 of file Battleground.cpp.
References GameTime::GetGameTime(), m_OfflineQueue, m_Players, and RemovePlayerAtLeave().
Referenced by Update().
|
protected |
Definition at line 233 of file Battleground.cpp.
References _playerPositions, WorldPackets::Battleground::BattlegroundPlayerPositions::FlagCarriers, GetBgMap(), ObjectAccessor::GetPlayer(), m_LastPlayerPositionBroadcast, PLAYER_POSITION_UPDATE_INTERVAL, SendPacketToAll(), and WorldPackets::Battleground::BattlegroundPlayerPositions::Write().
Referenced by Update().
|
inlineprotected |
Definition at line 284 of file Battleground.cpp.
References _GetPlayer(), ALLIANCE, BattlegroundMgr::BuildBattlegroundStatusActive(), EndBattleground(), GetMinPlayersPerTeam(), GetPlayersCountByTeam(), GetPrematureWinner(), HORDE, m_EndTime, m_Players, m_PrematureCountDown, sBattlegroundMgr, SetRemainingTime(), and WorldPackets::Battleground::BattlefieldStatusActive::Write().
Referenced by Update().
Definition at line 1083 of file Battleground.cpp.
References _preparationStartTime, Group::AddMember(), BG_STARTING_EVENT_FIRST, Group::ChangeLeader(), Group::Create(), GetBgRaid(), BaseEntity::GetGUID(), Group::GetMemberGroup(), Player::GetOriginalGroup(), Group::IsMember(), Pvp, Group::SendUpdate(), Player::SetBattlegroundOrBattlefieldRaid(), SetBgRaid(), sGroupMgr, Group::StartCountdown(), and StartDelayTimes.
Referenced by AddPlayer().
|
virtual |
Reimplemented in Arena.
Definition at line 973 of file Battleground.cpp.
References _pvpStatIds, AddOrSetPlayerToCorrectBgGroup(), WorldPackets::Battleground::PVPMatchInitialize::AffectsRating, ALLIANCE, WorldPackets::Battleground::PVPMatchInitialize::ArenaFaction, BattlegroundQueueTypeId::BattlemasterListId, WorldPackets::Battleground::PVPMatchInitialize::BattlemasterListID, BG_START_DELAY_2M, WorldObject::CastSpell(), WorldPackets::Battleground::Complete, Player::DestroyConjuredItems(), WorldPackets::Battleground::PVPMatchInitialize::Duration, WorldPackets::Battleground::Engaged, BattlegroundMap::GetBattlegroundScript(), GetBgMap(), Player::GetBGTeam(), GetElapsedTime(), BaseEntity::GetGUID(), GetMapId(), GetStatus(), GameTime::GetSystemTime(), WorldPackets::Battleground::BattlegroundPlayerJoined::Guid, HORDE, WorldPackets::Battleground::Inactive, Player::isAFK(), isArena(), Player::IsMercenaryForBattlegroundQueueType(), IsPlayerInBattleground(), isRated(), m_Players, WorldPackets::Battleground::PVPMatchInitialize::MapID, BattlegroundPlayer::Mercenary, BattlegroundPlayer::OfflineRemoveTime, BattlegroundScript::OnPlayerJoined(), PLAYER_FLAGS_EX_MERCENARY_MODE, PlayerAddedToBGCheckIfBGIsRunning(), PlayerScores, PVP_TEAM_ALLIANCE, PVP_TEAM_HORDE, BattlegroundPlayer::queueTypeId, WorldPackets::Battleground::PVPMatchInitialize::Registered, Player::RemoveArenaEnchantments(), Unit::RemoveAurasByType(), Player::ResetAllPowers(), Player::SendDirectMessage(), SendPacketToTeam(), Player::SetPlayerFlagEx(), SPELL_ARENA_PREPARATION, SPELL_AURA_MOUNTED, SPELL_MERCENARY_ALLIANCE_1, SPELL_MERCENARY_ALLIANCE_REACTIONS, SPELL_MERCENARY_HORDE_1, SPELL_MERCENARY_HORDE_REACTIONS, SPELL_MERCENARY_SHAPESHIFT, SPELL_PREPARATION, WorldPackets::Battleground::PVPMatchInitialize::StartTime, WorldPackets::Battleground::StartUp, WorldPackets::Battleground::PVPMatchInitialize::State, STATUS_IN_PROGRESS, STATUS_NONE, STATUS_WAIT_JOIN, STATUS_WAIT_LEAVE, STATUS_WAIT_QUEUE, BattlegroundPlayer::Team, TEMP_ENCHANTMENT_SLOT, Player::ToggleAFK(), Player::UnsummonPetTemporaryIfAny(), UpdatePlayersCountByTeam(), WorldPackets::Battleground::BattlegroundPlayerJoined::Write(), and WorldPackets::Battleground::PVPMatchInitialize::Write().
Referenced by Arena::AddPlayer(), and Player::LoadFromDB().
| void Battleground::AddPlayerPosition | ( | WorldPackets::Battleground::BattlegroundPlayerPosition const & | position | ) |
Definition at line 1336 of file Battleground.cpp.
References _playerPositions.
Referenced by AuraEffect::HandleBattlegroundPlayerPosition().
Definition at line 453 of file Battleground.h.
Referenced by battleground_eye_of_the_storm::AddPoint(), battleground_seething_shore::HandleAssaultPoint(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_silvershard_mines::OnMineCartCaptured(), battleground_deephaul_ravine::OnStart(), battleground_silvershard_mines::OnStart(), battleground_arathi_basin::OnUpdate(), and battleground_battle_for_gilneas::OnUpdate().
| void Battleground::AddToBGFreeSlotQueue | ( | ) |
Definition at line 1161 of file Battleground.cpp.
References isBattleground(), m_InBGFreeSlotQueue, and sBattlegroundMgr.
Referenced by RemovePlayerAtLeave(), and StartBattleground().
| void Battleground::BlockMovement | ( | Player * | player | ) |
Definition at line 797 of file Battleground.cpp.
References Player::SetClientControl().
Referenced by EndBattleground(), and PlayerAddedToBGCheckIfBGIsRunning().
| void Battleground::BroadcastWorker | ( | Do & | _do | ) |
Definition at line 54 of file Battleground.cpp.
References _GetPlayer(), and m_Players.
Referenced by SendBroadcastText(), and SendMessageToAll().
|
virtual |
Reimplemented in Arena.
Definition at line 1262 of file Battleground.cpp.
References ALLIANCE, AsUnderlyingType(), WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::Class, GetBgMap(), ObjectAccessor::GetPlayer(), GetPlayerScoresSize(), GetPlayersCountByTeam(), WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::HonorLevel, HORDE, WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::IsInWorld, WorldPackets::Battleground::PVPMatchStatistics::PlayerCount, PlayerScores, WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::PrimaryTalentTree, PVP_TEAM_ALLIANCE, PVP_TEAM_HORDE, WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::Race, WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics::Sex, and WorldPackets::Battleground::PVPMatchStatistics::Statistics.
Referenced by Arena::BuildPvPLogDataPacket(), EndBattleground(), WorldSession::HandlePVPLogDataOpcode(), and PlayerAddedToBGCheckIfBGIsRunning().
|
inline |
Definition at line 432 of file Battleground.h.
References BG_AWARD_ARENA_POINTS_MIN_LEVEL.
Definition at line 567 of file Battleground.cpp.
References _GetPlayerForTeam(), and m_Players.
Referenced by battleground_strand_of_the_ancients::EndRound(), battleground_alterac_valley::OnUnitKilled(), battleground_alterac_valley::OnUpdate(), and battleground_strand_of_the_ancients::OnUpdate().
|
inlinevirtual |
Reimplemented in Arena.
Definition at line 397 of file Battleground.h.
Referenced by _ProcessJoin().
|
inline |
Definition at line 317 of file Battleground.h.
References ALLIANCE.
Referenced by RemovePlayerAtLeave().
|
virtual |
Reimplemented in Arena.
Definition at line 615 of file Battleground.cpp.
References _GetPlayer(), ALLIANCE, BG_START_DELAY_2M, BG_TEXT_ALLIANCE_WINS, BG_TEXT_HORDE_WINS, BGCompletion, BlockMovement(), BuildPvPLogDataPacket(), CHAR_INS_PVPSTATS_BATTLEGROUND, CHAR_INS_PVPSTATS_PLAYER, CHAR_SEL_PVPSTATS_MAXID, CharacterDatabase, CHAT_MSG_BG_SYSTEM_NEUTRAL, Unit::CombatStop(), Unit::CombatStopWithPets(), CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, CONFIG_BG_REWARD_WINNER_HONOR_FIRST, CONFIG_BG_REWARD_WINNER_HONOR_LAST, WorldPackets::Battleground::PVPMatchComplete::Duration, GetBattlegroundPlayerData(), BattlegroundMap::GetBattlegroundScript(), GetBgMap(), Player::GetBGTeam(), GetBonusHonorFromKill(), ObjectGuid::GetCounter(), GetElapsedTime(), BaseEntity::GetGUID(), WorldLocation::GetMapId(), Player::GetRandomWinner(), WorldPackets::Packet::GetRawPacket(), GetTypeID(), Field::GetUInt64(), GetUniqueBracketId(), GetWinner(), Unit::HasAuraType(), HolidayBGCompletion, HORDE, Unit::IsAlive(), isBattleground(), BattlegroundMgr::IsBGWeekend(), BattlegroundMgr::IsRandomBattleground(), WorldPackets::Battleground::PVPMatchComplete::LogData, m_Players, BattlegroundScript::OnEnd(), ParticipateInBattleground, PlayerScores, PlaySoundToAll(), PVP_TEAM_ALLIANCE, PVP_TEAM_HORDE, PVP_TEAM_NEUTRAL, RandomBGCompletion, Unit::RemoveAura(), Unit::RemoveAurasByType(), RemoveFromBGFreeSlotQueue(), Player::ResetAllPowers(), Player::ResurrectPlayer(), SCORE_BONUS_HONOR, SendBroadcastText(), Player::SendDirectMessage(), PreparedStatementBase::setBool(), Player::SetRandomWinner(), SetRemainingTime(), SetStatus(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), SetWinner(), sGuildMgr, SOUND_ALLIANCE_WINS, SOUND_HORDE_WINS, Player::SpawnCorpseBones(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_SPIRIT_OF_REDEMPTION, SPELL_HONORABLE_DEFENDER_25Y, SPELL_HONORABLE_DEFENDER_60Y, STATUS_WAIT_LEAVE, sWorld, TIME_AUTOCLOSE_BATTLEGROUND, Player::UpdateCriteria(), UpdatePlayerScore(), WinBattleground, WorldPackets::Battleground::PVPMatchComplete::Winner, and WorldPackets::Battleground::PVPMatchComplete::Write().
Referenced by _ProcessProgress(), battleground_silvershard_mines::CheckWinner(), battleground_temple_of_kotmogu::CheckWinner(), Arena::EndBattleground(), EventPlayerLoggedOut(), battleground_seething_shore::HandleAssaultPoint(), bg_commandscript::HandleBgStopCommand(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_isle_of_conquest::OnPlayerKilled(), battleground_isle_of_conquest::OnUnitKilled(), battleground_alterac_valley::OnUnitKilled(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), battleground_strand_of_the_ancients::OnUpdate(), battleground_twin_peaks::OnUpdate(), battleground_warsong_gulch::OnUpdate(), battleground_strand_of_the_ancients::TitanRelicActivated(), Update(), battleground_alterac_valley::UpdateScore(), and battleground_eye_of_the_storm::UpdateTeamScore().
|
protected |
Definition at line 1347 of file Battleground.cpp.
References RemoveFromBGFreeSlotQueue(), SetRemainingTime(), SetStatus(), and STATUS_WAIT_LEAVE.
Referenced by _ProcessJoin().
| void Battleground::EventPlayerLoggedIn | ( | Player * | player | ) |
Definition at line 1120 of file Battleground.cpp.
References BaseEntity::GetGUID(), m_OfflineQueue, m_Players, and PlayerAddedToBGCheckIfBGIsRunning().
Referenced by Player::LoadFromDB().
| void Battleground::EventPlayerLoggedOut | ( | Player * | player | ) |
Definition at line 1139 of file Battleground.cpp.
References EndBattleground(), GetAlivePlayersCountByTeam(), Player::GetBGTeam(), GameTime::GetGameTime(), BaseEntity::GetGUID(), GetOtherTeam(), GetPlayersCountByTeam(), GetPlayerTeam(), GetStatus(), Unit::IsAlive(), isArena(), IsPlayerInBattleground(), m_OfflineQueue, m_Players, MAX_OFFLINE_TIME, RemovePlayer(), and STATUS_IN_PROGRESS.
|
inline |
Definition at line 346 of file Battleground.h.
Referenced by _ProcessJoin().
Definition at line 1442 of file Battleground.cpp.
References ObjectAccessor::FindPlayer(), Unit::IsAlive(), and m_Players.
Referenced by Arena::CheckWinConditions(), Arena::EndBattleground(), EventPlayerLoggedOut(), and Arena::UpdateArenaWorldState().
Definition at line 401 of file Battleground.h.
Referenced by Arena::EndBattleground(), and Arena::RemovePlayerAtLeave().
|
inline |
Definition at line 292 of file Battleground.h.
Referenced by Arena::EndBattleground(), GetMaxPlayersPerTeam(), and CriteriaHandler::ModifierSatisfied().
|
inline |
Definition at line 444 of file Battleground.h.
Referenced by EndBattleground(), WorldSession::HandleRequestBattlefieldStatusOpcode(), and Player::LoadFromDB().
| BattlegroundScore const * Battleground::GetBattlegroundScore | ( | Player * | player | ) | const |
Definition at line 1287 of file Battleground.cpp.
References BaseEntity::GetGUID(), Trinity::Containers::MapGetValuePtr(), and PlayerScores.
Referenced by battleground_silvershard_mines::OnPlayerCapturedMineCart().
| BattlegroundMap * Battleground::GetBgMap | ( | ) | const |
Definition at line 505 of file Battleground.cpp.
Referenced by _ProcessJoin(), _ProcessPlayerPositionBroadcast(), AddPlayer(), BuildPvPLogDataPacket(), EndBattleground(), Arena::EndBattleground(), HandleKillPlayer(), HandleKillUnit(), Player::LoadFromDB(), and UpdateWorldState().
| GameObject * Battleground::GetBGObject | ( | uint32 | type, |
| bool | logError = true |
||
| ) |
Definition at line 376 of file Battleground.h.
References ALLIANCE, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by AddOrSetPlayerToCorrectBgGroup(), RemovePlayerAtLeave(), and Group::~Group().
Definition at line 790 of file Battleground.cpp.
References GetMaxLevel(), and Trinity::Honor::hk_honor_at_level().
Referenced by battleground_eye_of_the_storm::AddPoint(), EndBattleground(), battleground_alterac_valley::EventPlayerDestroyedPoint(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_alterac_valley::OnEnd(), battleground_arathi_basin::OnEnd(), battleground_eye_of_the_storm::OnEnd(), battleground_strand_of_the_ancients::OnEnd(), battleground_warsong_gulch::OnEnd(), battleground_alterac_valley::OnUnitKilled(), battleground_arathi_basin::OnUpdate(), and battleground_strand_of_the_ancients::ProcessEvent().
| BattlegroundBracketId Battleground::GetBracketId | ( | ) | const |
Definition at line 1500 of file Battleground.cpp.
References _pvpDifficultyEntry, and PVPDifficultyEntry::GetBracketId().
Referenced by BattlegroundQueue::BattlegroundQueueUpdate(), BGQueueRemoveEvent::Execute(), BattlegroundQueue::InviteGroupToBG(), RemovePlayerAtLeave(), and BattlegroundMgr::Update().
|
inline |
Definition at line 278 of file Battleground.h.
Referenced by BattlegroundMgr::Update().
|
inline |
Definition at line 279 of file Battleground.h.
Referenced by AddPlayer(), BattlegroundMgr::BuildBattlegroundStatusActive(), EndBattleground(), battleground_twin_peaks::OnUpdate(), battleground_warsong_gulch::OnUpdate(), and Update().
|
inlinevirtual |
Definition at line 411 of file Battleground.h.
Referenced by TeleportPlayerToExploitLocation().
Definition at line 1182 of file Battleground.cpp.
References ALLIANCE, BG_QUEUE_INVITATION_TYPE_NO_BALANCE, CONFIG_BATTLEGROUND_INVITATION_TYPE, GetInvitedCount(), GetMaxPlayersPerTeam(), GetMinPlayersPerTeam(), GetPlayersCountByTeam(), GetStatus(), HORDE, STATUS_IN_PROGRESS, STATUS_WAIT_JOIN, and sWorld.
Referenced by BattlegroundQueue::FillPlayersToBG().
|
inline |
Definition at line 280 of file Battleground.h.
References BG_STARTING_EVENT_4, and BG_STARTING_EVENT_FIRST.
|
inline |
Definition at line 276 of file Battleground.h.
Referenced by BattlegroundMgr::AddBattleground(), ArenaScript::CreateCreature(), ArenaScript::CreateObject(), WorldSession::HandleBattleFieldPortOpcode(), BattlegroundQueue::InviteGroupToBG(), Player::LoadFromDB(), and BattlegroundMgr::RemoveFromBGFreeSlotQueue().
Definition at line 320 of file Battleground.h.
References ALLIANCE.
Referenced by GetFreeSlotsForTeam(), and Update().
| uint32 Battleground::GetMapId | ( | ) | const |
Definition at line 1312 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::MapIDs.
Referenced by _CheckSafePositions(), _GetPlayer(), _ProcessJoin(), AddPlayer(), BattlegroundMgr::AddToBGFreeSlotQueue(), BattlegroundMgr::BuildBattlegroundStatusActive(), BattlegroundMgr::BuildBattlegroundStatusNeedConfirmation(), Arena::EndBattleground(), WorldSession::HandleBattleFieldPortOpcode(), RemoveFromBGFreeSlotQueue(), Reset(), and BattlegroundMgr::SendToBattleground().
| uint32 Battleground::GetMaxLevel | ( | ) | const |
Definition at line 1528 of file Battleground.cpp.
References _battlegroundTemplate, _pvpDifficultyEntry, BattlegroundTemplate::GetMaxLevel(), and PVPDifficultyEntry::MaxLevel.
Referenced by _ProcessJoin(), GetBonusHonorFromKill(), and WorldSession::HandleBattleFieldPortOpcode().
| uint32 Battleground::GetMaxPlayers | ( | ) | const |
Definition at line 1510 of file Battleground.cpp.
References GetMaxPlayersPerTeam().
Referenced by HasFreeSlots().
| uint32 Battleground::GetMaxPlayersPerTeam | ( | ) | const |
Definition at line 1536 of file Battleground.cpp.
References _battlegroundTemplate, ARENA_TYPE_2v2, ARENA_TYPE_3v3, ARENA_TYPE_5v5, GetArenaType(), BattlegroundTemplate::GetMaxPlayersPerTeam(), and isArena().
Referenced by GetFreeSlotsForTeam(), and GetMaxPlayers().
| uint32 Battleground::GetMinLevel | ( | ) | const |
Definition at line 1520 of file Battleground.cpp.
References _battlegroundTemplate, _pvpDifficultyEntry, BattlegroundTemplate::GetMinLevel(), and PVPDifficultyEntry::MinLevel.
Referenced by _ProcessJoin(), and GetUniqueBracketId().
| uint32 Battleground::GetMinPlayers | ( | ) | const |
Definition at line 1515 of file Battleground.cpp.
References GetMinPlayersPerTeam().
| uint32 Battleground::GetMinPlayersPerTeam | ( | ) | const |
Definition at line 1556 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::GetMinPlayersPerTeam().
Referenced by _ProcessProgress(), GetFreeSlotsForTeam(), GetMinPlayers(), GetPrematureWinner(), and BattlegroundScript::GetPrematureWinner().
| char const * Battleground::GetName | ( | ) | const |
Definition at line 1490 of file Battleground.cpp.
References _battlegroundTemplate, BattlegroundTemplate::BattlemasterEntry, BattlemasterListEntry::Name, and sWorld.
Referenced by _ProcessJoin().
|
inline |
Definition at line 329 of file Battleground.h.
Referenced by _CheckSafePositions(), _ProcessJoin(), Arena::EndBattleground(), arena_dalaran_sewers::OnStart(), battleground_strand_of_the_ancients::OnUpdate(), battleground_strand_of_the_ancients::StartShips(), battleground_strand_of_the_ancients::TeleportPlayers(), battleground_strand_of_the_ancients::TitanRelicActivated(), arena_ring_of_valor::TogglePillarCollision(), and BattlegroundScript::TriggerGameEvent().
|
inline |
Definition at line 333 of file Battleground.h.
Referenced by BuildPvPLogDataPacket().
Definition at line 387 of file Battleground.h.
Referenced by _ProcessProgress(), BuildPvPLogDataPacket(), Arena::CheckWinConditions(), EventPlayerLoggedOut(), GetFreeSlotsForTeam(), GetPrematureWinner(), and BattlegroundScript::GetPrematureWinner().
|
inline |
Definition at line 330 of file Battleground.h.
Referenced by HasFreeSlots(), and Update().
| Team Battleground::GetPlayerTeam | ( | ObjectGuid | guid | ) | const |
Definition at line 1406 of file Battleground.cpp.
References m_Players, and TEAM_OTHER.
Referenced by battleground_deephaul_ravine::CanCaptureFlag(), battleground_eye_of_the_storm::CanCaptureFlag(), battleground_twin_peaks::CanCaptureFlag(), battleground_warsong_gulch::CanCaptureFlag(), battleground_alterac_valley::DoAction(), battleground_alterac_valley::EventPlayerAssaultsPoint(), battleground_alterac_valley::EventPlayerDefendsPoint(), EventPlayerLoggedOut(), battleground_seething_shore::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleAssaultPoint(), battleground_strand_of_the_ancients::HandleCaptureGraveyardAction(), battleground_battle_for_gilneas::HandleDefendPoint(), battleground_twin_peaks::HandleFlagRoomCapturePoint(), battleground_warsong_gulch::HandleFlagRoomCapturePoint(), HandleKillPlayer(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_eye_of_the_storm::OnFlagStateChange(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_isle_of_conquest::OnPlayerDefendNode(), battleground_isle_of_conquest::OnPlayerInteractWithBanner(), battleground_isle_of_conquest::OnPlayerKilled(), battleground_alterac_valley::OnPlayerKilled(), battleground_alterac_valley::OnUnitKilled(), RemovePlayerAtLeave(), battleground_strand_of_the_ancients::TeleportToEntrancePosition(), and battleground_strand_of_the_ancients::TitanRelicActivated().
| Team Battleground::GetPrematureWinner | ( | ) |
Definition at line 273 of file Battleground.cpp.
References ALLIANCE, GetMinPlayersPerTeam(), GetPlayersCountByTeam(), HORDE, and TEAM_OTHER.
Referenced by _ProcessProgress().
|
inline |
Definition at line 308 of file Battleground.h.
|
inline |
Definition at line 281 of file Battleground.h.
Referenced by _ProcessLeave(), and BattlegroundMgr::BuildBattlegroundStatusActive().
| uint32 Battleground::GetScriptId | ( | ) | const |
Definition at line 785 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::ScriptId.
|
inline |
Definition at line 291 of file Battleground.h.
Referenced by _ProcessJoin().
| float Battleground::GetStartMaxDist | ( | ) | const |
Definition at line 517 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::MaxStartDistSq.
Referenced by _CheckSafePositions().
|
inline |
Definition at line 277 of file Battleground.h.
Referenced by AddPlayer(), BattlegroundQueue::BattlegroundQueueUpdate(), battleground_twin_peaks::CanCaptureFlag(), battleground_warsong_gulch::CanCaptureFlag(), SpellInfo::CheckLocation(), battleground_silvershard_mines::CheckWinner(), EventPlayerLoggedOut(), BGQueueRemoveEvent::Execute(), GetFreeSlotsForTeam(), Arena::HandleKillPlayer(), WorldSession::HandleTraitsCommitConfig(), Player::LeaveBattleground(), Player::LoadFromDB(), battleground_silvershard_mines::OnCreatureCreate(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_silvershard_mines::OnMineCartCaptured(), battleground_isle_of_conquest::OnPlayerKilled(), battleground_isle_of_conquest::OnUnitKilled(), battleground_alterac_valley::OnUpdate(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), arena_dalaran_sewers::OnUpdate(), battleground_eye_of_the_storm::OnUpdate(), battleground_isle_of_conquest::OnUpdate(), arena_ring_of_valor::OnUpdate(), battleground_strand_of_the_ancients::OnUpdate(), battleground_twin_peaks::OnUpdate(), battleground_warsong_gulch::OnUpdate(), PlayerAddedToBGCheckIfBGIsRunning(), Arena::RemovePlayer(), RemovePlayerAtLeave(), Arena::RemovePlayerAtLeave(), Player::ReportedAfkBy(), and Update().
Definition at line 386 of file Battleground.h.
References ALLIANCE, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by _CheckSafePositions(), battleground_eye_of_the_storm::AddPoint(), battleground_deephaul_ravine::CanCaptureFlag(), battleground_twin_peaks::CanCaptureFlag(), battleground_warsong_gulch::CanCaptureFlag(), battleground_alterac_valley::DoAction(), battleground_alterac_valley::GetPrematureWinner(), battleground_strand_of_the_ancients::HandleCaptureGraveyardAction(), battleground_twin_peaks::HandleFlagRoomCapturePoint(), battleground_warsong_gulch::HandleFlagRoomCapturePoint(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_isle_of_conquest::OnPlayerDefendNode(), battleground_isle_of_conquest::OnPlayerInteractWithBanner(), battleground_isle_of_conquest::OnPlayerKilled(), transport_seething_shore::OnRemovePassenger(), BattlegroundMgr::SendToBattleground(), battleground_strand_of_the_ancients::TeleportToEntrancePosition(), battleground_strand_of_the_ancients::TitanRelicActivated(), and battleground_alterac_valley::UpdateScore().
Definition at line 1481 of file Battleground.cpp.
References GetTypeID(), m_TeamScores, TC_LOG_ERROR, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by battleground_silvershard_mines::CheckWinner(), battleground_temple_of_kotmogu::CheckWinner(), battleground_eye_of_the_storm::GetPrematureWinner(), battleground_twin_peaks::GetPrematureWinner(), battleground_warsong_gulch::GetPrematureWinner(), battleground_seething_shore::HandleAssaultPoint(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), spell_bg_temple_of_kotmogu_victory_points_periodic< Points >::OnHit(), battleground_silvershard_mines::OnMineCartCaptured(), battleground_deephaul_ravine::OnStart(), battleground_silvershard_mines::OnStart(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), battleground_twin_peaks::OnUpdate(), battleground_warsong_gulch::OnUpdate(), battleground_silvershard_mines::SendTeamScores(), battleground_eye_of_the_storm::UpdateTeamScore(), battleground_twin_peaks::UpdateTeamScore(), and battleground_warsong_gulch::UpdateTeamScore().
| WorldSafeLocsEntry const * Battleground::GetTeamStartPosition | ( | TeamId | teamId | ) | const |
Definition at line 511 of file Battleground.cpp.
References _battlegroundTemplate, ASSERT, BattlegroundTemplate::StartLocation, and TEAM_NEUTRAL.
Referenced by _CheckSafePositions(), and BattlegroundMgr::SendToBattleground().
| BattlegroundTypeId Battleground::GetTypeID | ( | ) | const |
Definition at line 1495 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::Id.
Referenced by BattlegroundMgr::AddBattleground(), battleground_arathi_basin::battleground_arathi_basin(), battleground_eye_of_the_storm::battleground_eye_of_the_storm(), EndBattleground(), GetTeamScore(), WorldSession::HandleBattleFieldPortOpcode(), battleground_warsong_gulch::OnCaptureFlag(), and BattlegroundMgr::SendToBattleground().
| uint8 Battleground::GetUniqueBracketId | ( | ) | const |
Definition at line 1505 of file Battleground.cpp.
References GetMinLevel().
Referenced by EndBattleground().
|
inline |
Definition at line 457 of file Battleground.h.
|
inline |
Definition at line 293 of file Battleground.h.
Referenced by EndBattleground().
Reimplemented in Arena.
Definition at line 1354 of file Battleground.cpp.
References ObjectAccessor::FindPlayer(), GetBgMap(), BaseEntity::GetGUID(), GetPlayerTeam(), isArena(), Player::IsAtGroupRewardDistance(), KillPlayer, m_Players, RewardXPAtKill(), SCORE_DEATHS, SCORE_HONORABLE_KILLS, SCORE_KILLING_BLOWS, Unit::SetUnitFlag(), UNIT_FLAG_SKINNABLE, Player::UpdateCriteria(), and UpdatePlayerScore().
Referenced by Arena::HandleKillPlayer().
Definition at line 1398 of file Battleground.cpp.
References GetBgMap().
|
inlinevirtual |
Definition at line 421 of file Battleground.h.
Referenced by WorldSession::HandleMovementOpcode().
| bool Battleground::HasFreeSlots | ( | ) | const |
Definition at line 1257 of file Battleground.cpp.
References GetMaxPlayers(), and GetPlayersSize().
Referenced by BattlegroundQueue::BattlegroundQueueUpdate().
|
inline |
Definition at line 318 of file Battleground.h.
References ALLIANCE.
Referenced by BattlegroundQueue::InviteGroupToBG().
| bool Battleground::isArena | ( | ) | const |
Definition at line 1247 of file Battleground.cpp.
References _battlegroundTemplate, and BattlegroundTemplate::IsArena().
Referenced by _ProcessJoin(), AddPlayer(), EventPlayerLoggedOut(), GetMaxPlayersPerTeam(), HandleKillPlayer(), WorldSession::HandlePVPLogDataOpcode(), Player::InArena(), isBattleground(), CriteriaHandler::ModifierSatisfied(), RemovePlayerAtLeave(), and Update().
| bool Battleground::isBattleground | ( | ) | const |
Definition at line 1252 of file Battleground.cpp.
References isArena().
Referenced by AddToBGFreeSlotQueue(), EndBattleground(), BGQueueRemoveEvent::Execute(), Player::LeaveBattleground(), CriteriaHandler::ModifierSatisfied(), RemovePlayerAtLeave(), and UpdatePlayerScore().
| bool Battleground::IsPlayerInBattleground | ( | ObjectGuid | guid | ) | const |
Definition at line 1414 of file Battleground.cpp.
References m_Players.
Referenced by AddPlayer(), EventPlayerLoggedOut(), and Player::LoadFromDB().
| bool Battleground::IsPlayerMercenaryInBattleground | ( | ObjectGuid | guid | ) | const |
Definition at line 1422 of file Battleground.cpp.
References m_Players.
Referenced by Player::LoadFromDB().
|
inline |
Definition at line 326 of file Battleground.h.
Referenced by AddPlayer(), BattlegroundQueue::BattlegroundQueueUpdate(), Arena::BuildPvPLogDataPacket(), Arena::EndBattleground(), CriteriaHandler::ModifierSatisfied(), and Arena::RemovePlayerAtLeave().
|
inline |
Definition at line 310 of file Battleground.h.
Referenced by _ProcessJoin().
|
delete |
|
protected |
Definition at line 1430 of file Battleground.cpp.
References BlockMovement(), BuildPvPLogDataPacket(), WorldPackets::Battleground::PVPMatchStatisticsMessage::Data, GetStatus(), Player::SendDirectMessage(), STATUS_WAIT_LEAVE, and WorldPackets::Battleground::PVPMatchStatisticsMessage::Write().
Referenced by AddPlayer(), and EventPlayerLoggedIn().
| void Battleground::PlaySoundToAll | ( | uint32 | SoundID | ) |
Definition at line 557 of file Battleground.cpp.
References ObjectGuid::Empty, and SendPacketToAll().
Referenced by _ProcessJoin(), EndBattleground(), battleground_seething_shore::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleCapturePoint(), battleground_battle_for_gilneas::HandleDefendPoint(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_eye_of_the_storm::OnFlagStateChange(), battleground_deephaul_ravine::OnFlagStateChange(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_temple_of_kotmogu::OnFlagTaken(), battleground_arathi_basin::OnUpdate(), battleground_arathi_basin::ProcessEvent(), battleground_strand_of_the_ancients::ProcessEvent(), and battleground_alterac_valley::UpdateScore().
Definition at line 562 of file Battleground.cpp.
References ObjectGuid::Empty, and SendPacketToTeam().
|
inlineprotectedvirtual |
Post-update hook.
Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.
| diff | a time difference between two worldserver update loops in milliseconds. |
Definition at line 498 of file Battleground.h.
Referenced by Update().
|
inlineprotectedvirtual |
Pre-update hook.
Will be called before battleground update is started. Depending on the result of this call actual update body may be skipped.
| diff | a time difference between two worldserver update loops in milliseconds. |
true if update must be performed, false otherwise.Definition at line 485 of file Battleground.h.
Referenced by Update().
Definition at line 574 of file Battleground.cpp.
References _GetPlayerForTeam(), and m_Players.
Referenced by battleground_strand_of_the_ancients::EndRound().
| void Battleground::RemoveFromBGFreeSlotQueue | ( | ) |
Definition at line 1171 of file Battleground.cpp.
References GetMapId(), m_InBGFreeSlotQueue, m_InstanceID, and sBattlegroundMgr.
Referenced by BattlegroundQueue::BattlegroundQueueUpdate(), EndBattleground(), EndNow(), and ~Battleground().
|
inline |
Definition at line 315 of file Battleground.h.
|
inlineprotectedvirtual |
Reimplemented in Arena.
Definition at line 510 of file Battleground.h.
Referenced by EventPlayerLoggedOut(), and RemovePlayerAtLeave().
|
virtual |
Reimplemented in Arena.
Definition at line 803 of file Battleground.cpp.
References AddToBGFreeSlotQueue(), Unit::AtEndOfEncounter(), Battleground, BATTLEGROUND_QUEUE_NONE, BATTLEGROUND_TYPE_NONE, BattlegroundMgr::BuildBattlegroundStatusNone(), Player::ClearAfkReports(), DecreaseInvitedCount(), Player::FailCriteria(), ObjectAccessor::FindPlayer(), Player::GetBattlegroundQueueIndex(), Player::GetBattlegroundQueueJoinTime(), GetBgRaid(), GetBracketId(), WorldObject::GetName(), GetPlayerTeam(), GetStatus(), WorldPackets::Battleground::BattlegroundPlayerLeft::Guid, Unit::HasAuraType(), Unit::IsAlive(), isArena(), isBattleground(), LeaveArenaOrBattleground, LeaveBattleground, m_Players, Player::OfflineResurrect(), PET_SAVE_NOT_IN_SLOT, PLAYER_FLAGS_EX_MERCENARY_MODE, PlayerScores, Unit::RemoveAura(), Unit::RemoveAurasByType(), Unit::RemoveAurasWithInterruptFlags(), Player::RemoveBattlegroundQueueId(), Player::RemovePet(), RemovePlayer(), Player::RemovePlayerFlagEx(), Player::ResummonPetTemporaryUnSummonedIfAny(), Player::ResurrectPlayer(), sBattlegroundMgr, Player::SendDirectMessage(), SendPacketToTeam(), Player::SetBattlegroundId(), SetBgRaid(), Player::SetBGTeam(), Player::SpawnCorpseBones(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_MOUNTED, SPELL_AURA_SPIRIT_OF_REDEMPTION, SPELL_MERCENARY_ALLIANCE_1, SPELL_MERCENARY_ALLIANCE_REACTIONS, SPELL_MERCENARY_HORDE_1, SPELL_MERCENARY_HORDE_REACTIONS, SPELL_MERCENARY_SHAPESHIFT, STATUS_WAIT_LEAVE, TC_LOG_DEBUG, TEAM_OTHER, Player::TeleportToBGEntryPoint(), UpdatePlayersCountByTeam(), WorldPackets::Battleground::BattlefieldStatusNone::Write(), and WorldPackets::Battleground::BattlegroundPlayerLeft::Write().
Referenced by _ProcessLeave(), _ProcessOfflineQueue(), Player::LeaveBattleground(), Player::LoadFromDB(), and Arena::RemovePlayerAtLeave().
| void Battleground::RemovePlayerPosition | ( | ObjectGuid | guid | ) |
Definition at line 1341 of file Battleground.cpp.
References _playerPositions, and WorldPackets::Battleground::BattlegroundPlayerPosition::Guid.
Referenced by AuraEffect::HandleBattlegroundPlayerPosition().
Definition at line 455 of file Battleground.h.
| void Battleground::Reset | ( | ) |
Definition at line 927 of file Battleground.cpp.
References _playerPositions, GetMapId(), m_Events, m_InBGFreeSlotQueue, m_InstanceID, m_InvitedAlliance, m_InvitedHorde, m_Players, PlayerScores, PVP_TEAM_NEUTRAL, SetElapsedTime(), SetRemainingTime(), SetStatus(), SetWinner(), STATUS_WAIT_QUEUE, and TC_LOG_ERROR.
Referenced by BattlegroundMgr::CreateNewBattleground().
Definition at line 581 of file Battleground.cpp.
References _GetPlayerForTeam(), Honor, m_Players, SCORE_BONUS_HONOR, TeamContribution, and UpdatePlayerScore().
Referenced by battleground_eye_of_the_storm::AddPoint(), battleground_alterac_valley::EventPlayerDestroyedPoint(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_alterac_valley::OnEnd(), battleground_arathi_basin::OnEnd(), battleground_eye_of_the_storm::OnEnd(), battleground_strand_of_the_ancients::OnEnd(), battleground_warsong_gulch::OnEnd(), battleground_isle_of_conquest::OnUnitKilled(), battleground_alterac_valley::OnUnitKilled(), battleground_arathi_basin::OnUpdate(), and battleground_isle_of_conquest::OnUpdate().
Definition at line 588 of file Battleground.cpp.
References _GetPlayerForTeam(), AddPct(), Player::GetReputationMgr(), Unit::GetTotalAuraModifier(), Unit::GetTotalAuraModifierByMiscValue(), Player::HasPlayerFlagEx(), m_Players, ReputationMgr::ModifyReputation(), PLAYER_FLAGS_EX_MERCENARY_MODE, sFactionStore, SPELL_AURA_MOD_FACTION_REPUTATION_GAIN, and SPELL_AURA_MOD_REPUTATION_GAIN.
Referenced by battleground_alterac_valley::DoAction(), battleground_alterac_valley::EventPlayerDestroyedPoint(), battleground_warsong_gulch::OnCaptureFlag(), battleground_alterac_valley::OnEnd(), battleground_alterac_valley::OnUnitKilled(), and battleground_arathi_basin::OnUpdate().
Definition at line 1472 of file Battleground.cpp.
References CONFIG_BG_XP_FOR_KILL, KillRewarder::Reward(), and sWorld.
Referenced by HandleKillPlayer().
| void Battleground::SendBroadcastText | ( | uint32 | id, |
| ChatMsg | msgType, | ||
| WorldObject const * | target = nullptr |
||
| ) |
Definition at line 544 of file Battleground.cpp.
References BroadcastWorker(), GENDER_MALE, sBroadcastTextStore, and TC_LOG_ERROR.
Referenced by _ProcessJoin(), GameObject::AssaultCapturePoint(), EndBattleground(), battleground_eye_of_the_storm::EventTeamCapturedPoint(), battleground_eye_of_the_storm::EventTeamLostPoint(), battleground_seething_shore::HandleAssaultPoint(), battleground_isle_of_conquest::HandleCaptureNodeAction(), battleground_silvershard_mines::HandleProgressEvent(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_eye_of_the_storm::OnFlagStateChange(), battleground_deephaul_ravine::OnFlagStateChange(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_temple_of_kotmogu::OnFlagTaken(), battleground_isle_of_conquest::OnGateDestroyed(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_isle_of_conquest::OnPlayerDefendNode(), battleground_silvershard_mines::OnTrackSwitched(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), battleground_strand_of_the_ancients::OnUpdate(), battleground_seething_shore::SpawnAzeriteNodes(), battleground_strand_of_the_ancients::TitanRelicActivated(), and battleground_alterac_valley::UpdateScore().
| void Battleground::SendChatMessage | ( | Creature * | source, |
| uint8 | textId, | ||
| WorldObject * | target = nullptr |
||
| ) |
Definition at line 539 of file Battleground.cpp.
References sCreatureTextMgr.
Referenced by battleground_strand_of_the_ancients::OnUpdate(), battleground_strand_of_the_ancients::ProcessEvent(), and battleground_strand_of_the_ancients::TitanRelicActivated().
Definition at line 1326 of file Battleground.cpp.
References BroadcastWorker().
Referenced by battleground_deephaul_ravine::OnFlagStateChange().
| void Battleground::SendPacketToAll | ( | WorldPacket const * | packet | ) | const |
Definition at line 522 of file Battleground.cpp.
References _GetPlayer(), and m_Players.
Referenced by _ProcessJoin(), _ProcessPlayerPositionBroadcast(), and PlaySoundToAll().
| void Battleground::SendPacketToTeam | ( | Team | team, |
| WorldPacket const * | packet, | ||
| Player * | except = nullptr |
||
| ) | const |
Definition at line 529 of file Battleground.cpp.
References _GetPlayerForTeam(), and m_Players.
Referenced by AddPlayer(), PlaySoundToTeam(), and RemovePlayerAtLeave().
Definition at line 400 of file Battleground.h.
Referenced by BattlegroundQueue::BattlegroundQueueUpdate(), and Arena::EndBattleground().
|
inline |
Definition at line 306 of file Battleground.h.
Referenced by BattlegroundMgr::CreateNewBattleground().
| void Battleground::SetBgMap | ( | BattlegroundMap * | map | ) |
Definition at line 1317 of file Battleground.cpp.
References _pvpStatIds, Map::GetId(), m_Map, and sDB2Manager.
Referenced by MapManager::CreateBattleground(), and BattlegroundMap::~BattlegroundMap().
Definition at line 1457 of file Battleground.cpp.
References ALLIANCE, m_BgRaids, Group::SetBattlegroundGroup(), TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by AddOrSetPlayerToCorrectBgGroup(), RemovePlayerAtLeave(), and Group::~Group().
| void Battleground::SetBracket | ( | PVPDifficultyEntry const * | bracketEntry | ) |
Definition at line 1467 of file Battleground.cpp.
References _pvpDifficultyEntry.
Referenced by BattlegroundMgr::CreateNewBattleground().
|
inline |
Definition at line 302 of file Battleground.h.
Referenced by BattlegroundMgr::CreateNewBattleground().
|
inline |
Definition at line 429 of file Battleground.h.
|
inline |
Definition at line 303 of file Battleground.h.
References Time.
Referenced by Reset(), StartBattleground(), and Update().
|
inline |
Definition at line 300 of file Battleground.h.
Referenced by BattlegroundMgr::CreateNewBattleground().
|
inline |
Definition at line 305 of file Battleground.h.
Referenced by BattlegroundMgr::CreateNewBattleground().
|
inline |
Definition at line 304 of file Battleground.h.
References Time.
Referenced by _ProcessLeave(), _ProcessProgress(), EndBattleground(), EndNow(), and Reset().
|
inline |
Definition at line 311 of file Battleground.h.
References Time.
Referenced by _ProcessJoin(), and bg_commandscript::HandleBgStartCommand().
|
inline |
Definition at line 301 of file Battleground.h.
Referenced by _ProcessJoin(), BattlegroundMgr::CreateNewBattleground(), EndBattleground(), EndNow(), battleground_strand_of_the_ancients::OnUpdate(), Reset(), and battleground_strand_of_the_ancients::ResetObjs().
Definition at line 454 of file Battleground.h.
Referenced by spell_bg_temple_of_kotmogu_victory_points_periodic< Points >::OnHit(), battleground_arathi_basin::OnUpdate(), and battleground_battle_for_gilneas::OnUpdate().
|
inline |
Definition at line 458 of file Battleground.h.
Referenced by BattlegroundMgr::AddBattleground().
|
inline |
Definition at line 307 of file Battleground.h.
Referenced by EndBattleground(), and Reset().
| void Battleground::StartBattleground | ( | ) |
Definition at line 952 of file Battleground.cpp.
References AddToBGFreeSlotQueue(), m_ArenaType, m_IsRated, sBattlegroundMgr, SetElapsedTime(), and TC_LOG_DEBUG.
Referenced by BattlegroundQueue::BattlegroundQueueUpdate().
| void Battleground::TeleportPlayerToExploitLocation | ( | Player * | player | ) |
Definition at line 967 of file Battleground.cpp.
References Player::GetBGTeam(), GetExploitTeleportLocation(), and Player::TeleportTo().
|
inline |
Definition at line 428 of file Battleground.h.
Referenced by BattlegroundMgr::Update().
| void Battleground::Update | ( | uint32 | diff | ) |
Definition at line 140 of file Battleground.cpp.
References _CheckSafePositions(), _ProcessJoin(), _ProcessLeave(), _ProcessOfflineQueue(), _ProcessPlayerPositionBroadcast(), _ProcessProgress(), ALLIANCE, EndBattleground(), GetElapsedTime(), GetInvitedCount(), GetPlayersSize(), GetStatus(), HORDE, IN_MILLISECONDS, isArena(), m_ResetStatTimer, m_SetDeleteThis, MINUTE, PostUpdateImpl(), PreUpdateImpl(), SetElapsedTime(), STATUS_IN_PROGRESS, STATUS_WAIT_JOIN, STATUS_WAIT_LEAVE, and TEAM_OTHER.
Referenced by BattlegroundMgr::Update().
| bool Battleground::UpdatePlayerScore | ( | Player * | player, |
| uint32 | type, | ||
| uint32 | value, | ||
| bool | doAddHonor = true, |
||
| Optional< HonorGainSource > | source = {} |
||
| ) |
Definition at line 1292 of file Battleground.cpp.
References BaseEntity::GetGUID(), isBattleground(), Kill, PlayerScores, Player::RewardHonor(), and SCORE_BONUS_HONOR.
Referenced by EndBattleground(), HandleKillPlayer(), battleground_strand_of_the_ancients::ProcessEvent(), and RewardHonorToTeam().
|
inline |
Definition at line 389 of file Battleground.h.
Referenced by AddPlayer(), and RemovePlayerAtLeave().
Definition at line 1306 of file Battleground.cpp.
References BaseEntity::GetGUID(), Trinity::Containers::MapGetValuePtr(), and PlayerScores.
Referenced by battleground_alterac_valley::EventPlayerAssaultsPoint(), battleground_alterac_valley::EventPlayerDefendsPoint(), battleground_seething_shore::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleDefendPoint(), battleground_silvershard_mines::HandleProgressEvent(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_temple_of_kotmogu::OnFlagTaken(), spell_bg_temple_of_kotmogu_victory_points_periodic< Points >::OnHit(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_isle_of_conquest::OnPlayerDefendNode(), battleground_strand_of_the_ancients::OnUnitKilled(), battleground_arathi_basin::ProcessEvent(), and battleground_strand_of_the_ancients::ProcessEvent().
Definition at line 610 of file Battleground.cpp.
References GetBgMap(), and WorldStateMgr::SetValue().
Referenced by battleground_silvershard_mines::OnMineCartCaptured(), and Arena::UpdateArenaWorldState().
|
private |
Definition at line 563 of file Battleground.h.
Referenced by Battleground(), GetMapId(), GetMaxLevel(), GetMaxPlayersPerTeam(), GetMinLevel(), GetMinPlayersPerTeam(), GetName(), GetScriptId(), GetStartMaxDist(), GetTeamStartPosition(), GetTypeID(), and isArena().
|
private |
Definition at line 567 of file Battleground.h.
Referenced by _ProcessPlayerPositionBroadcast(), AddPlayerPosition(), RemovePlayerPosition(), Reset(), and ~Battleground().
|
private |
Definition at line 570 of file Battleground.h.
Referenced by _ProcessJoin(), and AddOrSetPlayerToCorrectBgGroup().
|
private |
Definition at line 564 of file Battleground.h.
Referenced by GetBracketId(), GetMaxLevel(), GetMinLevel(), and SetBracket().
|
private |
Definition at line 565 of file Battleground.h.
Referenced by AddPlayer(), and SetBgMap().
|
private |
Definition at line 536 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 557 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 532 of file Battleground.h.
Referenced by Battleground(), and StartBattleground().
|
private |
Definition at line 552 of file Battleground.h.
Referenced by _ProcessJoin(), Battleground(), SetBgRaid(), and ~Battleground().
|
private |
Definition at line 527 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 531 of file Battleground.h.
Referenced by _ProcessProgress(), and Battleground().
|
protected |
Definition at line 516 of file Battleground.h.
Referenced by _ProcessJoin(), Battleground(), and Reset().
|
private |
Definition at line 533 of file Battleground.h.
Referenced by AddToBGFreeSlotQueue(), Battleground(), RemoveFromBGFreeSlotQueue(), and Reset().
|
private |
Definition at line 525 of file Battleground.h.
Referenced by _GetPlayer(), _ProcessJoin(), Battleground(), RemoveFromBGFreeSlotQueue(), and Reset().
|
private |
Definition at line 548 of file Battleground.h.
Referenced by Battleground(), and Reset().
|
private |
Definition at line 549 of file Battleground.h.
Referenced by Battleground(), and Reset().
|
private |
Definition at line 538 of file Battleground.h.
Referenced by Battleground(), and StartBattleground().
|
private |
Definition at line 540 of file Battleground.h.
Referenced by _ProcessPlayerPositionBroadcast(), and Battleground().
|
private |
Definition at line 560 of file Battleground.h.
Referenced by Battleground(), GetBgMap(), SetBgMap(), and ~Battleground().
|
private |
Definition at line 543 of file Battleground.h.
Referenced by _ProcessOfflineQueue(), EventPlayerLoggedIn(), and EventPlayerLoggedOut().
|
protected |
Definition at line 513 of file Battleground.h.
Referenced by _ProcessLeave(), _ProcessOfflineQueue(), _ProcessProgress(), AddPlayer(), BroadcastWorker(), CastSpellOnTeam(), EndBattleground(), EventPlayerLoggedIn(), EventPlayerLoggedOut(), GetAlivePlayersCountByTeam(), GetPlayerTeam(), HandleKillPlayer(), IsPlayerInBattleground(), IsPlayerMercenaryInBattleground(), RemoveAuraOnTeam(), RemovePlayerAtLeave(), Arena::RemovePlayerAtLeave(), Reset(), RewardHonorToTeam(), RewardReputationToTeam(), SendPacketToAll(), and SendPacketToTeam().
|
private |
Definition at line 555 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 539 of file Battleground.h.
Referenced by _ProcessProgress(), and Battleground().
|
private |
Definition at line 529 of file Battleground.h.
Referenced by _ProcessJoin(), Battleground(), and Update().
|
private |
Definition at line 534 of file Battleground.h.
Referenced by Battleground(), and Update().
|
private |
Definition at line 537 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 528 of file Battleground.h.
Referenced by Battleground().
|
private |
Definition at line 526 of file Battleground.h.
Referenced by Battleground().
|
protected |
Definition at line 521 of file Battleground.h.
Referenced by Battleground(), and GetTeamScore().
|
private |
Definition at line 530 of file Battleground.h.
Referenced by _CheckSafePositions(), and Battleground().
|
private |
Definition at line 572 of file Battleground.h.
|
protected |
Definition at line 508 of file Battleground.h.
Referenced by AddPlayer(), BuildPvPLogDataPacket(), EndBattleground(), Arena::EndBattleground(), GetBattlegroundScore(), RemovePlayerAtLeave(), Reset(), UpdatePlayerScore(), UpdatePvpStat(), and ~Battleground().
|
protected |
Definition at line 517 of file Battleground.h.
Referenced by _ProcessJoin(), AddOrSetPlayerToCorrectBgGroup(), Arena::Arena(), and Battleground().
|
protected |
Definition at line 519 of file Battleground.h.
Referenced by _ProcessJoin(), Arena::Arena(), and Battleground().
|
private |
Definition at line 561 of file Battleground.h.