![]() |
TrinityCore
|
#include <Battlefield.h>
Inheritance diagram for Battlefield:Public Types | |
| typedef std::map< ObjectGuid::LowType, BfCapturePoint * > | BfCapturePointMap |
| typedef of map witch store capturepoint and the associate gameobject entry | |
Public Member Functions | |
| Battlefield () | |
| Constructor. | |
| Battlefield (Battlefield const &)=delete | |
| Battlefield (Battlefield &&)=delete | |
| Battlefield & | operator= (Battlefield const &)=delete |
| Battlefield & | operator= (Battlefield &&)=delete |
| virtual | ~Battlefield () |
| Destructor. | |
| virtual bool | SetupBattlefield () |
| Call this to init the Battlefield. | |
| void | SendInitWorldStatesTo (Player *player) |
| void | SendUpdateWorldState (uint32 variable, uint32 value) |
| Update data of a worldstate to all players present in zone. | |
| virtual bool | Update (uint32 diff) |
| Called every time for update bf data and time. | |
| void | InvitePlayersInZoneToQueue () |
| Invite all players in zone to join the queue, called x minutes before battle start in Update() | |
| void | InvitePlayersInQueueToWar () |
| Invite all players in queue to join battle on battle start. | |
| void | InvitePlayersInZoneToWar () |
| Invite all players in zone to join battle on battle start. | |
| virtual void | HandleKill (Player *, Unit *) |
| Called when a Unit is kill in battlefield zone. | |
| uint32 | GetTypeId () const |
| uint32 | GetZoneId () const |
| void | TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0) |
| bool | IsWarTime () const |
| Return true if battle is start, false if battle is not started. | |
| void | ToggleBattlefield (bool enable) |
| Enable or Disable battlefield. | |
| bool | IsEnabled () const |
| Return if battlefield is enable. | |
| void | KickPlayerFromBattlefield (ObjectGuid guid) |
| Kick player from battlefield and teleport him to kick-point location. | |
| void | HandlePlayerEnterZone (Player *player, uint32 zone) |
| Called when player (player) enter in zone. | |
| void | HandlePlayerLeaveZone (Player *player, uint32 zone) |
| Called when player (player) leave the zone. | |
| virtual uint64 | GetData64 (uint32 dataId) const override |
| virtual void | SetData64 (uint32 dataId, uint64 value) override |
| virtual uint32 | GetData (uint32 dataId) const override |
| virtual void | SetData (uint32 dataId, uint32 value) override |
| virtual void | UpdateData (uint32 index, int32 pad) |
| TeamId | GetDefenderTeam () const |
| TeamId | GetAttackerTeam () const |
| TeamId | GetOtherTeam (TeamId team) const |
| void | SetDefenderTeam (TeamId team) |
| Group * | GetFreeBfRaid (TeamId TeamId) |
| Find a not full battlefield group, if there is no, create one. | |
| Group * | GetGroupPlayer (ObjectGuid guid, TeamId TeamId) |
| Return battlefield group where player is. | |
| bool | AddOrSetPlayerToCorrectBfGroup (Player *player) |
| Force player to join a battlefield group. | |
| WorldSafeLocsEntry const * | GetClosestGraveyard (Player *player) |
| virtual void | AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid) |
| void | RemovePlayerFromResurrectQueue (ObjectGuid player_guid) |
| void | SetGraveyardNumber (uint32 number) |
| BfGraveyard * | GetGraveyardById (uint32 id) const |
| Creature * | SpawnCreature (uint32 entry, Position const &pos) |
| GameObject * | SpawnGameObject (uint32 entry, Position const &pos, QuaternionData const &rot) |
| Creature * | GetCreature (ObjectGuid guid) |
| GameObject * | GetGameObject (ObjectGuid guid) |
| virtual void | OnBattleStart () |
| Called on start. | |
| virtual void | OnBattleEnd (bool) |
| Called at the end of battle. | |
| virtual void | OnStartGrouping () |
| Called x minutes before battle start when player in zone are invite to join queue. | |
| virtual void | OnPlayerJoinWar (Player *) |
| Called when a player accept to join the battle. | |
| virtual void | OnPlayerLeaveWar (Player *) |
| Called when a player leave the battle. | |
| virtual void | OnPlayerLeaveZone (Player *) |
| Called when a player leave battlefield zone. | |
| virtual void | OnPlayerEnterZone (Player *) |
| Called when a player enter in battlefield zone. | |
| void | SendWarning (uint8 id, WorldObject const *target=nullptr) |
| void | PlayerAcceptInviteToQueue (Player *player) |
| void | PlayerAcceptInviteToWar (Player *player) |
| uint32 | GetBattleId () const |
| void | AskToLeaveQueue (Player *player) |
| void | PlayerAskToLeave (Player *player) |
| virtual void | DoCompleteOrIncrementAchievement (uint32, Player *, uint8) |
| virtual void | SendInitWorldStatesToAll ()=0 |
| Send all worldstate data to all player in zone. | |
| virtual void | FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)=0 |
| bool | CanFlyIn () |
| Return if we can use mount in battlefield. | |
| void | SendAreaSpiritHealerQueryOpcode (Player *player, ObjectGuid guid) |
| void | StartBattle () |
| void | EndBattle (bool endByTimer) |
| void | HideNpc (Creature *creature) |
| void | ShowNpc (Creature *creature, bool aggressive) |
| GraveyardVect | GetGraveyardVector () const |
| uint32 | GetTimer () const |
| void | SetTimer (uint32 timer) |
| void | DoPlaySoundToAll (uint32 soundID) |
| void | InvitePlayerToQueue (Player *player) |
| void | InvitePlayerToWar (Player *player) |
| void | InitStalker (uint32 entry, Position const &pos) |
Public Member Functions inherited from ZoneScript | |
| ZoneScript () | |
| virtual | ~ZoneScript () |
| virtual uint32 | GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data) |
| virtual uint32 | GetGameObjectEntry (ObjectGuid::LowType, uint32 entry) |
| virtual void | OnCreatureCreate (Creature *) |
| virtual void | OnCreatureRemove (Creature *) |
| virtual void | OnGameObjectCreate (GameObject *) |
| virtual void | OnGameObjectRemove (GameObject *) |
| virtual void | OnUnitDeath (Unit *) |
| virtual ObjectGuid | GetGuidData (uint32) const |
| virtual void | SetGuidData (uint32, ObjectGuid) |
| virtual void | ProcessEvent (WorldObject *, uint32) |
Protected Member Functions | |
| void | KickAfkPlayers () |
| virtual void | SendRemoveWorldStates (Player *) |
| void | BroadcastPacketToZone (WorldPacket const *data) const |
| void | BroadcastPacketToQueue (WorldPacket const *data) const |
| void | BroadcastPacketToWar (WorldPacket const *data) const |
| void | AddCapturePoint (BfCapturePoint *cp) |
| BfCapturePoint * | GetCapturePoint (uint32 entry) const |
| void | RegisterZone (uint32 zoneid) |
| bool | HasPlayer (Player *player) const |
| void | TeamCastSpell (TeamId team, int32 spellId) |
Friends | |
| class | BattlefieldMgr |
Definition at line 210 of file Battlefield.h.
| typedef std::map<ObjectGuid::LowType , BfCapturePoint*> Battlefield::BfCapturePointMap |
typedef of map witch store capturepoint and the associate gameobject entry
Definition at line 226 of file Battlefield.h.
| Battlefield::Battlefield | ( | ) |
Constructor.
Definition at line 40 of file Battlefield.cpp.
References IN_MILLISECONDS, m_BattleId, m_BattleTime, m_DefenderTeam, m_isActive, m_IsEnabled, m_LastResurrectTimer, m_Map, m_MapId, m_MaxPlayer, m_MinLevel, m_MinPlayer, m_NoWarBattleTime, m_RestartAfterCrash, m_StartGrouping, m_StartGroupingTimer, m_TimeForAcceptInvite, m_Timer, m_TypeId, m_uiKickAfkPlayersTimer, m_uiKickDontAcceptTimer, m_ZoneId, and TEAM_NEUTRAL.
|
delete |
|
delete |
|
virtual |
Destructor.
Definition at line 68 of file Battlefield.cpp.
References m_capturePoints, and m_GraveyardList.
|
protected |
Definition at line 470 of file Battlefield.cpp.
References BfCapturePoint::GetCapturePointEntry(), m_capturePoints, and TC_LOG_ERROR.
Referenced by BattlefieldWG::OnGameObjectCreate().
| bool Battlefield::AddOrSetPlayerToCorrectBfGroup | ( | Player * | player | ) |
Force player to join a battlefield group.
Definition at line 543 of file Battlefield.cpp.
References Group::AddMember(), Group::Create(), GetFreeBfRaid(), Player::GetGroup(), Group::GetGUID(), Object::GetGUID(), Group::GetMemberGroup(), Player::GetTeamId(), Object::IsInWorld(), Group::IsMember(), m_Groups, Group::RemoveMember(), Group::SetBattlefieldGroup(), Player::SetBattlegroundOrBattlefieldRaid(), and sGroupMgr.
Referenced by PlayerAcceptInviteToWar().
|
virtual |
Definition at line 621 of file Battlefield.cpp.
References BfGraveyard::AddPlayer(), and m_GraveyardList.
| void Battlefield::AskToLeaveQueue | ( | Player * | player | ) |
Definition at line 372 of file Battlefield.cpp.
References Object::GetGUID(), Player::GetTeamId(), and m_PlayersInQueue.
|
protected |
Definition at line 429 of file Battlefield.cpp.
References ObjectAccessor::FindConnectedPlayer(), m_PlayersInQueue, and PVP_TEAMS_COUNT.
|
protected |
Definition at line 437 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), m_PlayersInWar, and PVP_TEAMS_COUNT.
Referenced by DoPlaySoundToAll().
|
protected |
Definition at line 421 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), m_players, and PVP_TEAMS_COUNT.
Referenced by SendUpdateWorldState().
|
inline |
Return if we can use mount in battlefield.
Definition at line 353 of file Battlefield.h.
Referenced by Spell::CheckCast(), and SpellArea::IsFitToRequirements().
|
inlinevirtual |
Reimplemented in BattlefieldWG.
Definition at line 346 of file Battlefield.h.
| void Battlefield::DoPlaySoundToAll | ( | uint32 | soundID | ) |
Definition at line 352 of file Battlefield.cpp.
References BroadcastPacketToWar().
| void Battlefield::EndBattle | ( | bool | endByTimer | ) |
Definition at line 333 of file Battlefield.cpp.
References GetAttackerTeam(), m_isActive, m_NoWarBattleTime, m_StartGrouping, m_Timer, OnBattleEnd(), SendInitWorldStatesToAll(), and SetDefenderTeam().
Referenced by bf_commandscript::HandleBattlefieldEnd(), bf_commandscript::HandleBattlefieldSwitch(), BattlefieldWG::ProcessEvent(), and Update().
|
pure virtual |
Implemented in BattlefieldWG.
Referenced by Player::SendInitWorldStates(), and SendInitWorldStatesTo().
|
inline |
Definition at line 290 of file Battlefield.h.
Referenced by BattlefieldWG::BrokenWallOrTower(), BfWGGameObjectBuilding::Damaged(), EndBattle(), BattlefieldWG::FillInitialWorldStates(), BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::OnGameObjectCreate(), BattlefieldWG::OnPlayerJoinWar(), BfWGGameObjectBuilding::Rebuild(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdateDamagedTowerCount(), BattlefieldWG::UpdatedDestroyedTowerCount(), WintergraspWorkshop::UpdateGraveyardAndWorkshop(), and BfWGGameObjectBuilding::UpdateTurretAttack().
|
inline |
Definition at line 342 of file Battlefield.h.
|
protected |
Definition at line 481 of file Battlefield.cpp.
References m_capturePoints.
| WorldSafeLocsEntry const * Battlefield::GetClosestGraveyard | ( | Player * | player | ) |
Definition at line 595 of file Battlefield.cpp.
References BfGraveyard::GetDistance(), BfGraveyard::GetGraveyardId(), Player::GetTeamId(), m_GraveyardList, and sWorldSafeLocsStore.
Referenced by BfGraveyard::RelocateDeadPlayers().
| Creature * Battlefield::GetCreature | ( | ObjectGuid | guid | ) |
Definition at line 849 of file Battlefield.cpp.
References Map::GetCreature(), and m_Map.
Referenced by BfWGGameObjectBuilding::Damaged(), BfGraveyard::HasNpc(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::PromotePlayer(), BfGraveyard::Resurrect(), SendWarning(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdateTenacity(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Reimplemented from ZoneScript.
Reimplemented in BattlefieldWG.
Definition at line 284 of file Battlefield.h.
Referenced by npc_wg_demolisher_engineer::CanBuild(), BattlefieldWG::GetData(), and SpellArea::IsFitToRequirements().
Reimplemented from ZoneScript.
Definition at line 280 of file Battlefield.h.
|
inline |
Definition at line 289 of file Battlefield.h.
Referenced by BattlefieldWG::BrokenWallOrTower(), BfWGGameObjectBuilding::Damaged(), BattlefieldWG::FillInitialWorldStates(), BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), condition_is_wintergrasp_horde::OnConditionCheck(), condition_is_wintergrasp_alliance::OnConditionCheck(), npc_wg_queue::OnGossipHello(), BattlefieldWG::OnPlayerJoinWar(), BfWGGameObjectBuilding::Rebuild(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdatedDestroyedTowerCount(), WintergraspWorkshop::UpdateGraveyardAndWorkshop(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Find a not full battlefield group, if there is no, create one.
| TeamId | : Id of player team for who we search a group (player->GetTeamId()) |
Definition at line 523 of file Battlefield.cpp.
References m_Groups, and sGroupMgr.
Referenced by AddOrSetPlayerToCorrectBfGroup().
| GameObject * Battlefield::GetGameObject | ( | ObjectGuid | guid | ) |
Definition at line 856 of file Battlefield.cpp.
References Map::GetGameObject(), and m_Map.
Referenced by BattlefieldWG::BrokenWallOrTower(), BfCapturePoint::DelCapturePoint(), BfWGGameObjectBuilding::Destroyed(), BfCapturePoint::GetCapturePointGo(), BattlefieldWG::GetRelic(), BfCapturePoint::HandlePlayerEnter(), BfCapturePoint::HandlePlayerLeave(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::ProcessEvent(), BfWGGameObjectBuilding::Rebuild(), BfWGGameObjectBuilding::RebuildGate(), BfCapturePoint::SendChangePhase(), BfCapturePoint::Update(), and BfWGGameObjectBuilding::UpdateCreatureAndGo().
| BfGraveyard * Battlefield::GetGraveyardById | ( | uint32 | id | ) | const |
Definition at line 580 of file Battlefield.cpp.
References m_GraveyardList, and TC_LOG_ERROR.
Referenced by BattlefieldWG::GetData(), WintergraspWorkshop::GiveControlTo(), BattlefieldWG::OnBattleEnd(), and Update().
|
inline |
Definition at line 363 of file Battlefield.h.
Referenced by npc_wg_spirit_guide::OnGossipHello(), and npc_wg_spirit_guide::OnGossipSelect().
| Group * Battlefield::GetGroupPlayer | ( | ObjectGuid | guid, |
| TeamId | TeamId | ||
| ) |
Return battlefield group where player is.
Definition at line 533 of file Battlefield.cpp.
Definition at line 291 of file Battlefield.h.
References TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by InvitePlayerToQueue().
|
inline |
Definition at line 365 of file Battlefield.h.
Referenced by BattlefieldWG::OnBattleEnd(), npc_wg_queue::OnGossipHello(), and npc_wg_queue::OnGossipSelect().
|
inline |
Definition at line 255 of file Battlefield.h.
Referenced by BattlefieldMgr::HandlePlayerEnterZone(), SpellArea::IsFitToRequirements(), and Player::SendInitWorldStates().
|
inline |
Definition at line 256 of file Battlefield.h.
Referenced by WorldSession::HandleBfEntryInviteResponse(), and KickPlayerFromBattlefield().
Called when a Unit is kill in battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 253 of file Battlefield.h.
Called when player (player) enter in zone.
Definition at line 78 of file Battlefield.cpp.
References GameTime::GetGameTime(), Object::GetGUID(), Player::GetTeamId(), InvitePlayerToQueue(), InvitePlayerToWar(), IsWarTime(), m_InvitedPlayers, m_MaxPlayer, m_players, m_PlayersInWar, m_PlayersWillBeKick, m_StartGroupingTimer, m_Timer, and OnPlayerEnterZone().
Referenced by BattlefieldMgr::HandlePlayerEnterZone().
Called when player (player) leave the zone.
Definition at line 107 of file Battlefield.cpp.
References Player::GetGroup(), Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), IsWarTime(), m_BattleId, m_capturePoints, m_InvitedPlayers, m_players, m_PlayersInWar, m_PlayersWillBeKick, OnPlayerLeaveWar(), OnPlayerLeaveZone(), RemovePlayerFromResurrectQueue(), WorldSession::SendBfLeaveMessage(), and SendRemoveWorldStates().
|
protected |
Definition at line 357 of file Battlefield.cpp.
References Object::GetGUID(), Player::GetTeamId(), and m_players.
Referenced by BattlefieldMgr::HandlePlayerEnterZone(), and RemovePlayerFromResurrectQueue().
| void Battlefield::HideNpc | ( | Creature * | creature | ) |
Definition at line 494 of file Battlefield.cpp.
References Unit::CombatStop(), Creature::DisappearAndDie(), REACT_PASSIVE, Creature::SetPhaseMask(), Creature::SetReactState(), Unit::SetUnitFlag(), Unit::SetVisible(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_UNINTERACTIBLE.
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Definition at line 289 of file Battlefield.cpp.
References SpawnCreature(), StalkerGuid, and TC_LOG_ERROR.
Referenced by BattlefieldWG::SetupBattlefield().
| void Battlefield::InvitePlayersInQueueToWar | ( | ) |
Invite all players in queue to join battle on battle start.
Definition at line 221 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), InvitePlayerToWar(), m_InvitedPlayers, m_MaxPlayer, m_PlayersInQueue, m_PlayersInWar, and PVP_TEAMS_COUNT.
Referenced by StartBattle().
| void Battlefield::InvitePlayersInZoneToQueue | ( | ) |
Invite all players in zone to join the queue, called x minutes before battle start in Update()
Definition at line 204 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), InvitePlayerToQueue(), m_players, and PVP_TEAMS_COUNT.
Referenced by Update().
| void Battlefield::InvitePlayersInZoneToWar | ( | ) |
Invite all players in zone to join battle on battle start.
Definition at line 241 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), GameTime::GetGameTime(), InvitePlayerToWar(), m_InvitedPlayers, m_MaxPlayer, m_players, m_PlayersInWar, m_PlayersWillBeKick, and PVP_TEAMS_COUNT.
Referenced by StartBattle(), and Update().
| void Battlefield::InvitePlayerToQueue | ( | Player * | player | ) |
Definition at line 212 of file Battlefield.cpp.
References Object::GetGUID(), GetOtherTeam(), Player::GetSession(), Player::GetTeamId(), m_BattleId, m_MinPlayer, m_PlayersInQueue, and WorldSession::SendBfInvitePlayerToQueue().
Referenced by HandlePlayerEnterZone(), InvitePlayersInZoneToQueue(), and npc_wg_queue::OnGossipSelect().
| void Battlefield::InvitePlayerToWar | ( | Player * | player | ) |
Definition at line 260 of file Battlefield.cpp.
References Player::GetBattleground(), GameTime::GetGameTime(), Object::GetGUID(), Unit::GetLevel(), Player::GetSession(), Player::GetTeamId(), Unit::IsInFlight(), m_BattleId, m_InvitedPlayers, m_MinLevel, m_PlayersInWar, m_PlayersWillBeKick, m_TimeForAcceptInvite, m_ZoneId, and WorldSession::SendBfInvitePlayerToWar().
Referenced by HandlePlayerEnterZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), and npc_wg_queue::OnGossipSelect().
|
inline |
Return if battlefield is enable.
Definition at line 266 of file Battlefield.h.
Referenced by bf_commandscript::HandleBattlefieldEnable(), BattlefieldMgr::HandlePlayerEnterZone(), condition_is_wintergrasp_horde::OnConditionCheck(), condition_is_wintergrasp_alliance::OnConditionCheck(), and BattlefieldWG::SetupBattlefield().
|
inline |
Return true if battle is start, false if battle is not started.
Definition at line 261 of file Battlefield.h.
Referenced by BattlefieldWG::FillInitialWorldStates(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), BattlefieldWG::OnCreatureCreate(), npc_wg_queue::OnGossipHello(), npc_wg_queue::OnGossipSelect(), BattlefieldWG::OnUnitDeath(), PlayerAcceptInviteToWar(), BattlefieldWG::ProcessEvent(), and Update().
|
protected |
Definition at line 297 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), KickPlayerFromBattlefield(), m_PlayersInWar, and PVP_TEAMS_COUNT.
Referenced by Update().
| void Battlefield::KickPlayerFromBattlefield | ( | ObjectGuid | guid | ) |
Kick player from battlefield and teleport him to kick-point location.
| guid | : guid of player who must be kick |
Definition at line 306 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), GetZoneId(), and KickPosition.
Referenced by WorldSession::HandleBfEntryInviteResponse(), KickAfkPlayers(), and Update().
|
inlinevirtual |
Called at the end of battle.
Reimplemented in BattlefieldWG.
Definition at line 326 of file Battlefield.h.
Referenced by EndBattle().
|
inlinevirtual |
Called on start.
Reimplemented in BattlefieldWG.
Definition at line 324 of file Battlefield.h.
Referenced by StartBattle().
|
inlinevirtual |
Called when a player enter in battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 336 of file Battlefield.h.
Referenced by HandlePlayerEnterZone().
|
inlinevirtual |
Called when a player accept to join the battle.
Reimplemented in BattlefieldWG.
Definition at line 330 of file Battlefield.h.
Referenced by PlayerAcceptInviteToWar().
|
inlinevirtual |
Called when a player leave the battle.
Reimplemented in BattlefieldWG.
Definition at line 332 of file Battlefield.h.
Referenced by HandlePlayerLeaveZone().
|
inlinevirtual |
Called when a player leave battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 334 of file Battlefield.h.
Referenced by HandlePlayerLeaveZone().
|
inlinevirtual |
Called x minutes before battle start when player in zone are invite to join queue.
Reimplemented in BattlefieldWG.
Definition at line 328 of file Battlefield.h.
Referenced by Update().
|
delete |
|
delete |
| void Battlefield::PlayerAcceptInviteToQueue | ( | Player * | player | ) |
Definition at line 363 of file Battlefield.cpp.
References Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), m_BattleId, m_PlayersInQueue, m_ZoneId, and WorldSession::SendBfQueueInviteResponse().
Referenced by WorldSession::HandleBfQueueInviteResponse().
| void Battlefield::PlayerAcceptInviteToWar | ( | Player * | player | ) |
Definition at line 387 of file Battlefield.cpp.
References AddOrSetPlayerToCorrectBfGroup(), Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), Player::isAFK(), IsWarTime(), m_BattleId, m_InvitedPlayers, m_PlayersInWar, OnPlayerJoinWar(), WorldSession::SendBfEntered(), and Player::ToggleAFK().
Referenced by WorldSession::HandleBfEntryInviteResponse().
| void Battlefield::PlayerAskToLeave | ( | Player * | player | ) |
Definition at line 379 of file Battlefield.cpp.
References Player::TeleportTo().
|
protected |
Definition at line 489 of file Battlefield.cpp.
References sBattlefieldMgr.
Referenced by BattlefieldWG::SetupBattlefield().
| void Battlefield::RemovePlayerFromResurrectQueue | ( | ObjectGuid | player_guid | ) |
Definition at line 636 of file Battlefield.cpp.
References HasPlayer(), and m_GraveyardList.
Referenced by HandlePlayerLeaveZone().
| void Battlefield::SendAreaSpiritHealerQueryOpcode | ( | Player * | player, |
| ObjectGuid | guid | ||
| ) |
| void Battlefield::SendInitWorldStatesTo | ( | Player * | player | ) |
Definition at line 451 of file Battlefield.cpp.
References WorldPackets::WorldState::InitWorldStates::AreaID, FillInitialWorldStates(), WorldObject::GetAreaId(), m_MapId, m_ZoneId, WorldPackets::WorldState::InitWorldStates::MapID, Player::SendDirectMessage(), WorldPackets::WorldState::InitWorldStates::SubareaID, and WorldPackets::WorldState::InitWorldStates::Write().
Referenced by BattlefieldWG::OnBattleStart(), BattlefieldWG::OnPlayerEnterZone(), BattlefieldWG::OnPlayerJoinWar(), and BattlefieldWG::SendInitWorldStatesToAll().
|
pure virtual |
Send all worldstate data to all player in zone.
Implemented in BattlefieldWG.
Referenced by EndBattle(), and bf_commandscript::HandleBattlefieldTimer().
|
inlineprotectedvirtual |
Definition at line 425 of file Battlefield.h.
Referenced by HandlePlayerLeaveZone().
Update data of a worldstate to all players present in zone.
Definition at line 462 of file Battlefield.cpp.
References BroadcastPacketToZone(), WorldPackets::WorldState::UpdateWorldState::Value, WorldPackets::WorldState::UpdateWorldState::VariableID, and WorldPackets::WorldState::UpdateWorldState::Write().
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Destroyed(), WintergraspWorkshop::GiveControlTo(), BfWGGameObjectBuilding::Rebuild(), and BattlefieldWG::UpdateVehicleCountWG().
| void Battlefield::SendWarning | ( | uint8 | id, |
| WorldObject const * | target = nullptr |
||
| ) |
Definition at line 445 of file Battlefield.cpp.
References GetCreature(), sCreatureTextMgr, and StalkerGuid.
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Destroyed(), WintergraspWorkshop::GiveControlTo(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), and BattlefieldWG::OnStartGrouping().
Reimplemented from ZoneScript.
Definition at line 285 of file Battlefield.h.
Referenced by BattlefieldWG::OnBattleStart(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::UpdateCounterVehicle().
Reimplemented from ZoneScript.
Definition at line 281 of file Battlefield.h.
|
inline |
Definition at line 292 of file Battlefield.h.
Referenced by EndBattle().
|
inline |
Definition at line 311 of file Battlefield.h.
Referenced by BattlefieldWG::SetupBattlefield().
|
inline |
Definition at line 366 of file Battlefield.h.
Referenced by bf_commandscript::HandleBattlefieldTimer().
|
inlinevirtual |
Call this to init the Battlefield.
Reimplemented in BattlefieldWG.
Definition at line 229 of file Battlefield.h.
Referenced by BattlefieldMgr::InitBattlefield().
| void Battlefield::ShowNpc | ( | Creature * | creature, |
| bool | aggressive | ||
| ) |
Definition at line 504 of file Battlefield.cpp.
References Unit::IsAlive(), REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveUnitFlag(), Creature::Respawn(), Creature::SetPhaseMask(), Creature::SetReactState(), Unit::SetUnitFlag(), Unit::SetVisible(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_UNINTERACTIBLE.
Referenced by BattlefieldWG::OnBattleStart(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Definition at line 796 of file Battlefield.cpp.
References Map::AddToMap(), Creature::Create(), Map::GenerateLowGuid(), m_MapId, PHASEMASK_NORMAL, WorldObject::setActive(), WorldObject::SetFarVisible(), Creature::SetHomePosition(), sMapMgr, TC_LOG_ERROR, and Unit.
Referenced by BfWGGameObjectBuilding::Init(), InitStalker(), and BattlefieldWG::SetupBattlefield().
| GameObject * Battlefield::SpawnGameObject | ( | uint32 | entry, |
| Position const & | pos, | ||
| QuaternionData const & | rot | ||
| ) |
Definition at line 825 of file Battlefield.cpp.
References Map::AddToMap(), GameObject::Create(), GameObject, Map::GenerateLowGuid(), GO_STATE_READY, m_MapId, PHASEMASK_NORMAL, WorldObject::setActive(), WorldObject::SetFarVisible(), sMapMgr, and TC_LOG_ERROR.
Referenced by BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleStart(), and BattlefieldWG::SetupBattlefield().
| void Battlefield::StartBattle | ( | ) |
Definition at line 313 of file Battlefield.cpp.
References InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), m_BattleTime, m_Groups, m_isActive, m_PlayersInWar, m_Timer, OnBattleStart(), and PVP_TEAMS_COUNT.
Referenced by bf_commandscript::HandleBattlefieldStart(), and Update().
Definition at line 405 of file Battlefield.cpp.
References ObjectAccessor::FindPlayer(), and m_PlayersInWar.
|
inline |
Enable or Disable battlefield.
Definition at line 264 of file Battlefield.h.
Referenced by bf_commandscript::HandleBattlefieldEnable().
|
virtual |
Called every time for update bf data and time.
| diff | : time ellapsed since last call (in ms) |
Reimplemented in BattlefieldWG.
Definition at line 134 of file Battlefield.cpp.
References EndBattle(), GameTime::GetGameTime(), GetGraveyardById(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), IsWarTime(), KickAfkPlayers(), KickPlayerFromBattlefield(), m_capturePoints, m_GraveyardList, m_InvitedPlayers, m_LastResurrectTimer, m_PlayersWillBeKick, m_StartGrouping, m_StartGroupingTimer, m_Timer, m_uiKickAfkPlayersTimer, m_uiKickDontAcceptTimer, OnStartGrouping(), PVP_TEAMS_COUNT, RESURRECTION_INTERVAL, and StartBattle().
Referenced by BattlefieldWG::Update().
Definition at line 286 of file Battlefield.h.
|
friend |
Definition at line 212 of file Battlefield.h.
|
protected |
Definition at line 406 of file Battlefield.h.
Referenced by KickPlayerFromBattlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 394 of file Battlefield.h.
Referenced by Battlefield(), HandlePlayerLeaveZone(), InvitePlayerToQueue(), InvitePlayerToWar(), PlayerAcceptInviteToQueue(), PlayerAcceptInviteToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 401 of file Battlefield.h.
Referenced by Battlefield(), BattlefieldWG::SetupBattlefield(), and StartBattle().
|
protected |
Definition at line 383 of file Battlefield.h.
Referenced by AddCapturePoint(), GetCapturePoint(), HandlePlayerLeaveZone(), Update(), and ~Battlefield().
|
protected |
Definition at line 420 of file Battlefield.h.
Referenced by BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 419 of file Battlefield.h.
|
protected |
Definition at line 380 of file Battlefield.h.
Referenced by Battlefield(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnPlayerEnterZone(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::Update().
|
protected |
Definition at line 411 of file Battlefield.h.
Referenced by AddPlayerToResurrectQueue(), GetClosestGraveyard(), GetGraveyardById(), BattlefieldWG::OnCreatureCreate(), RemovePlayerFromResurrectQueue(), BattlefieldWG::SetupBattlefield(), Update(), and ~Battlefield().
|
protected |
Definition at line 417 of file Battlefield.h.
Referenced by AddOrSetPlayerToCorrectBfGroup(), GetFreeBfRaid(), GetGroupPlayer(), and StartBattle().
|
protected |
Definition at line 389 of file Battlefield.h.
Referenced by HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), PlayerAcceptInviteToWar(), and Update().
|
protected |
Definition at line 379 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), BattlefieldWG::OnPlayerEnterZone(), BattlefieldWG::OnPlayerLeaveZone(), BattlefieldWG::PromotePlayer(), BattlefieldWG::SetupBattlefield(), StartBattle(), and BattlefieldWG::Update().
|
protected |
Definition at line 378 of file Battlefield.h.
Referenced by Battlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 412 of file Battlefield.h.
Referenced by Battlefield(), SendAreaSpiritHealerQueryOpcode(), and Update().
|
protected |
Definition at line 397 of file Battlefield.h.
Referenced by Battlefield(), GetCreature(), GetGameObject(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 396 of file Battlefield.h.
Referenced by Battlefield(), SendInitWorldStatesTo(), BattlefieldWG::SetupBattlefield(), SpawnCreature(), and SpawnGameObject().
|
protected |
Definition at line 398 of file Battlefield.h.
Referenced by Battlefield(), HandlePlayerEnterZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 400 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToWar(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 399 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToQueue(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 402 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 386 of file Battlefield.h.
Referenced by BroadcastPacketToZone(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), HasPlayer(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::SendInitWorldStatesToAll(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 387 of file Battlefield.h.
Referenced by AskToLeaveQueue(), BroadcastPacketToQueue(), InvitePlayersInQueueToWar(), InvitePlayerToQueue(), and PlayerAcceptInviteToQueue().
|
protected |
Definition at line 388 of file Battlefield.h.
Referenced by BroadcastPacketToWar(), BattlefieldWG::BrokenWallOrTower(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), BattlefieldWG::HandlePromotion(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), KickAfkPlayers(), BattlefieldWG::OnBattleEnd(), PlayerAcceptInviteToWar(), StartBattle(), TeamCastSpell(), BattlefieldWG::UpdatedDestroyedTowerCount(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 390 of file Battlefield.h.
Referenced by HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), and Update().
|
protected |
Definition at line 403 of file Battlefield.h.
Referenced by Battlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 415 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Definition at line 414 of file Battlefield.h.
Referenced by Battlefield(), HandlePlayerEnterZone(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Definition at line 404 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 377 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), BattlefieldWG::FillInitialWorldStates(), HandlePlayerEnterZone(), BattlefieldWG::SetupBattlefield(), StartBattle(), Update(), BattlefieldWG::Update(), and BattlefieldWG::UpdatedDestroyedTowerCount().
|
protected |
Definition at line 393 of file Battlefield.h.
Referenced by Battlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 408 of file Battlefield.h.
Referenced by Battlefield(), and Update().
|
protected |
Definition at line 405 of file Battlefield.h.
Referenced by Battlefield(), and Update().
|
protected |
Definition at line 395 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToWar(), BattlefieldWG::OnPlayerJoinWar(), PlayerAcceptInviteToQueue(), SendInitWorldStatesTo(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 376 of file Battlefield.h.
Referenced by InitStalker(), BattlefieldWG::PromotePlayer(), and SendWarning().