AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Battlefield.h"
Public Types | |
typedef std::vector< BfCapturePoint * > | BfCapturePointVector |
typedef of map witch store capturepoint and the associate gameobject entry More... | |
Public Member Functions | |
Battlefield () | |
Constructor. More... | |
~Battlefield () override | |
Destructor. More... | |
virtual bool | SetupBattlefield () |
Call this to init the Battlefield. More... | |
void | SendUpdateWorldState (uint32 field, uint32 value) |
Update data of a worldstate to all players present in zone. More... | |
virtual bool | Update (uint32 diff) |
Called every time for update bf data and time. More... | |
void | InvitePlayersInZoneToQueue () |
Invite all players in zone to join the queue, called x minutes before battle start in Update() More... | |
void | InvitePlayersInQueueToWar () |
Invite all players in queue to join battle on battle start. More... | |
void | InvitePlayersInZoneToWar () |
Invite all players in zone to join battle on battle start. More... | |
virtual void | HandleKill (Player *, Unit *) |
Called when a Unit is kill in battlefield zone. More... | |
uint32 | GetTypeId () |
uint32 | GetZoneId () |
void | TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0) |
bool | IsWarTime () |
Return true if battle is start, false if battle is not started. More... | |
void | ToggleBattlefield (bool enable) |
Enable or Disable battlefield. More... | |
bool | IsEnabled () |
Return if battlefield is enable. More... | |
void | KickPlayerFromBattlefield (ObjectGuid guid) |
Kick player from battlefield and teleport him to kick-point location. More... | |
void | HandlePlayerEnterZone (Player *player, uint32 zone) |
Called when player (player) enter in zone. More... | |
void | HandlePlayerLeaveZone (Player *player, uint32 zone) |
Called when player (player) leave the zone. More... | |
uint64 | GetData64 (uint32 dataId) const override |
void | SetData64 (uint32 dataId, uint64 value) override |
uint32 | GetData (uint32 dataId) const override |
void | SetData (uint32 dataId, uint32 value) override |
virtual void | UpdateData (uint32 index, int32 pad) |
TeamId | GetDefenderTeam () |
TeamId | GetAttackerTeam () |
TeamId | GetOtherTeam (TeamId team) |
void | SetDefenderTeam (TeamId team) |
Group * | GetFreeBfRaid (TeamId TeamId) |
Find a not full battlefield group, if there is no, create one. More... | |
Group * | GetGroupPlayer (ObjectGuid guid, TeamId TeamId) |
Return battlefield group where player is. More... | |
bool | AddOrSetPlayerToCorrectBfGroup (Player *player) |
Force player to join a battlefield group. More... | |
GraveyardStruct 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, float x, float y, float z, float o, TeamId teamId) |
Creature * | SpawnCreature (uint32 entry, Position pos, TeamId teamId) |
GameObject * | SpawnGameObject (uint32 entry, float x, float y, float z, float o) |
Creature * | GetCreature (ObjectGuid const guid) |
GameObject * | GetGameObject (ObjectGuid const guid) |
virtual void | OnBattleStart () |
Called on start. More... | |
virtual void | OnBattleEnd (bool) |
Called at the end of battle. More... | |
virtual void | OnStartGrouping () |
Called x minutes before battle start when player in zone are invite to join queue. More... | |
virtual void | OnPlayerJoinWar (Player *) |
Called when a player accept to join the battle. More... | |
virtual void | OnPlayerLeaveWar (Player *) |
Called when a player leave the battle. More... | |
virtual void | OnPlayerLeaveZone (Player *) |
Called when a player leave battlefield zone. More... | |
virtual void | OnPlayerEnterZone (Player *) |
Called when a player enter in battlefield zone. More... | |
void | SendWarning (uint8 id, WorldObject const *target=nullptr) |
void | PlayerAcceptInviteToQueue (Player *player) |
void | PlayerAcceptInviteToWar (Player *player) |
uint32 | GetBattleId () |
void | AskToLeaveQueue (Player *player) |
void | PlayerAskToLeave (Player *player) |
virtual void | SendInitWorldStatesToAll ()=0 |
Send all worldstate data to all player in zone. More... | |
virtual void | FillInitialWorldStates (WorldPacket &)=0 |
bool | CanFlyIn () |
Return if we can use mount in battlefield. More... | |
void | SendAreaSpiritHealerQueryOpcode (Player *player, const ObjectGuid &guid) |
void | StartBattle () |
void | EndBattle (bool endByTimer) |
void | HideNpc (Creature *creature) |
void | ShowNpc (Creature *creature, bool aggressive) |
GraveyardVect | GetGraveyardVector () |
uint32 | GetTimer () |
void | SetTimer (uint32 timer) |
void | DoPlaySoundToAll (uint32 SoundID) |
void | InvitePlayerToQueue (Player *player) |
void | InvitePlayerToWar (Player *player) |
void | InitStalker (uint32 entry, float x, float y, float z, float o) |
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 void | OnCreatureEvade (Creature *) |
virtual ObjectGuid | GetGuidData (uint32) const |
virtual void | SetGuidData (uint32, ObjectGuid) |
virtual uint64 | GetData64 (uint32) const |
virtual void | SetData64 (uint32, uint64) |
virtual uint32 | GetData (uint32) const |
virtual void | SetData (uint32, uint32) |
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) |
void | RegisterZone (uint32 zoneid) |
bool | HasPlayer (Player *player) const |
void | TeamCastSpell (TeamId team, int32 spellId) |
Friends | |
class | BattlefieldMgr |
typedef std::vector<BfCapturePoint*> Battlefield::BfCapturePointVector |
typedef of map witch store capturepoint and the associate gameobject entry
Battlefield::Battlefield | ( | ) |
Constructor.
References m_BattleId, m_BattleTime, m_DefenderTeam, 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, RESURRECTION_INTERVAL, and TEAM_NEUTRAL.
|
override |
Destructor.
References m_capturePoints, and m_GraveyardList.
|
inlineprotected |
References m_capturePoints.
Referenced by BattlefieldWG::OnGameObjectCreate().
bool Battlefield::AddOrSetPlayerToCorrectBfGroup | ( | Player * | player | ) |
Force player to join a battlefield group.
References Group::AddMember(), Group::Create(), GetFreeBfRaid(), Player::GetGroup(), Group::GetGUID(), Object::GetGUID(), Group::GetMemberGroup(), Player::GetTeamId(), Group::isBFGroup(), Group::isBGGroup(), Object::IsInWorld(), Group::IsMember(), LOG_INFO, m_Groups, Group::SetBattlefieldGroup(), Player::SetBattlegroundOrBattlefieldRaid(), and sGroupMgr.
Referenced by PlayerAcceptInviteToWar().
|
virtual |
References m_GraveyardList.
void Battlefield::AskToLeaveQueue | ( | Player * | player | ) |
References Object::GetGUID(), Player::GetTeamId(), and m_PlayersInQueue.
Referenced by WorldSession::HandleBfExitRequest().
|
protected |
References ObjectAccessor::FindPlayer(), m_PlayersInQueue, and PVP_TEAMS_COUNT.
|
protected |
References ObjectAccessor::FindPlayer(), m_PlayersInWar, and PVP_TEAMS_COUNT.
Referenced by DoPlaySoundToAll().
|
protected |
References ObjectAccessor::FindPlayer(), m_players, and PVP_TEAMS_COUNT.
|
inline |
Return if we can use mount in battlefield.
References m_isActive.
Referenced by Spell::CheckCast(), spell_gen_mount::HandleMount(), and SpellArea::IsFitToRequirements().
void Battlefield::DoPlaySoundToAll | ( | uint32 | SoundID | ) |
References BroadcastPacketToWar().
Referenced by EndBattle(), and StartBattle().
void Battlefield::EndBattle | ( | bool | endByTimer | ) |
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 |
References m_DefenderTeam.
Referenced by BfWGGameObjectBuilding::Damaged(), EndBattle(), BattlefieldWG::FillInitialWorldStates(), npc_wg_quest_giver::GetDialogStatus(), BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), npc_wg_quest_giver::OnGossipHello(), BattlefieldWG::OnPlayerEnterZone(), BattlefieldWG::OnPlayerJoinWar(), BfWGGameObjectBuilding::Rebuild(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdateDamagedTowerCount(), BattlefieldWG::UpdatedDestroyedTowerCount(), and BfWGGameObjectBuilding::UpdateTurretAttack().
|
inline |
References m_BattleId.
GraveyardStruct const * Battlefield::GetClosestGraveyard | ( | Player * | player | ) |
References BfGraveyard::GetGraveyardId(), Player::GetTeamId(), m_GraveyardList, and sGraveyard.
Referenced by BfGraveyard::RelocateDeadPlayers().
Creature * Battlefield::GetCreature | ( | ObjectGuid const | guid | ) |
References Map::GetCreature(), and m_Map.
Referenced by BfWGGameObjectBuilding::Damaged(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), SendWarning(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdateTenacity(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Reimplemented from ZoneScript.
Reimplemented in BattlefieldWG.
References m_Data32.
Referenced by npc_wg_demolisher_engineer::canBuild(), BattlefieldWG::GetData(), and SpellArea::IsFitToRequirements().
|
inline |
References m_DefenderTeam.
Referenced by EndBattle(), BattlefieldWG::FillInitialWorldStates(), npc_wg_quest_giver::GetDialogStatus(), spell_wintergrasp_portal::HandleScript(), BfWGGameObjectBuilding::Init(), SpellArea::IsFitToRequirements(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), npc_wg_queue::OnGossipHello(), npc_wg_quest_giver::OnGossipHello(), BattlefieldWG::OnPlayerJoinWar(), BfWGGameObjectBuilding::Rebuild(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), BattlefieldWG::UpdatedDestroyedTowerCount(), WGWorkshop::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()) |
References m_Groups, and sGroupMgr.
Referenced by AddOrSetPlayerToCorrectBfGroup().
GameObject * Battlefield::GetGameObject | ( | ObjectGuid const | guid | ) |
References Map::GetGameObject(), and m_Map.
Referenced by BfWGGameObjectBuilding::Destroyed(), BfCapturePoint::GetCapturePointGo(), BattlefieldWG::GetRelic(), BfWGGameObjectBuilding::Rebuild(), and BfWGGameObjectBuilding::UpdateTurretAttack().
BfGraveyard * Battlefield::GetGraveyardById | ( | uint32 | id | ) | const |
References LOG_ERROR, and m_GraveyardList.
Referenced by BattlefieldWG::GetData(), WGWorkshop::GiveControlTo(), BattlefieldWG::OnBattleEnd(), Update(), and WGWorkshop::UpdateGraveyardAndWorkshop().
|
inline |
References m_GraveyardList.
Referenced by npc_wg_spirit_guide::OnGossipHello(), and npc_wg_spirit_guide::OnGossipSelect().
Group * Battlefield::GetGroupPlayer | ( | ObjectGuid | guid, |
TeamId | TeamId | ||
) |
|
inline |
|
inline |
References m_TypeId.
Referenced by SpellArea::IsFitToRequirements(), and Player::SendInitWorldStates().
|
inline |
References m_ZoneId.
Referenced by WorldSession::HandleBfEntryInviteResponse(), KickAfkPlayers(), and KickPlayerFromBattlefield().
Called when player (player) enter in zone.
References GameTime::GetGameTime(), Object::GetGUID(), Player::GetTeamId(), InvitePlayerToQueue(), InvitePlayerToWar(), Player::IsGameMaster(), Unit::IsInFlight(), IsWarTime(), m_InvitedPlayers, m_MaxPlayer, m_players, m_PlayersInWar, m_PlayersWillBeKick, m_StartGroupingTimer, m_Timer, MINUTE, and OnPlayerEnterZone().
Called when player (player) leave the zone.
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 |
References Object::GetGUID(), Player::GetTeamId(), and m_players.
Referenced by RemovePlayerFromResurrectQueue().
void Battlefield::HideNpc | ( | Creature * | creature | ) |
References Unit::CombatStop(), Creature::DisappearAndDie(), REACT_PASSIVE, Unit::SetPhaseMask(), Creature::SetReactState(), Unit::SetUnitFlag(), Unit::SetVisible(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::SetupBattlefield(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), and BfWGGameObjectBuilding::UpdateTurretAttack().
void Battlefield::InitStalker | ( | uint32 | entry, |
float | x, | ||
float | y, | ||
float | z, | ||
float | o | ||
) |
References 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.
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()
References ObjectAccessor::FindPlayer(), InvitePlayerToQueue(), and m_players.
Referenced by Update().
void Battlefield::InvitePlayersInZoneToWar | ( | ) |
Invite all players in zone to join battle on battle start.
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 | ) |
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 | ) |
References GameTime::GetGameTime(), Object::GetGUID(), Unit::GetLevel(), Player::GetSession(), Player::GetTeamId(), Player::InBattleground(), Unit::IsInFlight(), m_BattleId, 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.
References m_IsEnabled.
Referenced by bf_commandscript::HandleBattlefieldEnable(), and Update().
|
inline |
Return true if battle is start, false if battle is not started.
References m_isActive.
Referenced by Player::CreateCorpse(), BattlefieldWG::FillInitialWorldStates(), spell_wintergrasp_hide_small_elementals_aura::HandlePeriodicDummy(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::IsEncounterInProgress(), SpellArea::IsFitToRequirements(), BattlefieldWG::OnCreatureCreate(), npc_wg_queue::OnGossipHello(), npc_wg_queue::OnGossipSelect(), BattlefieldWG::OnStartGrouping(), BattlefieldWG::OnUnitDeath(), PlayerAcceptInviteToWar(), BattlefieldWG::ProcessEvent(), Update(), and BattlefieldWG::Update().
|
protected |
References ObjectAccessor::FindPlayer(), GetZoneId(), KickPosition, 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 |
References ObjectAccessor::FindPlayer(), GetZoneId(), and KickPosition.
Referenced by WorldSession::HandleBfEntryInviteResponse(), BattlefieldWG::OnPlayerEnterZone(), and Update().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Called when a player enter in battlefield zone.
Reimplemented in BattlefieldWG.
Referenced by HandlePlayerEnterZone().
|
inlinevirtual |
Called when a player accept to join the battle.
Reimplemented in BattlefieldWG.
Referenced by PlayerAcceptInviteToWar().
|
inlinevirtual |
Called when a player leave the battle.
Reimplemented in BattlefieldWG.
Referenced by HandlePlayerLeaveZone().
|
inlinevirtual |
Called when a player leave battlefield zone.
Reimplemented in BattlefieldWG.
Referenced by HandlePlayerLeaveZone().
|
inlinevirtual |
Called x minutes before battle start when player in zone are invite to join queue.
Reimplemented in BattlefieldWG.
Referenced by Update().
void Battlefield::PlayerAcceptInviteToQueue | ( | Player * | player | ) |
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 | ) |
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 | ) |
References Unit::CastSpell().
|
protected |
void Battlefield::RemovePlayerFromResurrectQueue | ( | ObjectGuid | player_guid | ) |
References HasPlayer(), and m_GraveyardList.
Referenced by HandlePlayerLeaveZone().
void Battlefield::SendAreaSpiritHealerQueryOpcode | ( | Player * | player, |
const ObjectGuid & | guid | ||
) |
References ASSERT, Player::GetSession(), m_LastResurectTimer, WorldSession::SendPacket(), and SMSG_AREA_SPIRIT_HEALER_TIME.
|
pure virtual |
Send all worldstate data to all player in zone.
Implemented in BattlefieldWG.
Referenced by EndBattle(), and bf_commandscript::HandleBattlefieldTimer().
|
inlineprotectedvirtual |
Referenced by HandlePlayerLeaveZone().
Update data of a worldstate to all players present in zone.
References ObjectAccessor::FindPlayer(), m_players, and PVP_TEAMS_COUNT.
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Destroyed(), WGWorkshop::GiveControlTo(), and BfWGGameObjectBuilding::Rebuild().
void Battlefield::SendWarning | ( | uint8 | id, |
WorldObject const * | target = nullptr |
||
) |
References GetCreature(), sCreatureTextMgr, and StalkerGuid.
Referenced by BfWGGameObjectBuilding::Damaged(), BfWGGameObjectBuilding::Destroyed(), WGWorkshop::GiveControlTo(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::OnStartGrouping(), and BattlefieldWG::PromotePlayer().
Reimplemented from ZoneScript.
References m_Data32.
Referenced by BattlefieldWG::OnBattleStart(), and BattlefieldWG::UpdateCounterVehicle().
|
inline |
|
inline |
References m_GraveyardList.
Referenced by BattlefieldWG::SetupBattlefield().
|
inline |
References m_Timer.
Referenced by bf_commandscript::HandleBattlefieldTimer().
|
inlinevirtual |
Call this to init the Battlefield.
Reimplemented in BattlefieldWG.
Referenced by BattlefieldMgr::InitBattlefield().
void Battlefield::ShowNpc | ( | Creature * | creature, |
bool | aggressive | ||
) |
References Unit::IsAlive(), REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveUnitFlag(), Creature::Respawn(), Unit::SetPhaseMask(), Creature::SetReactState(), Unit::SetUnitFlag(), Unit::SetVisible(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.
Referenced by BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BfWGGameObjectBuilding::UpdateCreatureAndGo(), and BfWGGameObjectBuilding::UpdateTurretAttack().
Creature * Battlefield::SpawnCreature | ( | uint32 | entry, |
float | x, | ||
float | y, | ||
float | z, | ||
float | o, | ||
TeamId | teamId | ||
) |
References Map::AddToMap(), BattlefieldFactions, Creature::Create(), Map::GenerateLowGuid(), LOG_ERROR, m_MapId, MOVE_RUN, MOVE_WALK, PHASEMASK_NORMAL, WorldObject::setActive(), Unit::SetFaction(), Creature::SetHomePosition(), Unit::SetSpeed(), sMapMgr, sObjectMgr, CreatureTemplate::speed_run, and CreatureTemplate::speed_walk.
Referenced by BfWGGameObjectBuilding::Init(), InitStalker(), BattlefieldWG::SetupBattlefield(), and SpawnCreature().
References Position::m_orientation, Position::m_positionX, Position::m_positionY, Position::m_positionZ, and SpawnCreature().
GameObject * Battlefield::SpawnGameObject | ( | uint32 | entry, |
float | x, | ||
float | y, | ||
float | z, | ||
float | o | ||
) |
References Map::AddToMap(), GameObject::Create(), Map::GenerateLowGuid(), GO_STATE_READY, LOG_ERROR, m_MapId, PHASEMASK_NORMAL, WorldObject::setActive(), sMapMgr, and sObjectMgr.
Referenced by BfWGGameObjectBuilding::Init(), BattlefieldWG::OnBattleStart(), and BattlefieldWG::SetupBattlefield().
void Battlefield::StartBattle | ( | ) |
References BF_START, DoPlaySoundToAll(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), m_BattleTime, m_Groups, m_isActive, m_PlayersInWar, m_Timer, OnBattleStart(), and PVP_TEAMS_COUNT.
Referenced by bf_commandscript::HandleBattlefieldStart(), and Update().
References ObjectAccessor::FindPlayer(), and m_PlayersInWar.
|
inline |
Enable or Disable battlefield.
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.
References EndBattle(), GameTime::GetGameTime(), GetGraveyardById(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), IsEnabled(), IsWarTime(), KickAfkPlayers(), KickPlayerFromBattlefield(), m_capturePoints, m_GraveyardList, m_InvitedPlayers, m_isActive, m_LastResurectTimer, m_PlayersWillBeKick, m_StartGrouping, m_StartGroupingTimer, m_Timer, m_uiKickAfkPlayersTimer, m_uiKickDontAcceptTimer, OnStartGrouping(), RESURRECTION_INTERVAL, StartBattle(), and sWorld.
Referenced by BattlefieldWG::Update().
|
friend |
|
protected |
Referenced by KickAfkPlayers(), KickPlayerFromBattlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
|
protected |
Referenced by Battlefield(), BattlefieldWG::SetupBattlefield(), and StartBattle().
|
protected |
Referenced by AddCapturePoint(), HandlePlayerLeaveZone(), BattlefieldWG::OnBattleStart(), Update(), and ~Battlefield().
|
protected |
Referenced by GetData(), SetData(), BattlefieldWG::SetupBattlefield(), and UpdateData().
|
protected |
Referenced by GetData64(), and SetData64().
|
protected |
|
protected |
|
protected |
Referenced by AddOrSetPlayerToCorrectBfGroup(), GetFreeBfRaid(), GetGroupPlayer(), and StartBattle().
|
protected |
|
protected |
|
protected |
Referenced by Battlefield(), IsEnabled(), BattlefieldWG::SetupBattlefield(), and ToggleBattlefield().
|
protected |
Referenced by Battlefield(), SendAreaSpiritHealerQueryOpcode(), and Update().
|
protected |
Referenced by Battlefield(), GetCreature(), GetGameObject(), and BattlefieldWG::SetupBattlefield().
|
protected |
|
protected |
|
protected |
Referenced by Battlefield(), InvitePlayerToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
Referenced by Battlefield(), InvitePlayerToQueue(), and BattlefieldWG::SetupBattlefield().
|
protected |
Referenced by Battlefield(), EndBattle(), and BattlefieldWG::SetupBattlefield().
|
protected |
Referenced by BroadcastPacketToZone(), BattlefieldWG::CapturePointTaken(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), HasPlayer(), InvitePlayersInZoneToQueue(), InvitePlayersInZoneToWar(), BattlefieldWG::OnBattleEnd(), BattlefieldWG::OnBattleStart(), BattlefieldWG::SendInitWorldStatesToAll(), SendUpdateWorldState(), and BattlefieldWG::UpdateVehicleCountWG().
|
protected |
|
protected |
Referenced by BroadcastPacketToWar(), BattlefieldWG::HandleKill(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInQueueToWar(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), KickAfkPlayers(), BattlefieldWG::OnBattleEnd(), PlayerAcceptInviteToWar(), StartBattle(), TeamCastSpell(), BattlefieldWG::UpdatedDestroyedTowerCount(), and BattlefieldWG::UpdateTenacity().
|
protected |
Referenced by HandlePlayerEnterZone(), HandlePlayerLeaveZone(), InvitePlayersInZoneToWar(), InvitePlayerToWar(), and Update().
|
protected |
Referenced by Battlefield(), and BattlefieldWG::SetupBattlefield().
|
protected |
Referenced by Battlefield(), EndBattle(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Referenced by Battlefield(), HandlePlayerEnterZone(), BattlefieldWG::SetupBattlefield(), and Update().
|
protected |
Referenced by Battlefield(), InvitePlayerToWar(), and BattlefieldWG::SetupBattlefield().
|
protected |
|
protected |
Referenced by Battlefield(), GetTypeId(), and BattlefieldWG::SetupBattlefield().
|
protected |
Referenced by Battlefield(), and Update().
|
protected |
Referenced by Battlefield(), and Update().
|
protected |
|
protected |
Referenced by InitStalker(), and SendWarning().