AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "BattlegroundWS.h"
Private Member Functions | |
void | PostUpdateImpl (uint32 diff) override |
Post-update hook. More... | |
Private Attributes | |
EventMap | _bgEvents |
ObjectGuid | _flagKeepers [2] |
ObjectGuid | _droppedFlagGUID [2] |
uint8 | _flagState [2] |
TeamId | _lastFlagCaptureTeam |
uint32 | _reputationCapture |
uint32 | _honorWinKills |
uint32 | _honorEndKills |
BattlegroundWS::BattlegroundWS | ( | ) |
References _flagState, _honorEndKills, _honorWinKills, _lastFlagCaptureTeam, _reputationCapture, BG_CREATURES_MAX_WS, BG_STARTING_EVENT_FOURTH, BG_STARTING_EVENT_SECOND, BG_STARTING_EVENT_THIRD, BG_WS_FLAG_STATE_ON_BASE, BG_WS_OBJECT_MAX, BG_WS_TEXT_BATTLE_HAS_BEGUN, BG_WS_TEXT_START_HALF_MINUTE, BG_WS_TEXT_START_ONE_MINUTE, Battleground::BgCreatures, Battleground::BgObjects, Battleground::StartMessageIds, TEAM_ALLIANCE, TEAM_HORDE, and TEAM_NEUTRAL.
|
override |
|
overridevirtual |
Reimplemented from Battleground.
References Battleground::AddPlayer(), ObjectGuid::GetCounter(), Object::GetGUID(), and Battleground::PlayerScores.
Referenced by EventPlayerCapturedFlag().
void BattlegroundWS::CheckFlagKeeperInArea | ( | TeamId | teamId | ) |
References BG_WS_FLAG_STATE_ON_PLAYER, BG_WS_TRIGGER_ALLIANCE_FLAG_SPAWN, BG_WS_TRIGGER_HORDE_FLAG_SPAWN, Battleground::FindBgMap(), GetFlagPickerGUID(), GetFlagState(), ObjectAccessor::GetPlayer(), Battleground::GetStatus(), HandleAreaTrigger(), sObjectMgr, STATUS_IN_PROGRESS, and TEAM_ALLIANCE.
Referenced by EventPlayerClickedOnFlag(), and RespawnFlagAfterDrop().
|
overridevirtual |
Reimplemented from Battleground.
References _honorEndKills, _honorWinKills, Battleground::EndBattleground(), Battleground::GetBonusHonorFromKill(), Battleground::RewardHonorToTeam(), TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by EventPlayerCapturedFlag(), and PostUpdateImpl().
void BattlegroundWS::EventPlayerCapturedFlag | ( | Player * | player | ) |
References _bgEvents, _lastFlagCaptureTeam, _reputationCapture, AddPoints(), AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT, BG_WS_EVENT_BOTH_FLAGS_KEPT10, BG_WS_EVENT_BOTH_FLAGS_KEPT15, BG_WS_EVENT_RESPAWN_BOTH_FLAGS, BG_WS_FLAG_CAPTURES_ALLIANCE, BG_WS_FLAG_CAPTURES_HORDE, BG_WS_FLAG_RESPAWN_TIME, BG_WS_FLAG_STATE_ON_BASE, BG_WS_MAX_TEAM_SCORE, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_H_FLAG, BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE, BG_WS_SOUND_FLAG_CAPTURED_HORDE, BG_WS_SPELL_SILVERWING_FLAG, BG_WS_SPELL_WARSONG_FLAG, BG_WS_STATE_TIMER_ACTIVE, BG_WS_TEXT_CAPTURED_ALLIANCE_FLAG, BG_WS_TEXT_CAPTURED_HORDE_FLAG, EventMap::CancelEvent(), CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, ObjectGuid::Empty, EndBattleground(), Battleground::GetBonusHonorFromKill(), Battleground::GetOtherTeamId(), Battleground::GetStatus(), Player::GetTeamId(), Battleground::GetTeamScore(), Battleground::PlaySoundToAll(), RemoveAssaultAuras(), Unit::RemoveAurasDueToSpell(), Unit::RemoveAurasWithInterruptFlags(), Battleground::RewardHonorToTeam(), Battleground::RewardReputationToTeam(), EventMap::ScheduleEvent(), SCORE_FLAG_CAPTURES, Battleground::SendBroadcastText(), SetFlagPicker(), Battleground::SpawnBGObject(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, TEAM_HORDE, UpdateFlagState(), UpdatePlayerScore(), and Battleground::UpdateWorldState().
Referenced by HandleAreaTrigger().
|
overridevirtual |
Reimplemented from Battleground.
References _bgEvents, ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT, BG_OBJECT_A_FLAG_GROUND_WS_ENTRY, BG_OBJECT_H_FLAG_GROUND_WS_ENTRY, BG_WS_EVENT_BOTH_FLAGS_KEPT10, BG_WS_EVENT_BOTH_FLAGS_KEPT15, BG_WS_FLAG_STATE_ON_BASE, BG_WS_FLAG_STATE_ON_GROUND, BG_WS_FLAG_STATE_ON_PLAYER, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_H_FLAG, BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP, BG_WS_SOUND_FLAG_RETURNED, BG_WS_SOUND_HORDE_FLAG_PICKED_UP, BG_WS_SPELL_BRUTAL_TIME, BG_WS_SPELL_FORCE_TIME, BG_WS_SPELL_SILVERWING_FLAG, BG_WS_SPELL_SILVERWING_FLAG_PICKED, BG_WS_SPELL_WARSONG_FLAG, BG_WS_SPELL_WARSONG_FLAG_PICKED, BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP, BG_WS_TEXT_ALLIANCE_FLAG_RETURNED, BG_WS_TEXT_HORDE_FLAG_PICKED_UP, BG_WS_TEXT_HORDE_FLAG_RETURNED, Battleground::BgObjects, EventMap::CancelEvent(), Unit::CastSpell(), CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, CheckFlagKeeperInArea(), Unit::Dismount(), ObjectGuid::Empty, GetAssaultSpellId(), Object::GetEntry(), GetFlagState(), Object::GetGUID(), Battleground::GetStatus(), Player::GetTeamId(), Unit::IsMounted(), WorldObject::IsWithinDistInMap(), Battleground::PlaySoundToAll(), RemoveAssaultAuras(), Unit::RemoveAurasByType(), Unit::RemoveAurasWithInterruptFlags(), EventMap::RescheduleEvent(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, SCORE_FLAG_RETURNS, Battleground::SendBroadcastText(), SetDroppedFlagGUID(), SetFlagPicker(), Battleground::SpawnBGObject(), SPELL_AURA_MOUNTED, Player::StartTimedAchievement(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, TEAM_HORDE, UpdateFlagState(), and UpdatePlayerScore().
|
overridevirtual |
Reimplemented from Battleground.
References _bgEvents, BG_WS_EVENT_ALLIANCE_DROP_FLAG, BG_WS_EVENT_HORDE_DROP_FLAG, BG_WS_FLAG_DROP_TIME, BG_WS_FLAG_STATE_ON_GROUND, BG_WS_SPELL_BRUTAL_ASSAULT, BG_WS_SPELL_FOCUSED_ASSAULT, BG_WS_SPELL_SILVERWING_FLAG_DROPPED, BG_WS_SPELL_WARSONG_FLAG, BG_WS_SPELL_WARSONG_FLAG_DROPPED, BG_WS_TEXT_ALLIANCE_FLAG_DROPPED, BG_WS_TEXT_HORDE_FLAG_DROPPED, Unit::CastSpell(), CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, ObjectGuid::Empty, GetFlagPickerGUID(), Object::GetGUID(), Battleground::GetOtherTeamId(), Battleground::GetStatus(), Player::GetTeamId(), Unit::RemoveAurasDueToSpell(), EventMap::RescheduleEvent(), Battleground::SendBroadcastText(), SetFlagPicker(), SPELL_RECENTLY_DROPPED_FLAG, STATUS_IN_PROGRESS, TEAM_ALLIANCE, TEAM_HORDE, and UpdateFlagState().
Referenced by HandleKillPlayer(), and RemovePlayer().
|
overridevirtual |
Reimplemented from Battleground.
References BG_WS_FLAG_CAPTURES_ALLIANCE, BG_WS_FLAG_CAPTURES_HORDE, BG_WS_FLAG_CAPTURES_MAX, BG_WS_FLAG_STATE_ALLIANCE, BG_WS_FLAG_STATE_HORDE, BG_WS_MAX_TEAM_SCORE, BG_WS_STATE_TIMER, BG_WS_STATE_TIMER_ACTIVE, GetFlagState(), GetMatchTime(), Battleground::GetStatus(), Battleground::GetTeamScore(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, and TEAM_HORDE.
uint32 BattlegroundWS::GetAssaultSpellId | ( | ) | const |
References _bgEvents, BG_WS_EVENT_BOTH_FLAGS_KEPT10, BG_WS_EVENT_BOTH_FLAGS_KEPT15, BG_WS_FLAG_STATE_ON_GROUND, BG_WS_SPELL_BRUTAL_ASSAULT, BG_WS_SPELL_FOCUSED_ASSAULT, GetFlagPickerGUID(), GetFlagState(), EventMap::GetNextEventTime(), TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by EventPlayerClickedOnFlag().
|
overridevirtual |
Reimplemented from Battleground.
References Battleground::GetStatus(), Player::GetTeamId(), sGraveyard, STATUS_IN_PROGRESS, TEAM_ALLIANCE, WS_GRAVEYARD_FLAGROOM_ALLIANCE, WS_GRAVEYARD_FLAGROOM_HORDE, WS_GRAVEYARD_MAIN_ALLIANCE, and WS_GRAVEYARD_MAIN_HORDE.
|
inline |
Referenced by RespawnFlagAfterDrop().
|
inlineoverridevirtual |
Reimplemented from Battleground.
Referenced by CheckFlagKeeperInArea(), EventPlayerDroppedFlag(), GetAssaultSpellId(), HandleAreaTrigger(), PostUpdateImpl(), RemoveAssaultAuras(), and RemovePlayer().
|
inline |
References BG_WS_TOTAL_GAME_TIME, Battleground::GetStartTime(), IN_MILLISECONDS, and MINUTE.
Referenced by FillInitialWorldStates(), and PostUpdateImpl().
|
overridevirtual |
Reimplemented from Battleground.
References Battleground::GetPrematureWinner(), Battleground::GetTeamScore(), TEAM_ALLIANCE, and TEAM_HORDE.
Reimplemented from Battleground.
References BG_WS_FLAG_STATE_ON_BASE, BG_WS_TRIGGER_ALLIANCE_ELIXIR_BERSERK_SPAWN, BG_WS_TRIGGER_ALLIANCE_ELIXIR_REGEN_SPAWN, BG_WS_TRIGGER_ALLIANCE_ELIXIR_SPEED_SPAWN, BG_WS_TRIGGER_ALLIANCE_FLAG_SPAWN, BG_WS_TRIGGER_HORDE_ELIXIR_BERSERK_SPAWN, BG_WS_TRIGGER_HORDE_ELIXIR_REGEN_SPAWN, BG_WS_TRIGGER_HORDE_ELIXIR_SPEED_SPAWN, BG_WS_TRIGGER_HORDE_FLAG_SPAWN, EventPlayerCapturedFlag(), GetFlagPickerGUID(), GetFlagState(), Object::GetGUID(), Battleground::GetStatus(), Unit::IsAlive(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by CheckFlagKeeperInArea().
Reimplemented from Battleground.
References EventPlayerDroppedFlag(), Battleground::GetStatus(), Battleground::HandleKillPlayer(), and STATUS_IN_PROGRESS.
|
overridevirtual |
Reimplemented from Battleground.
References _bgEvents, _droppedFlagGUID, _flagKeepers, _flagState, _honorEndKills, _honorWinKills, _lastFlagCaptureTeam, _reputationCapture, BG_WS_FLAG_STATE_ON_BASE, ObjectGuid::Clear(), Battleground::GetBgTypeID(), Battleground::Init(), EventMap::Reset(), sBattlegroundMgr, TEAM_ALLIANCE, TEAM_HORDE, and TEAM_NEUTRAL.
|
overrideprivatevirtual |
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. |
Reimplemented from Battleground.
References _bgEvents, _lastFlagCaptureTeam, BG_WS_EVENT_ALLIANCE_DROP_FLAG, BG_WS_EVENT_BOTH_FLAGS_KEPT10, BG_WS_EVENT_BOTH_FLAGS_KEPT15, BG_WS_EVENT_DESPAWN_DOORS, BG_WS_EVENT_HORDE_DROP_FLAG, BG_WS_EVENT_NO_TIME_LEFT, BG_WS_EVENT_RESPAWN_BOTH_FLAGS, BG_WS_EVENT_UPDATE_GAME_TIME, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_DOOR_H_1, BG_WS_OBJECT_DOOR_H_2, BG_WS_OBJECT_H_FLAG, BG_WS_SOUND_FLAGS_RESPAWNED, BG_WS_SPELL_BRUTAL_ASSAULT, BG_WS_SPELL_FOCUSED_ASSAULT, BG_WS_STATE_TIMER, BG_WS_TEXT_FLAGS_PLACED, BG_WS_TOTAL_GAME_TIME, CHAT_MSG_BG_SYSTEM_NEUTRAL, EndBattleground(), EventMap::ExecuteEvent(), Battleground::FindBgMap(), GetFlagPickerGUID(), GetMatchTime(), ObjectAccessor::GetPlayer(), Battleground::GetStartTime(), Battleground::GetStatus(), Battleground::GetTeamScore(), IN_MILLISECONDS, MINUTE, Battleground::PlaySoundToAll(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, RespawnFlagAfterDrop(), EventMap::ScheduleEvent(), Battleground::SendBroadcastText(), Battleground::SpawnBGObject(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, TEAM_HORDE, EventMap::Update(), and Battleground::UpdateWorldState().
void BattlegroundWS::RemoveAssaultAuras | ( | ) |
References BG_WS_SPELL_BRUTAL_ASSAULT, BG_WS_SPELL_FOCUSED_ASSAULT, Battleground::FindBgMap(), GetFlagPickerGUID(), ObjectAccessor::GetPlayer(), TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by EventPlayerCapturedFlag(), EventPlayerClickedOnFlag(), and RespawnFlagAfterDrop().
|
overridevirtual |
Reimplemented from Battleground.
References EventPlayerDroppedFlag(), GetFlagPickerGUID(), Object::GetGUID(), TEAM_ALLIANCE, and TEAM_HORDE.
void BattlegroundWS::RespawnFlagAfterDrop | ( | TeamId | teamId | ) |
References _bgEvents, BG_WS_EVENT_BOTH_FLAGS_KEPT10, BG_WS_EVENT_BOTH_FLAGS_KEPT15, BG_WS_FLAG_STATE_ON_BASE, BG_WS_FLAG_STATE_ON_GROUND, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_H_FLAG, BG_WS_SOUND_FLAGS_RESPAWNED, BG_WS_TEXT_FLAGS_PLACED, EventMap::CancelEvent(), CHAT_MSG_BG_SYSTEM_NEUTRAL, CheckFlagKeeperInArea(), ObjectGuid::Empty, Battleground::GetBgMap(), GetDroppedFlagGUID(), GetFlagState(), Battleground::GetStatus(), Battleground::PlaySoundToAll(), RemoveAssaultAuras(), RESPAWN_IMMEDIATELY, Battleground::SendBroadcastText(), SetDroppedFlagGUID(), Battleground::SpawnBGObject(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, TEAM_HORDE, and UpdateFlagState().
Referenced by PostUpdateImpl().
|
inlineoverridevirtual |
Reimplemented from Battleground.
Referenced by EventPlayerClickedOnFlag(), and RespawnFlagAfterDrop().
|
inline |
Referenced by EventPlayerCapturedFlag(), EventPlayerClickedOnFlag(), and EventPlayerDroppedFlag().
|
overridevirtual |
Reimplemented from Battleground.
References Battleground::AddObject(), Battleground::AddSpiritGuide(), BERSERKING_BUFF_RESPAWN_TIME, BG_CREATURES_MAX_WS, BG_OBJECT_A_FLAG_WS_ENTRY, BG_OBJECT_DOOR_A_1_WS_ENTRY, BG_OBJECT_DOOR_A_2_WS_ENTRY, BG_OBJECT_DOOR_A_3_WS_ENTRY, BG_OBJECT_DOOR_A_4_WS_ENTRY, BG_OBJECT_DOOR_A_5_WS_ENTRY, BG_OBJECT_DOOR_A_6_WS_ENTRY, BG_OBJECT_DOOR_H_1_WS_ENTRY, BG_OBJECT_DOOR_H_2_WS_ENTRY, BG_OBJECT_DOOR_H_3_WS_ENTRY, BG_OBJECT_DOOR_H_4_WS_ENTRY, BG_OBJECT_H_FLAG_WS_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_SPEEDBUFF_ENTRY, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_BERSERKBUFF_1, BG_WS_OBJECT_BERSERKBUFF_2, BG_WS_OBJECT_DOOR_A_1, BG_WS_OBJECT_DOOR_A_2, BG_WS_OBJECT_DOOR_A_3, BG_WS_OBJECT_DOOR_A_4, BG_WS_OBJECT_DOOR_A_5, BG_WS_OBJECT_DOOR_A_6, BG_WS_OBJECT_DOOR_H_1, BG_WS_OBJECT_DOOR_H_2, BG_WS_OBJECT_DOOR_H_3, BG_WS_OBJECT_DOOR_H_4, BG_WS_OBJECT_H_FLAG, BG_WS_OBJECT_MAX, BG_WS_OBJECT_REGENBUFF_1, BG_WS_OBJECT_REGENBUFF_2, BG_WS_OBJECT_SPEEDBUFF_1, BG_WS_OBJECT_SPEEDBUFF_2, Battleground::BgCreatures, Battleground::BgObjects, LOG_ERROR, RESPAWN_IMMEDIATELY, RESTORATION_BUFF_RESPAWN_TIME, sGraveyard, SPEED_BUFF_RESPAWN_TIME, TEAM_ALLIANCE, TEAM_HORDE, WS_GRAVEYARD_MAIN_ALLIANCE, WS_GRAVEYARD_MAIN_HORDE, WS_SPIRIT_MAIN_ALLIANCE, WS_SPIRIT_MAIN_HORDE, GraveyardStruct::x, GraveyardStruct::y, and GraveyardStruct::z.
|
overridevirtual |
Reimplemented from Battleground.
References BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_BERSERKBUFF_2, BG_WS_OBJECT_DOOR_A_1, BG_WS_OBJECT_DOOR_H_4, Battleground::DoorClose(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, and Battleground::SpawnBGObject().
|
overridevirtual |
Reimplemented from Battleground.
References _bgEvents, ACHIEVEMENT_TIMED_TYPE_EVENT, BG_WS_DOOR_DESPAWN_TIME, BG_WS_EVENT_DESPAWN_DOORS, BG_WS_EVENT_NO_TIME_LEFT, BG_WS_EVENT_UPDATE_GAME_TIME, BG_WS_OBJECT_A_FLAG, BG_WS_OBJECT_BERSERKBUFF_2, BG_WS_OBJECT_DOOR_A_1, BG_WS_OBJECT_DOOR_A_5, BG_WS_OBJECT_DOOR_A_6, BG_WS_OBJECT_DOOR_H_1, BG_WS_OBJECT_DOOR_H_3, BG_WS_OBJECT_DOOR_H_4, BG_WS_STATE_TIMER_ACTIVE, BG_WS_TOTAL_GAME_TIME, Battleground::DoorOpen(), IN_MILLISECONDS, MINUTE, RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, EventMap::ScheduleEvent(), Battleground::SpawnBGObject(), Battleground::StartTimedAchievement(), Battleground::UpdateWorldState(), and WS_EVENT_START_BATTLE.
References _flagState, BG_WS_FLAG_STATE_ALLIANCE, BG_WS_FLAG_STATE_HORDE, TEAM_ALLIANCE, and Battleground::UpdateWorldState().
Referenced by EventPlayerCapturedFlag(), EventPlayerClickedOnFlag(), EventPlayerDroppedFlag(), and RespawnFlagAfterDrop().
|
overridevirtual |
Reimplemented from Battleground.
References ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, SCORE_FLAG_CAPTURES, SCORE_FLAG_RETURNS, Player::UpdateAchievementCriteria(), Battleground::UpdatePlayerScore(), WS_OBJECTIVE_CAPTURE_FLAG, and WS_OBJECTIVE_RETURN_FLAG.
Referenced by EventPlayerCapturedFlag(), and EventPlayerClickedOnFlag().
|
private |
|
private |
Referenced by Init().
|
private |
Referenced by Init().
|
private |
Referenced by BattlegroundWS(), Init(), and UpdateFlagState().
|
private |
Referenced by BattlegroundWS(), EndBattleground(), and Init().
|
private |
Referenced by BattlegroundWS(), EndBattleground(), and Init().
|
private |
Referenced by BattlegroundWS(), EventPlayerCapturedFlag(), Init(), and PostUpdateImpl().
|
private |
Referenced by BattlegroundWS(), EventPlayerCapturedFlag(), and Init().