|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <Battlefield.h>
Public Types | |
| typedef std::map< uint32, BfCapturePoint * > | BfCapturePointMap |
| typedef of map witch store capturepoint and the associate gameobject entry | |
Public Member Functions | |
| bool | AddOrSetPlayerToCorrectBfGroup (Player *player) |
| Force player to join a battlefield group. | |
| virtual void | AddPlayerToResurrectQueue (uint64 npc_guid, uint64 player_guid) |
| void | AskToLeaveQueue (Player *player) |
| Battlefield () | |
| Constructor. | |
| bool | CanFlyIn () const |
| Return if we can use mount in battlefield. | |
| virtual void | DoCompleteOrIncrementAchievement (uint32, Player *, uint8) |
| void | DoPlaySoundToAll (uint32 SoundID) |
| void | EndBattle (bool endByTimer) |
| virtual void | FillInitialWorldStates (WorldStateBuilder &)=0 |
| TeamId | GetAttackerTeam () const |
| uint32 | GetBattleId () const |
| WorldSafeLocsEntry const * | GetClosestGraveYard (Player *player) |
| Creature * | GetCreature (uint64 GUID) |
| virtual uint32 | GetData (uint32 dataId) const |
| virtual uint64 | GetData64 (uint32 dataId) const |
| TeamId | GetDefenderTeam () const |
| Group * | GetFreeBfRaid (TeamIdTeamId TeamIdTeamId) |
| Find a not full battlefield group, if there is no, create one. | |
| GameObject * | GetGameObject (uint64 GUID) |
| BfGraveyard * | GetGraveyardById (uint32 id) const |
| GraveyardVect | GetGraveyardVector () |
| Group * | GetGroupPlayer (uint64 guid, TeamIdTeamId TeamIdTeamId) |
| Return battlefield group where player is. | |
| uint64 | GetGUID () const |
| TeamId | GetOtherTeam (TeamId team) |
| uint32 | GetTimer () const |
| uint32 | GetTypeId () const |
| uint32 | GetZoneId () const |
| virtual void | HandleKill (Player *, Unit *) |
| Called when a Unit is kill in battlefield zone. | |
| 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. | |
| void | HideNpc (Creature *creature) |
| void | InitStalker (uint32 entry, float x, float y, float z, float o) |
| void | InvitePlayersInQueueToWar () |
| Invite all players in queue to join battle on battle start. | |
| void | InvitePlayersInZoneToQueue () |
| Invite all players in zone to join the queue, called x minutes before battle start in Update(). | |
| void | InvitePlayersInZoneToWar () |
| Invite all players in zone to join battle on battle start. | |
| void | InvitePlayerToQueue (Player *player) |
| void | InvitePlayerToWar (Player *player) |
| bool | IsEnabled () const |
| Return if battlefield is enable. | |
| bool | IsWarTime () const |
| Return true if battle is start, false if battle is not started. | |
| void | KickPlayerFromBattlefield (uint64 guid) |
| Kick player from battlefield and teleport him to kick-point location. | |
| virtual void | OnBattleEnd (bool) |
| Called at the end of battle. | |
| virtual void | OnBattleStart () |
| Called on start. | |
| virtual void | OnPlayerEnterZone (Player *) |
| Called when a player enter in battlefield zone. | |
| 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 | OnStartGrouping () |
| Called x minutes before battle start when player in zone are invite to join queue. | |
| void | PlayerAcceptInviteToQueue (Player *player) |
| void | PlayerAcceptInviteToWar (Player *player) |
| void | RemovePlayerFromResurrectQueue (uint64 player_guid) |
| void | SendAreaSpiritHealerQueryOpcode (Player *player, uint64 guid) |
| virtual void | SendInitWorldStatesToAll ()=0 |
| Send all worldstate data to all player in zone. | |
| void | SendUpdateWorldState (uint32 field, uint32 value) |
| Update data of a worldstate to all players present in zone. | |
| void | SendWarningToAllInZone (uint32 entry) |
| void | SendWarningToPlayer (Player *player, uint32 entry) |
| virtual void | SetData (uint32 dataId, uint32 value) |
| virtual void | SetData64 (uint32 dataId, uint64 value) |
| void | SetDefenderTeam (TeamId team) |
| void | SetGraveyardNumber (uint32 number) |
| void | SetTimer (uint32 timer) |
| virtual bool | SetupBattlefield () |
| Call this to init the Battlefield. | |
| void | ShowNpc (Creature *creature, bool aggressive) |
| Creature * | SpawnCreature (uint32 entry, const Position &pos, TeamId team) |
| Creature * | SpawnCreature (uint32 entry, float x, float y, float z, float o, TeamId team) |
| GameObject * | SpawnGameObject (uint32 entry, float x, float y, float z, float o) |
| void | StartBattle () |
| void | TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0) |
| void | ToggleBattlefield (bool enable) |
| Enable or Disable battlefield. | |
| virtual bool | Update (uint32 diff) |
| Called every time for update bf data and time. | |
| virtual void | UpdateData (uint32 index, int32 pad) |
| virtual | ~Battlefield () |
| Destructor. | |
| Public Member Functions inherited from ZoneScript | |
| virtual uint32 | GetCreatureEntry (uint32, CreatureData const *data) |
| virtual uint32 | GetGameObjectEntry (uint32, uint32 entry) |
| virtual void | OnCreatureCreate (Creature *) |
| virtual void | OnCreatureRemove (Creature *) |
| virtual void | OnGameObjectCreate (GameObject *) |
| virtual void | OnGameObjectRemove (GameObject *) |
| virtual void | OnUnitDeath (Unit *) |
| virtual void | ProcessEvent (WorldObject *, uint32) |
| ZoneScript () | |
| virtual | ~ZoneScript () |
Protected Member Functions | |
| void | AddCapturePoint (BfCapturePoint *cp) |
| void | BroadcastPacketToQueue (WorldPacket &data) const |
| void | BroadcastPacketToWar (WorldPacket &data) const |
| void | BroadcastPacketToZone (WorldPacket &data) const |
| BfCapturePoint * | GetCapturePoint (uint32 lowguid) const |
| bool | HasPlayer (Player *player) const |
| void | KickAfkPlayers () |
| void | RegisterZone (uint32 zoneid) |
| virtual void | SendRemoveWorldStates (Player *) |
| void | TeamCastSpell (TeamId team, int32 spellId) |
Friends | |
| class | BattlefieldMgr |
Definition at line 183 of file Battlefield.h.
| typedef std::map<uint32 , BfCapturePoint*> Battlefield::BfCapturePointMap |
typedef of map witch store capturepoint and the associate gameobject entry
Definition at line 197 of file Battlefield.h.
|
inline |
Constructor.
Definition at line 189 of file Battlefield.h.
References m_BattleId, m_BattleTime, m_DefenderTeam, m_Guid, m_isActive, m_IsEnabled, m_LastResurectTimer, 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, StalkerGuid, and TEAM_NEUTRAL.
|
virtual |
Destructor.
Definition at line 22 of file Battlefield.cpp.
References m_capturePoints, and m_GraveyardList.
|
inlineprotected |
Definition at line 407 of file Battlefield.h.
References BfCapturePoint::GetCapturePointEntry(), and m_capturePoints.
Referenced by BattlefieldWG::OnGameObjectCreate().
| bool Battlefield::AddOrSetPlayerToCorrectBfGroup | ( | Player * | player | ) |
Force player to join a battlefield group.
Definition at line 483 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().
Definition at line 561 of file Battlefield.cpp.
References m_GraveyardList.
| void Battlefield::AskToLeaveQueue | ( | Player * | player | ) |
Definition at line 342 of file Battlefield.cpp.
References Object::GetGUID(), Player::GetTeamId(), and m_PlayersInQueue.
|
protected |
Definition at line 391 of file Battlefield.cpp.
References BG_TEAMS_COUNT, m_PlayersInQueue, and sObjectAccessor.
|
protected |
Definition at line 399 of file Battlefield.cpp.
References BG_TEAMS_COUNT, m_PlayersInWar, and sObjectAccessor.
|
protected |
Definition at line 383 of file Battlefield.cpp.
References BG_TEAMS_COUNT, m_players, and sObjectAccessor.
|
inline |
Return if we can use mount in battlefield.
Definition at line 325 of file Battlefield.h.
References m_isActive.
Referenced by Spell::CheckCast(), and SpellArea::IsFitToRequirements().
|
inlinevirtual |
Reimplemented in BattlefieldWG.
Definition at line 318 of file Battlefield.h.
| void Battlefield::DoPlaySoundToAll | ( | uint32 | SoundID | ) |
Definition at line 315 of file Battlefield.cpp.
References BG_TEAMS_COUNT, m_PlayersInWar, SMSG_PLAY_SOUND, sObjectAccessor, and ByteBuffer::WriteBits().
Referenced by EndBattle(), and StartBattle().
| void Battlefield::EndBattle | ( | bool | endByTimer | ) |
Definition at line 291 of file Battlefield.cpp.
References BF_ALLIANCE_WINS, BF_HORDE_WINS, DoPlaySoundToAll(), GetAttackerTeam(), GetDefenderTeam(), m_isActive, m_NoWarBattleTime, m_StartGrouping, m_Timer, OnBattleEnd(), SendInitWorldStatesToAll(), SetDefenderTeam(), and TEAM_ALLIANCE.
Referenced by bf_commandscript::HandleBattlefieldEnd(), bf_commandscript::HandleBattlefieldSwitch(), BattlefieldWG::ProcessEvent(), and Update().
|
pure virtual |
Implemented in BattlefieldWG.
Referenced by Player::SendInitWorldStates().
|
inline |
Definition at line 260 of file Battlefield.h.
References m_DefenderTeam.
Referenced by EndBattle(), BattlefieldWG::FillInitialWorldStates(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::OnGameObjectCreate(), npc_wg_quest_giver::OnGossipHello(), BattlefieldWG::OnPlayerJoinWar(), BattlefieldWG::SetupBattlefield(), BattlefieldWG::UpdateDamagedTowerCount(), and BattlefieldWG::UpdatedDestroyedTowerCount().
|
inline |
Definition at line 315 of file Battlefield.h.
References m_BattleId.
|
inlineprotected |
Definition at line 409 of file Battlefield.h.
References m_capturePoints.
| WorldSafeLocsEntry const * Battlefield::GetClosestGraveYard | ( | Player * | player | ) |
Definition at line 535 of file Battlefield.cpp.
References BfGraveyard::GetGraveyardId(), Player::GetTeamId(), m_GraveyardList, and sWorldSafeLocsStore.
Definition at line 806 of file Battlefield.cpp.
References m_Map.
Referenced by BattlefieldWG::HandleKill(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), SendWarningToAllInZone(), SendWarningToPlayer(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::UpdateTenacity().
Reimplemented from ZoneScript.
Reimplemented in BattlefieldWG.
Definition at line 254 of file Battlefield.h.
References m_Data32.
Referenced by npc_wg_demolisher_engineer::CanBuild(), BattlefieldWG::GetData(), and SpellArea::IsFitToRequirements().
|
inline |
Definition at line 259 of file Battlefield.h.
References m_DefenderTeam.
Referenced by EndBattle(), BattlefieldWG::FillInitialWorldStates(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), npc_wg_quest_giver::OnGossipHello(), npc_wg_queue::OnGossipHello(), BattlefieldWG::OnPlayerJoinWar(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::UpdatedDestroyedTowerCount().
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 463 of file Battlefield.cpp.
References m_Groups, and sGroupMgr.
Referenced by AddOrSetPlayerToCorrectBfGroup().
| GameObject * Battlefield::GetGameObject | ( | uint64 | GUID | ) |
Definition at line 813 of file Battlefield.cpp.
References m_Map.
Referenced by BattlefieldWG::GetRelic(), BattlefieldWG::OnBattleEnd(), and BattlefieldWG::ProcessEvent().
| BfGraveyard * Battlefield::GetGraveyardById | ( | uint32 | id | ) | const |
Definition at line 520 of file Battlefield.cpp.
References m_GraveyardList, and SF_LOG_ERROR.
Referenced by BattlefieldWG::GetData(), BattlefieldWG::OnBattleEnd(), and Update().
|
inline |
Definition at line 335 of file Battlefield.h.
References m_GraveyardList.
Referenced by npc_wg_spirit_guide::OnGossipHello(), and npc_wg_spirit_guide::OnGossipSelect().
Return battlefield group where player is.
Definition at line 473 of file Battlefield.cpp.
|
inline |
Definition at line 226 of file Battlefield.h.
References m_Guid.
Definition at line 261 of file Battlefield.h.
References TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlefieldWG::HandleKill(), and InvitePlayerToQueue().
|
inline |
Definition at line 337 of file Battlefield.h.
References m_Timer.
Referenced by BattlefieldWG::OnBattleEnd(), npc_wg_queue::OnGossipHello(), and npc_wg_queue::OnGossipSelect().
|
inline |
Definition at line 224 of file Battlefield.h.
References m_TypeId.
Referenced by BattlefieldMgr::HandlePlayerEnterZone(), SpellArea::IsFitToRequirements(), and Player::SendInitWorldStates().
|
inline |
Definition at line 225 of file Battlefield.h.
References m_ZoneId.
Referenced by WorldSession::HandleBfEntryInviteResponse(), and KickPlayerFromBattlefield().
Called when a Unit is kill in battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 222 of file Battlefield.h.
Called when player (player) enter in zone.
Definition at line 32 of file Battlefield.cpp.
References 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 61 of file Battlefield.cpp.
References Player::GetGroup(), Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), IsWarTime(), m_capturePoints, m_Guid, m_InvitedPlayers, m_players, m_PlayersInWar, m_PlayersWillBeKick, OnPlayerLeaveWar(), OnPlayerLeaveZone(), RemovePlayerFromResurrectQueue(), WorldSession::SendBfLeaveMessage(), and SendRemoveWorldStates().
|
protected |
Definition at line 327 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 434 of file Battlefield.cpp.
References Unit::CombatStop(), Creature::DisappearAndDie(), REACT_PASSIVE, Object::SetFlag(), Unit::SetPhaseMask(), Creature::SetReactState(), Unit::SetVisible(), UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.
Referenced by BattlefieldWG::OnBattleEnd(), and BattlefieldWG::SetupBattlefield().
| void Battlefield::InitStalker | ( | uint32 | entry, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | o ) |
Definition at line 245 of file Battlefield.cpp.
References SF_LOG_ERROR, SpawnCreature(), StalkerGuid, and TEAM_NEUTRAL.
Referenced by BattlefieldWG::SetupBattlefield().
| void Battlefield::InvitePlayersInQueueToWar | ( | ) |
Invite all players in queue to join battle on battle start.
Definition at line 176 of file Battlefield.cpp.
References BG_TEAMS_COUNT, InvitePlayerToWar(), m_InvitedPlayers, m_MaxPlayer, m_PlayersInQueue, m_PlayersInWar, and sObjectAccessor.
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 159 of file Battlefield.cpp.
References InvitePlayerToQueue(), m_players, and sObjectAccessor.
Referenced by Update().
| void Battlefield::InvitePlayersInZoneToWar | ( | ) |
Invite all players in zone to join battle on battle start.
Definition at line 196 of file Battlefield.cpp.
References BG_TEAMS_COUNT, InvitePlayerToWar(), m_InvitedPlayers, m_MaxPlayer, m_players, m_PlayersInWar, m_PlayersWillBeKick, and sObjectAccessor.
Referenced by StartBattle(), and Update().
| void Battlefield::InvitePlayerToQueue | ( | Player * | player | ) |
Definition at line 167 of file Battlefield.cpp.
References Object::GetGUID(), GetOtherTeam(), Player::GetSession(), Player::GetTeamId(), m_Guid, m_MinPlayer, m_PlayersInQueue, and WorldSession::SendBfInvitePlayerToQueue().
Referenced by HandlePlayerEnterZone(), InvitePlayersInZoneToQueue(), and npc_wg_queue::OnGossipSelect().
| void Battlefield::InvitePlayerToWar | ( | Player * | player | ) |
Definition at line 213 of file Battlefield.cpp.
References Player::GetBattleground(), Object::GetGUID(), Unit::getLevel(), Player::GetSession(), Player::GetTeamId(), Player::InArena(), Unit::IsInFlight(), m_Guid, m_InvitedPlayers, m_MinLevel, m_PlayersInQueue, 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 236 of file Battlefield.h.
References m_IsEnabled.
Referenced by bf_commandscript::HandleBattlefieldEnable(), BattlefieldMgr::HandlePlayerEnterZone(), and BattlefieldWG::SetupBattlefield().
|
inline |
Return true if battle is start, false if battle is not started.
Definition at line 231 of file Battlefield.h.
References m_isActive.
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 253 of file Battlefield.cpp.
References BG_TEAMS_COUNT, KickPlayerFromBattlefield(), m_PlayersInWar, and sObjectAccessor.
Referenced by Update().
| void Battlefield::KickPlayerFromBattlefield | ( | uint64 | guid | ) |
Kick player from battlefield and teleport him to kick-point location.
| guid | : guid of player who must be kick |
Definition at line 262 of file Battlefield.cpp.
References GetZoneId(), KickPosition, and sObjectAccessor.
Referenced by WorldSession::HandleBfEntryInviteResponse(), KickAfkPlayers(), and Update().
|
inlinevirtual |
Called at the end of battle.
Reimplemented in BattlefieldWG.
Definition at line 297 of file Battlefield.h.
Referenced by EndBattle().
|
inlinevirtual |
Called on start.
Reimplemented in BattlefieldWG.
Definition at line 295 of file Battlefield.h.
Referenced by StartBattle().
|
inlinevirtual |
Called when a player enter in battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 307 of file Battlefield.h.
Referenced by HandlePlayerEnterZone().
|
inlinevirtual |
Called when a player accept to join the battle.
Reimplemented in BattlefieldWG.
Definition at line 301 of file Battlefield.h.
Referenced by PlayerAcceptInviteToWar().
|
inlinevirtual |
Called when a player leave the battle.
Reimplemented in BattlefieldWG.
Definition at line 303 of file Battlefield.h.
Referenced by HandlePlayerLeaveZone().
|
inlinevirtual |
Called when a player leave battlefield zone.
Reimplemented in BattlefieldWG.
Definition at line 305 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 299 of file Battlefield.h.
Referenced by Update().
| void Battlefield::PlayerAcceptInviteToQueue | ( | Player * | player | ) |
Definition at line 333 of file Battlefield.cpp.
References Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), m_Guid, m_PlayersInQueue, m_ZoneId, and WorldSession::SendBfQueueInviteResponse().
Referenced by WorldSession::HandleBfQueueInviteResponse().
| void Battlefield::PlayerAcceptInviteToWar | ( | Player * | player | ) |
Definition at line 349 of file Battlefield.cpp.
References AddOrSetPlayerToCorrectBfGroup(), Object::GetGUID(), Player::GetSession(), Player::GetTeamId(), Player::isAFK(), IsWarTime(), m_Guid, m_InvitedPlayers, m_PlayersInWar, OnPlayerJoinWar(), WorldSession::SendBfEntered(), and Player::ToggleAFK().
Referenced by WorldSession::HandleBfEntryInviteResponse().
|
protected |
Definition at line 429 of file Battlefield.cpp.
References sBattlefieldMgr.
Referenced by BattlefieldWG::SetupBattlefield().
| void Battlefield::RemovePlayerFromResurrectQueue | ( | uint64 | player_guid | ) |
Definition at line 576 of file Battlefield.cpp.
References HasPlayer(), and m_GraveyardList.
Referenced by HandlePlayerLeaveZone().
Definition at line 591 of file Battlefield.cpp.
References ASSERT, Player::GetSession(), m_LastResurectTimer, WorldSession::SendPacket(), SMSG_AREA_SPIRIT_HEALER_TIME, ByteBuffer::WriteGuidBytes(), and ByteBuffer::WriteGuidMask().
|
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 399 of file Battlefield.h.
Referenced by HandlePlayerLeaveZone().
Update data of a worldstate to all players present in zone.
Definition at line 421 of file Battlefield.cpp.
References BG_TEAMS_COUNT, m_players, and sObjectAccessor.
Referenced by BattlefieldWG::UpdateVehicleCountWG().
| void Battlefield::SendWarningToAllInZone | ( | uint32 | entry | ) |
Definition at line 407 of file Battlefield.cpp.
References CHAT_MSG_BG_SYSTEM_NEUTRAL, GetCreature(), LANG_ADDON, sCreatureTextMgr, StalkerGuid, and TEXT_RANGE_ZONE.
Referenced by BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), and BattlefieldWG::OnStartGrouping().
Definition at line 414 of file Battlefield.cpp.
References GetCreature(), sCreatureTextMgr, and StalkerGuid.
Referenced by BattlefieldWG::PromotePlayer().
|
inline |
|
inline |
Definition at line 281 of file Battlefield.h.
References m_GraveyardList.
Referenced by BattlefieldWG::SetupBattlefield().
|
inline |
Definition at line 338 of file Battlefield.h.
References m_Timer.
Referenced by bf_commandscript::HandleBattlefieldTimer().
|
inlinevirtual |
Call this to init the Battlefield.
Reimplemented in BattlefieldWG.
Definition at line 200 of file Battlefield.h.
Referenced by BattlefieldMgr::InitBattlefield().
| void Battlefield::ShowNpc | ( | Creature * | creature, |
| bool | aggressive ) |
Definition at line 444 of file Battlefield.cpp.
References Unit::IsAlive(), REACT_AGGRESSIVE, REACT_PASSIVE, Object::RemoveFlag(), Creature::Respawn(), Object::SetFlag(), Unit::SetPhaseMask(), Creature::SetReactState(), Unit::SetVisible(), UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.
Referenced by BattlefieldWG::OnBattleEnd(), and BattlefieldWG::OnBattleStart().
Definition at line 736 of file Battlefield.cpp.
References Position::m_orientation, Position::m_positionX, Position::m_positionY, Position::m_positionZ, and SpawnCreature().
| Creature * Battlefield::SpawnCreature | ( | uint32 | entry, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | o, | ||
| TeamId | team ) |
Definition at line 741 of file Battlefield.cpp.
References Map::AddToMap(), Creature::Create(), HIGHGUID_UNIT, m_MapId, MOVE_RUN, MOVE_WALK, WorldObject::setActive(), Creature::SetHomePosition(), Unit::SetSpeed(), SF_LOG_ERROR, sMapMgr, sObjectMgr, CreatureTemplate::speed_run, and CreatureTemplate::speed_walk.
Referenced by InitStalker(), BattlefieldWG::SetupBattlefield(), and SpawnCreature().
| GameObject * Battlefield::SpawnGameObject | ( | uint32 | entry, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | o ) |
Definition at line 779 of file Battlefield.cpp.
References Map::AddToMap(), GameObject::Create(), WorldObject::GetPhases(), GO_STATE_READY, HIGHGUID_GAMEOBJECT, WorldObject::setActive(), GameObject::SetPhased(), SF_LOG_ERROR, sMapMgr, and sObjectMgr.
Referenced by BattlefieldWG::OnBattleStart(), and BattlefieldWG::SetupBattlefield().
| void Battlefield::StartBattle | ( | ) |
Definition at line 269 of file Battlefield.cpp.
References BF_START, BG_TEAMS_COUNT, DoPlaySoundToAll(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), m_BattleTime, m_Groups, m_isActive, m_PlayersInWar, m_Timer, and OnBattleStart().
Referenced by bf_commandscript::HandleBattlefieldStart(), and Update().
Definition at line 367 of file Battlefield.cpp.
References m_PlayersInWar, and sObjectAccessor.
|
inline |
Enable or Disable battlefield.
Definition at line 234 of file Battlefield.h.
References m_IsEnabled.
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 88 of file Battlefield.cpp.
References EndBattle(), GetGraveyardById(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), IsWarTime(), KickAfkPlayers(), KickPlayerFromBattlefield(), m_capturePoints, m_GraveyardList, m_InvitedPlayers, m_LastResurectTimer, m_PlayersWillBeKick, m_StartGrouping, m_StartGroupingTimer, m_Timer, m_uiKickAfkPlayersTimer, m_uiKickDontAcceptTimer, OnStartGrouping(), RESURRECTION_INTERVAL, and StartBattle().
Referenced by BattlefieldWG::Update().
Definition at line 256 of file Battlefield.h.
References m_Data32.
Referenced by BattlefieldWG::FindAndRemoveVehicleFromList(), BattlefieldWG::OnCreatureCreate(), BattlefieldWG::UpdateCounterVehicle(), BattlefieldWG::UpdateDamagedTowerCount(), and BattlefieldWG::UpdatedDestroyedTowerCount().
|
friend |
Definition at line 185 of file Battlefield.h.
References BattlefieldMgr.
Referenced by BattlefieldMgr.
|
protected |
Definition at line 380 of file Battlefield.h.
Referenced by KickPlayerFromBattlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 368 of file Battlefield.h.
Referenced by Battlefield(), GetBattleId(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 375 of file Battlefield.h.
Referenced by Battlefield(), BattlefieldWG::SetupBattlefield(), and StartBattle().
|
protected |
Definition at line 357 of file Battlefield.h.
Referenced by AddCapturePoint(), GetCapturePoint(), HandlePlayerLeaveZone(), Update(), and ~Battlefield().
|
protected |
Definition at line 394 of file Battlefield.h.
Referenced by GetData(), SetData(), BattlefieldWG::SetupBattlefield(), and UpdateData().
|
protected |
Definition at line 393 of file Battlefield.h.
Referenced by GetData64(), and SetData64().
|
protected |
Definition at line 354 of file Battlefield.h.
Referenced by Battlefield(), GetAttackerTeam(), GetDefenderTeam(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnPlayerEnterZone(), SetDefenderTeam(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::Update().
|
protected |
Definition at line 385 of file Battlefield.h.
Referenced by AddPlayerToResurrectQueue(), GetClosestGraveYard(), GetGraveyardById(), GetGraveyardVector(), BattlefieldWG::OnCreatureCreate(), RemovePlayerFromResurrectQueue(), SetGraveyardNumber(), BattlefieldWG::SetupBattlefield(), Update(), and ~Battlefield().
|
protected |
Definition at line 391 of file Battlefield.h.
Referenced by AddOrSetPlayerToCorrectBfGroup(), GetFreeBfRaid(), GetGroupPlayer(), and StartBattle().
|
protected |
Definition at line 348 of file Battlefield.h.
Referenced by Battlefield(), GetGUID(), HandlePlayerLeaveZone(), InvitePlayerToQueue(), InvitePlayerToWar(), PlayerAcceptInviteToQueue(), and PlayerAcceptInviteToWar().
|
protected |
Definition at line 363 of file Battlefield.h.
Referenced by HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), PlayerAcceptInviteToWar(), and Update().
|
protected |
Definition at line 353 of file Battlefield.h.
Referenced by Battlefield(), CanFlyIn(), EndBattle(), IsWarTime(), BattlefieldWG::OnPlayerEnterZone(), BattlefieldWG::OnPlayerLeaveZone(), BattlefieldWG::PromotePlayer(), BattlefieldWG::SetupBattlefield(), StartBattle(), and BattlefieldWG::Update().
|
protected |
Definition at line 352 of file Battlefield.h.
Referenced by Battlefield(), IsEnabled(), BattlefieldWG::SetupBattlefield(), and ToggleBattlefield().
|
protected |
Definition at line 386 of file Battlefield.h.
Referenced by Battlefield(), SendAreaSpiritHealerQueryOpcode(), and Update().
|
protected |
Definition at line 371 of file Battlefield.h.
Referenced by Battlefield(), GetCreature(), GetGameObject(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 370 of file Battlefield.h.
Referenced by Battlefield(), BattlefieldWG::SendInitWorldStatesTo(), BattlefieldWG::SetupBattlefield(), and SpawnCreature().
|
protected |
Definition at line 372 of file Battlefield.h.
Referenced by Battlefield(), HandlePlayerEnterZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 374 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToWar(), BattlefieldWG::SetupBattlefield(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 373 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToQueue(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 376 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 360 of file Battlefield.h.
Referenced by BroadcastPacketToZone(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), HasPlayer(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::SendInitWorldStatesToAll(), SendUpdateWorldState(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 361 of file Battlefield.h.
Referenced by AskToLeaveQueue(), BroadcastPacketToQueue(), InvitePlayersInQueueToWar(), InvitePlayerToQueue(), InvitePlayerToWar(), and PlayerAcceptInviteToQueue().
|
protected |
Definition at line 362 of file Battlefield.h.
Referenced by BroadcastPacketToWar(), DoPlaySoundToAll(), BattlefieldWG::HandleKill(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), KickAfkPlayers(), BattlefieldWG::OnBattleEnd(), PlayerAcceptInviteToWar(), StartBattle(), TeamCastSpell(), BattlefieldWG::UpdatedDestroyedTowerCount(), and BattlefieldWG::UpdateTenacity().
|
protected |
Definition at line 364 of file Battlefield.h.
Referenced by HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), and Update().
|
protected |
Definition at line 377 of file Battlefield.h.
Referenced by Battlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 389 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Definition at line 388 of file Battlefield.h.
Referenced by Battlefield(), HandlePlayerEnterZone(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Definition at line 378 of file Battlefield.h.
Referenced by Battlefield(), InvitePlayerToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 351 of file Battlefield.h.
Referenced by Battlefield(), EndBattle(), BattlefieldWG::FillInitialWorldStates(), GetTimer(), HandlePlayerEnterZone(), SetTimer(), BattlefieldWG::SetupBattlefield(), StartBattle(), Update(), BattlefieldWG::Update(), and BattlefieldWG::UpdatedDestroyedTowerCount().
|
protected |
Definition at line 367 of file Battlefield.h.
Referenced by Battlefield(), GetTypeId(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 382 of file Battlefield.h.
Referenced by Battlefield(), and Update().
|
protected |
Definition at line 379 of file Battlefield.h.
Referenced by Battlefield(), and Update().
|
protected |
Definition at line 369 of file Battlefield.h.
Referenced by Battlefield(), GetZoneId(), InvitePlayerToWar(), BattlefieldWG::OnPlayerJoinWar(), PlayerAcceptInviteToQueue(), BattlefieldWG::SendInitWorldStatesTo(), and BattlefieldWG::SetupBattlefield().
|
protected |
Definition at line 350 of file Battlefield.h.
Referenced by Battlefield(), InitStalker(), SendWarningToAllInZone(), and SendWarningToPlayer().