![]() |
TrinityCore
|
#include <BattlefieldTB.h>
Inheritance diagram for BattlefieldTB:Public Member Functions | |
| ~BattlefieldTB () | |
| void | OnStartGrouping () override |
| Called x minutes before battle start when player in zone are invite to join queue. | |
| void | OnBattleStart () override |
| Called on start. | |
| void | OnBattleEnd (bool endByTimer) override |
| Called at the end of battle. | |
| void | OnPlayerEnterZone (Player *player) override |
| Called when a player enter in battlefield zone. | |
| void | OnPlayerLeaveZone (Player *player) override |
| Called when a player leave battlefield zone. | |
| void | OnPlayerJoinWar (Player *player) override |
| Called when a player accept to join the battle. | |
| void | OnPlayerLeaveWar (Player *player) override |
| Called when a player leave the battle. | |
| bool | Update (uint32 diff) override |
| Called every time for update bf data and time. | |
| void | OnCreatureCreate (Creature *creature) override |
| void | OnGameObjectCreate (GameObject *go) override |
| void | UpdateCapturedBaseCount () |
| bool | SetupBattlefield () override |
| Call this to init the Battlefield. | |
| void | HandleKill (Player *killer, Unit *victim) override |
| Called when a Unit is kill in battlefield zone. | |
| void | PromotePlayer (Player *killer) |
| void | RemoveAurasFromPlayer (Player *player) |
| void | ProcessEvent (WorldObject *obj, uint32 eventId, WorldObject *invoker) override |
| void | TowerDamaged (TBTowerId tbTowerId) |
| void | TowerDestroyed (TBTowerId tbTowerId) |
| void | UpdateNPCsAndGameObjects () |
| void | CreateCapturePoints () |
| Battlefield (Map *map) | |
| Constructor. | |
| Battlefield (Battlefield const &)=delete | |
| Battlefield (Battlefield &&)=delete | |
Public Member Functions inherited from Battlefield | |
| Battlefield (Map *map) | |
| Constructor. | |
| Battlefield (Battlefield const &)=delete | |
| Battlefield (Battlefield &&)=delete | |
| Battlefield & | operator= (Battlefield const &)=delete |
| Battlefield & | operator= (Battlefield &&)=delete |
| virtual | ~Battlefield () |
| Destructor. | |
| 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. | |
| uint32 | GetTypeId () const |
| uint32 | GetZoneId () const |
| uint32 | GetMapId () const |
| Map * | GetMap () const |
| uint64 | GetQueueId () 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. | |
| int8 | GetState () const |
| 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 |
| 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) |
| 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) |
| 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) |
| bool | CanFlyIn () |
| Return if we can use mount in battlefield. | |
| void | StartBattle () |
| void | EndBattle (bool endByTimer) |
| void | HideNpc (Creature *creature) |
| void | ShowNpc (Creature *creature, bool aggressive) |
| GraveyardVect const & | 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 () noexcept | |
| ZoneScript (ZoneScript const &right) | |
| ZoneScript (ZoneScript &&right) noexcept | |
| ZoneScript & | operator= (ZoneScript const &right) |
| ZoneScript & | operator= (ZoneScript &&right) noexcept |
| virtual | ~ZoneScript () |
| virtual uint32 | GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data) |
| virtual uint32 | GetGameObjectEntry (ObjectGuid::LowType, uint32 entry) |
| virtual void | OnCreatureRemove (Creature *) |
| virtual void | OnGameObjectRemove (GameObject *) |
| virtual void | OnAreaTriggerCreate (AreaTrigger *areaTrigger) |
| virtual void | OnAreaTriggerRemove (AreaTrigger *areaTrigger) |
| virtual void | OnUnitDeath (Unit *unit) |
| virtual void | OnCreatureGroupDepleted (CreatureGroup const *creatureGroup) |
| virtual ObjectGuid | GetGuidData (uint32) const |
| virtual void | SetGuidData (uint32, ObjectGuid) |
| virtual void | TriggerGameEvent (uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) |
| virtual void | DoAction (uint32 actionId, WorldObject *source=nullptr, WorldObject *target=nullptr) |
| virtual void | OnFlagStateChange (GameObject *flagInBase, FlagState oldValue, FlagState newValue, Player *player) |
| virtual bool | CanCaptureFlag (AreaTrigger *areaTrigger, Player *player) |
| virtual void | OnCaptureFlag (AreaTrigger *areaTrigger, Player *player) |
| virtual void | OnFlagTaken (GameObject *flag, Player *player) |
| virtual void | OnFlagDropped (ObjectGuid const &flagGuid, Player *player) |
Additional Inherited Members | |
Public Types inherited from Battlefield | |
| typedef std::unordered_map< uint32, std::unique_ptr< BattlefieldControlZoneHandler > > | ControlZoneHandlerMap |
| typedef of map witch store capturepoint and the associate gameobject entry | |
Protected Member Functions inherited from Battlefield | |
| 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 | RegisterZone (uint32 zoneid) |
| bool | HasPlayer (Player *player) const |
| void | TeamCastSpell (TeamId team, int32 spellId) |
Definition at line 567 of file BattlefieldTB.h.
| BattlefieldTB::~BattlefieldTB | ( | ) |
Definition at line 40 of file BattlefieldTB.cpp.
|
delete |
|
delete |
|
explicit |
Constructor.
Definition at line 156 of file Battlefield.cpp.
| void BattlefieldTB::CreateCapturePoints | ( | ) |
Called when a Unit is kill in battlefield zone.
Reimplemented from Battlefield.
Definition at line 687 of file BattlefieldTB.cpp.
References ObjectAccessor::FindPlayer(), Player::GetTeamId(), BaseEntity::GetTypeId(), Battlefield::m_PlayersInWar, PromotePlayer(), and TYPEID_PLAYER.
|
overridevirtual |
Called at the end of battle.
Reimplemented from Battlefield.
Definition at line 292 of file BattlefieldTB.cpp.
References BATTLEFIELD_TB_DATA_TOWERS_INTACT, ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), Battlefield::GetData(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), IN_MILLISECONDS, Battlefield::m_Map, Battlefield::m_NoWarBattleTime, Battlefield::m_PlayersInWar, m_updateObjectsTimer, MINUTE, RemoveAurasFromPlayer(), Battlefield::SendWarning(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), SPELL_REWARD_DEFEAT, SPELL_REWARD_TOWER_INTACT, SPELL_REWARD_VICTORY_ALLIANCE, SPELL_REWARD_VICTORY_HORDE, SPELL_VICTORY_ALLIANCE, SPELL_VICTORY_HORDE, TB_TEXT_FORTRESS_CAPTURE_ALLIANCE, TB_TEXT_FORTRESS_CAPTURE_HORDE, TB_TEXT_FORTRESS_DEFEND_ALLIANCE, TB_TEXT_FORTRESS_DEFEND_HORDE, TEAM_ALLIANCE, TEAM_HORDE, Battlefield::TeamCastSpell(), updatedNPCAndObjects, warnedFiveMinutes, warnedOneMinute, warnedTwoMinutes, WS_BATTLEFIELD_TB_ALLIANCE_ATTACKING_SHOW, WS_BATTLEFIELD_TB_ALLIANCE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_BUILDINGS_CAPTURED_SHOW, WS_BATTLEFIELD_TB_FACTION_CONTROLLING, WS_BATTLEFIELD_TB_HORDE_ATTACKING_SHOW, WS_BATTLEFIELD_TB_HORDE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_KEEP_ALLIANCE, WS_BATTLEFIELD_TB_KEEP_HORDE, WS_BATTLEFIELD_TB_STATE_BATTLE, WS_BATTLEFIELD_TB_TIME_BATTLE_END, WS_BATTLEFIELD_TB_TIME_BATTLE_END_SHOW, WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE, and WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE_SHOW.
|
overridevirtual |
Called on start.
Reimplemented from Battlefield.
Definition at line 254 of file BattlefieldTB.cpp.
References BATTLEFIELD_TB_DATA_TOWERS_INTACT, Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), IN_MILLISECONDS, Battlefield::m_Map, Battlefield::m_Timer, Battlefield::SetData(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), TB_TOWERS_COUNT, TBTowers, TEAM_ALLIANCE, TEAM_HORDE, UpdateNPCsAndGameObjects(), WS_BATTLEFIELD_TB_ALLIANCE_ATTACKING_SHOW, WS_BATTLEFIELD_TB_ALLIANCE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_BUILDINGS_CAPTURED, WS_BATTLEFIELD_TB_BUILDINGS_CAPTURED_SHOW, WS_BATTLEFIELD_TB_HORDE_ATTACKING_SHOW, WS_BATTLEFIELD_TB_HORDE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_STATE_BATTLE, WS_BATTLEFIELD_TB_STATE_PREPARATIONS, WS_BATTLEFIELD_TB_TIME_BATTLE_END, WS_BATTLEFIELD_TB_TIME_BATTLE_END_SHOW, WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE, WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE_SHOW, WS_BATTLEFIELD_TB_TOWERS_DESTROYED, and WS_BATTLEFIELD_TB_TOWERS_DESTROYED_SHOW.
|
overridevirtual |
Reimplemented from ZoneScript.
Definition at line 481 of file BattlefieldTB.cpp.
References BATTLEFIELD_WARMUP, BattleInactiveNPCs, WorldObject::CastSpell(), Unit::EnterVehicle(), Unit::GetCharmerOrOwner(), Battlefield::GetDefenderTeam(), Object::GetEntry(), BaseEntity::GetGUID(), Battlefield::GetState(), Unit::GetVehicleBase(), Battlefield::HideNpc(), NPC_ABANDONED_SIEGE_ENGINE, NPC_CROCOLISK, NPC_PROBLIM, NPC_SIEGE_ENGINE_TURRET, NPC_TB_GY_SPIRIT_BARADIN_HOLD_A, NPC_TB_GY_SPIRIT_BARADIN_HOLD_H, NPC_TB_GY_SPIRIT_EAST_SPIRE_A, NPC_TB_GY_SPIRIT_EAST_SPIRE_H, NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_A, NPC_TB_GY_SPIRIT_IRONCLAD_GARRISON_H, NPC_TB_GY_SPIRIT_SLAGWORKS_A, NPC_TB_GY_SPIRIT_SLAGWORKS_H, NPC_TB_GY_SPIRIT_SOUTH_SPIRE_A, NPC_TB_GY_SPIRIT_SOUTH_SPIRE_H, NPC_TB_GY_SPIRIT_WARDENS_VIGIL_A, NPC_TB_GY_SPIRIT_WARDENS_VIGIL_H, NPC_TB_GY_SPIRIT_WEST_SPIRE_A, NPC_TB_GY_SPIRIT_WEST_SPIRE_H, NPC_TOLBARAD_ARCHMAGE_GALUS, NPC_TOLBARAD_CAPTIVE_SPIRIT, NPC_TOLBARAD_CELL_WATCHER, NPC_TOLBARAD_CELLBLOCK_OOZE, NPC_TOLBARAD_EXILED_MAGE, NPC_TOLBARAD_GHASTLY_CONVICT, NPC_TOLBARAD_IMPRISONED_IMP, NPC_TOLBARAD_IMPRISONED_WORKER, NPC_TOLBARAD_JAILED_WRATHGUARD, NPC_TOLBARAD_SHIVARRA_DESTROYER, NPC_TOLBARAD_SVARNOS, NPC_TOLBARAD_WARDEN_GUARD, NPC_TOLBARAD_WARDEN_SILVA, NPC_TOWER_RANGE_FINDER, Unit::SetFaction(), SPELL_TB_SPIRITUAL_IMMUNITY, SPELL_THICK_LAYER_OF_RUST, SPELL_TOWER_RANGE_FINDER_PERIODIC, and TBFactions.
|
overridevirtual |
Reimplemented from ZoneScript.
Definition at line 537 of file BattlefieldTB.cpp.
References BATTLEFIELD_INACTIVE, BATTLEFIELD_WARMUP, BattleInactiveGOs, CELLBLOCK_CURSED_DEPTHS, CELLBLOCK_D_BLOCK, CELLBLOCK_THE_HOLE, Object::GetEntry(), BaseEntity::GetGUID(), Battlefield::GetState(), GO_CRATE_OF_CELLBLOCK_RATIONS, GO_CURSED_DEPTHS_GATE, GO_CURSED_SHACKLES, GO_DUSTY_PRISON_JOURNAL, GO_GATE_D_BLOCK, GO_GATE_TO_THE_HOLE, GO_STATE_ACTIVE, GO_STATE_READY, GO_TB_INSTANCE_VISUAL_1, GO_TB_INSTANCE_VISUAL_2, GO_TB_INSTANCE_VISUAL_3, GO_TB_INSTANCE_VISUAL_4, GO_TB_MEETING_STONE, GO_TOLBARAD_DOOR, GO_TOLBARAD_GATES, m_gateCursedDepthsGUID, m_gateDBlockGUID, m_gateToTheHoleGUID, m_iCellblockRandom, RESPAWN_ONE_DAY, GameObject::SetGoState(), GameObject::SetRespawnTime(), TBDoorGUID, and TBGatesGUID.
|
overridevirtual |
Called when a player enter in battlefield zone.
Reimplemented from Battlefield.
Definition at line 198 of file BattlefieldTB.cpp.
References Battlefield::m_isActive, and RemoveAurasFromPlayer().
|
overridevirtual |
Called when a player accept to join the battle.
Reimplemented from Battlefield.
Definition at line 210 of file BattlefieldTB.cpp.
References WorldObject::CastSpell(), Battlefield::GetAttackerTeam(), Player::GetTeamId(), WorldStateMgr::GetValue(), Battlefield::m_Map, RemoveAurasFromPlayer(), Player::SetPvP(), SPELL_TOWER_ATTACK_BONUS, SPELLVALUE_AURA_STACK, TRIGGERED_FULL_MASK, and WS_BATTLEFIELD_TB_TOWERS_DESTROYED.
|
overridevirtual |
Called when a player leave the battle.
Reimplemented from Battlefield.
Definition at line 225 of file BattlefieldTB.cpp.
References RemoveAurasFromPlayer().
|
overridevirtual |
Called when a player leave battlefield zone.
Reimplemented from Battlefield.
Definition at line 204 of file BattlefieldTB.cpp.
References Battlefield::m_isActive, and RemoveAurasFromPlayer().
|
overridevirtual |
Called x minutes before battle start when player in zone are invite to join queue.
Reimplemented from Battlefield.
Definition at line 238 of file BattlefieldTB.cpp.
References TBQuestAreaInfo::entry, ObjectAccessor::FindPlayer(), m_iCellblockRandom, Battlefield::m_Map, Battlefield::m_players, PVP_TEAMS_COUNT, WorldStateMgr::SetValue(), TBQuestAreas, TBQuestAreaInfo::teleportSpell, UpdateNPCsAndGameObjects(), and WS_BATTLEFIELD_TB_STATE_PREPARATIONS.
|
overridevirtual |
Reimplemented from Battlefield.
Definition at line 578 of file BattlefieldTB.cpp.
References EVENT_COUNT_CAPTURED_BASE, GameObject::GetDestructibleState(), Object::GetEntry(), GO_DESTRUCTIBLE_DAMAGED, GO_DESTRUCTIBLE_DESTROYED, GO_EAST_SPIRE, GO_SOUTH_SPIRE, GO_WEST_SPIRE, Battlefield::IsWarTime(), Battlefield::ProcessEvent(), TB_TOWER_EAST_SPIRE, TB_TOWER_SOUTH_SPIRE, TB_TOWER_WEST_SPIRE, Object::ToGameObject(), TowerDamaged(), TowerDestroyed(), and UpdateCapturedBaseCount().
| void BattlefieldTB::PromotePlayer | ( | Player * | killer | ) |
Definition at line 699 of file BattlefieldTB.cpp.
References WorldObject::CastSpell(), Unit::HasAura(), Battlefield::m_isActive, and SPELL_TB_VETERAN.
Referenced by HandleKill().
| void BattlefieldTB::RemoveAurasFromPlayer | ( | Player * | player | ) |
Definition at line 230 of file BattlefieldTB.cpp.
References Unit::RemoveAurasDueToSpell(), SPELL_TB_SLOW_FALL, SPELL_TB_SPIRITUAL_IMMUNITY, SPELL_TB_VETERAN, and SPELL_TOWER_ATTACK_BONUS.
Referenced by OnBattleEnd(), OnPlayerEnterZone(), OnPlayerJoinWar(), OnPlayerLeaveWar(), and OnPlayerLeaveZone().
|
overridevirtual |
Call this to init the Battlefield.
Reimplemented from Battlefield.
Definition at line 42 of file BattlefieldTB.cpp.
References BATTLEFIELD_BATTLEID_TB, BATTLEFIELD_TB, BATTLEFIELD_TB_DATA_MAX, BATTLEFIELD_TB_GRAVEYARD_MAX, BATTLEFIELD_TB_ZONEID, CONFIG_TOLBARAD_BATTLETIME, CONFIG_TOLBARAD_BONUSTIME, CONFIG_TOLBARAD_ENABLE, CONFIG_TOLBARAD_NOBATTLETIME, CONFIG_TOLBARAD_PLR_MAX, CONFIG_TOLBARAD_PLR_MIN, CONFIG_TOLBARAD_PLR_MIN_LVL, CONFIG_TOLBARAD_RESTART_AFTER_CRASH, Battlefield::ControlZoneHandlers, QuaternionData::fromOrientation(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), Battlefield::GetMap(), WorldStateMgr::GetValue(), IN_MILLISECONDS, BfGraveyard::Initialize(), Battlefield::InitStalker(), Battlefield::KickPosition, Battlefield::m_BattleId, Battlefield::m_BattleTime, m_BonusTime, Battlefield::m_Data32, Battlefield::m_GraveyardList, Battlefield::m_isActive, Battlefield::m_IsEnabled, Battlefield::m_Map, Battlefield::m_MapId, WorldLocation::m_mapId, Battlefield::m_MaxPlayer, Battlefield::m_MinLevel, Battlefield::m_MinPlayer, Battlefield::m_NoWarBattleTime, Battlefield::m_RestartAfterCrash, Battlefield::m_StartGrouping, Battlefield::m_StartGroupingTimer, Battlefield::m_TimeForAcceptInvite, Battlefield::m_Timer, Battlefield::m_TypeId, m_updateObjectsTimer, Battlefield::m_ZoneId, MINUTE, NPC_DEBUG_ANNOUNCER, Battlefield::RegisterZone(), Position::Relocate(), Battlefield::SetDefenderTeam(), Battlefield::SetGraveyardNumber(), BfGraveyard::SetSpirit(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), sWorld, TB_BASE_COUNT, TB_GO_ARTKIT_FLAG_ALLIANCE, TB_GO_ARTKIT_FLAG_HORDE, TB_TOWERS_COUNT, TBCapturePoints, TBGraveyards, TBTowers, TEAM_ALLIANCE, TEAM_HORDE, TolBaradDebugAnnouncerPos, updatedNPCAndObjects, UpdateNPCsAndGameObjects(), urand(), warnedFiveMinutes, warnedOneMinute, warnedTwoMinutes, WS_BATTLEFIELD_TB_ALLIANCE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_FACTION_CONTROLLING, WS_BATTLEFIELD_TB_HORDE_CONTROLS_SHOW, WS_BATTLEFIELD_TB_KEEP_ALLIANCE, WS_BATTLEFIELD_TB_KEEP_HORDE, WS_BATTLEFIELD_TB_STATE_BATTLE, WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE, and WS_BATTLEFIELD_TB_TIME_NEXT_BATTLE_SHOW.
| void BattlefieldTB::TowerDamaged | ( | TBTowerId | tbTowerId | ) |
Definition at line 619 of file BattlefieldTB.cpp.
References BATTLEFIELD_TB_DATA_TOWERS_INTACT, Battlefield::GetAttackerTeam(), Battlefield::GetData(), Battlefield::GetDefenderTeam(), Battlefield::IsWarTime(), Battlefield::m_Map, Battlefield::SendWarning(), Battlefield::SetData(), WorldStateMgr::SetValue(), SPELL_REWARD_TOWER_DAMAGED, TBTowers, and Battlefield::TeamCastSpell().
Referenced by ProcessEvent().
| void BattlefieldTB::TowerDestroyed | ( | TBTowerId | tbTowerId | ) |
Definition at line 634 of file BattlefieldTB.cpp.
References CastSpellExtraArgs::AddSpellMod(), ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), WorldStateMgr::GetValue(), IN_MILLISECONDS, Battlefield::IsWarTime(), m_BonusTime, Battlefield::m_Map, Battlefield::m_PlayersInWar, Battlefield::m_Timer, Battlefield::SendWarning(), WorldStateMgr::SetValue(), SPELL_REWARD_TOWER_DESTROYED, SPELL_TOWER_ATTACK_BONUS, SPELLVALUE_AURA_STACK, TBTowers, Battlefield::TeamCastSpell(), TRIGGERED_FULL_MASK, WS_BATTLEFIELD_TB_TIME_BATTLE_END, WS_BATTLEFIELD_TB_TOWERS_DESTROYED, and WS_BATTLEFIELD_TB_TOWERS_DESTROYED_SHOW.
Referenced by ProcessEvent().
|
overridevirtual |
Called every time for update bf data and time.
| diff | : time ellapsed since last call (in ms) |
Reimplemented from Battlefield.
Definition at line 158 of file BattlefieldTB.cpp.
References BATTLEFIELD_INACTIVE, Battlefield::GetState(), IN_MILLISECONDS, Battlefield::m_StartGroupingTimer, Battlefield::m_Timer, m_updateObjectsTimer, MINUTE, Battlefield::SendWarning(), TB_TEXT_PREPARATIONS_IN_1_MIN, TB_TEXT_PREPARATIONS_IN_2_MIN, TB_TEXT_PREPARATIONS_IN_5_MIN, Battlefield::Update(), updatedNPCAndObjects, UpdateNPCsAndGameObjects(), warnedFiveMinutes, warnedOneMinute, and warnedTwoMinutes.
| void BattlefieldTB::UpdateCapturedBaseCount | ( | ) |
Definition at line 661 of file BattlefieldTB.cpp.
References Battlefield::EndBattle(), Battlefield::GetAttackerTeam(), Battlefield::GetMap(), WorldStateMgr::GetValue(), Battlefield::m_Map, WorldStateMgr::SetValue(), TB_BASE_COUNT, TEAM_ALLIANCE, TEAM_HORDE, WS_BATTLEFIELD_TB_BUILDINGS_CAPTURED, WS_BATTLEFIELD_TB_GARRISON_ALLIANCE_CONTROLLED, WS_BATTLEFIELD_TB_GARRISON_HORDE_CONTROLLED, WS_BATTLEFIELD_TB_SLAGWORKS_ALLIANCE_CONTROLLED, WS_BATTLEFIELD_TB_SLAGWORKS_HORDE_CONTROLLED, WS_BATTLEFIELD_TB_VIGIL_ALLIANCE_CONTROLLED, and WS_BATTLEFIELD_TB_VIGIL_HORDE_CONTROLLED.
Referenced by ProcessEvent().
| void BattlefieldTB::UpdateNPCsAndGameObjects | ( | ) |
Definition at line 346 of file BattlefieldTB.cpp.
References BATTLEFIELD_IN_PROGRESS, BATTLEFIELD_INACTIVE, BATTLEFIELD_TB_GRAVEYARD_MAX, BATTLEFIELD_WARMUP, BattleInactiveGOs, BattleInactiveNPCs, CELLBLOCK_CURSED_DEPTHS, CELLBLOCK_D_BLOCK, CELLBLOCK_NONE, CELLBLOCK_THE_HOLE, Battlefield::ControlZoneHandlers, TBGraveyardInfo::defenderControls, TBFactionNPCInfo::entryAlliance, TBFactionNPCInfo::entryHorde, FactionNPCSpawns, QuaternionData::fromOrientation(), Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Battlefield::GetGameObject(), Battlefield::GetGraveyardById(), Battlefield::GetMap(), Battlefield::GetState(), GO_DESTRUCTIBLE_INTACT, GO_DESTRUCTIBLE_REBUILDING, GO_STATE_ACTIVE, GO_STATE_READY, GuardNPCSpawns, Battlefield::HideNpc(), Battlefield::IsWarTime(), m_gateCursedDepthsGUID, m_gateDBlockGUID, m_gateToTheHoleGUID, m_iCellblockRandom, NPC_ABANDONED_SIEGE_ENGINE, NPC_BARADIN_GUARD, NPC_HELLSCREAMS_SENTRY, TBFactionNPCInfo::pos, RandomQuestgiverPos, RandomQuestgivers, RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, WorldStateMgr::SetValue(), Battlefield::ShowNpc(), Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), TB_ABANDONED_SIEGE_ENGINE_COUNT, TB_BANNER_MAX, TB_BASE_COUNT, TB_FACTION_NPC_MAX, TB_GO_ARTKIT_FLAG_ALLIANCE, TB_GO_ARTKIT_FLAG_HORDE, TB_GUARDS_MAX, TB_PORTAL_MAX, TB_QUEST_INFANTRY, TB_QUEST_INFANTRY_MAX, TBAbandonedSiegeEngineSpawnData, TBBannerEntry, TBBanners, TBCapturePoints, TBDoorGUID, TBGatesGUID, TBGraveyards, TBPortals, TBQuestInfantrySpawnData, TEAM_ALLIANCE, TEAM_HORDE, TemporaryGOs, TemporaryNPCs, Towers, and urand().
Referenced by OnBattleStart(), OnStartGrouping(), SetupBattlefield(), and Update().
|
protected |
Definition at line 625 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 624 of file BattlefieldTB.h.
Referenced by OnCreatureCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 622 of file BattlefieldTB.h.
Referenced by SetupBattlefield(), and TowerDestroyed().
|
protected |
Definition at line 639 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 638 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 637 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 632 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), OnStartGrouping(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 620 of file BattlefieldTB.h.
Referenced by OnBattleEnd(), SetupBattlefield(), and Update().
|
protected |
Definition at line 635 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 634 of file BattlefieldTB.h.
Referenced by OnGameObjectCreate(), and UpdateNPCsAndGameObjects().
|
protected |
Definition at line 628 of file BattlefieldTB.h.
Referenced by UpdateNPCsAndGameObjects().
|
protected |
Definition at line 627 of file BattlefieldTB.h.
Referenced by UpdateNPCsAndGameObjects().
|
protected |
Definition at line 630 of file BattlefieldTB.h.
Referenced by UpdateNPCsAndGameObjects().
|
protected |
Definition at line 619 of file BattlefieldTB.h.
Referenced by OnBattleEnd(), SetupBattlefield(), and Update().
|
protected |
Definition at line 615 of file BattlefieldTB.h.
Referenced by OnBattleEnd(), SetupBattlefield(), and Update().
|
protected |
Definition at line 617 of file BattlefieldTB.h.
Referenced by OnBattleEnd(), SetupBattlefield(), and Update().
|
protected |
Definition at line 616 of file BattlefieldTB.h.
Referenced by OnBattleEnd(), SetupBattlefield(), and Update().