![]() |
TrinityCore
|
#include <BattlefieldWG.h>
Inheritance diagram for BattlefieldWG:Public Member Functions | |
| ~BattlefieldWG () | |
| void | OnBattleStart () override |
| Called when the battle start. | |
| void | OnBattleEnd (bool endByTimer) override |
| Called when battle end. | |
| void | OnStartGrouping () override |
| Called when grouping starts (15 minutes before battlestart) | |
| void | OnPlayerJoinWar (Player *player) override |
| Called when player accept invite to join battle. | |
| void | OnPlayerLeaveWar (Player *player) override |
| Called when player left the battle. | |
| void | OnPlayerLeaveZone (Player *player) override |
| Called when player left the WG zone. | |
| void | OnPlayerEnterZone (Player *player) override |
| Called when player enters in WG zone. | |
| void | OnCreatureCreate (Creature *creature) override |
| Called when a creature is created. | |
| void | OnCreatureRemove (Creature *creature) override |
| Called when a creature is removed. | |
| void | OnGameObjectCreate (GameObject *go) override |
| Called when a gameobject is created. | |
| void | BrokenWallOrTower (TeamId team, BfWGGameObjectBuilding *building) |
| Called when a wall/tower is broken. | |
| void | UpdateDamagedTowerCount (TeamId team) |
| Called when a tower is damaged. | |
| void | UpdatedDestroyedTowerCount (TeamId team) |
| Called when tower is broken. | |
| void | DoCompleteOrIncrementAchievement (uint32 achievement, Player *player, uint8 incrementNumber=1) override |
| void | RemoveAurasFromPlayer (Player *player) |
| bool | SetupBattlefield () override |
| Called when battlefield is setup, at server start. | |
| GameObject * | GetRelic () |
| Return pointer to relic object. | |
| void | SetRelic (ObjectGuid relicGUID) |
| Define relic object. | |
| bool | CanInteractWithRelic () |
| Check if players can interact with the relic (Only if the last door has been broken) | |
| void | SetRelicInteractible (bool allow) |
| Define if player can interact with the relic. | |
| void | UpdateVehicleCountWG () |
| void | UpdateCounterVehicle (bool init) |
| void | HandleKill (Player *killer, Unit *victim) override |
| Called when a Unit is kill in battlefield zone. | |
| void | OnUnitDeath (Unit *unit) override |
| void | HandlePromotion (Player *killer, Unit *killed) |
| void | PromotePlayer (Player *killer) |
| void | UpdateTenacity () |
| void | ProcessEvent (WorldObject *obj, uint32 eventId, WorldObject *invoker) override |
| bool | FindAndRemoveVehicleFromList (Unit *vehicle) |
| uint8 | GetSpiritGraveyardId (uint32 areaId) const |
| uint32 | GetData (uint32 data) const override |
| 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. | |
| 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. | |
| 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 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) |
| 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 | OnGameObjectRemove (GameObject *) |
| virtual void | OnAreaTriggerCreate (AreaTrigger *areaTrigger) |
| virtual void | OnAreaTriggerRemove (AreaTrigger *areaTrigger) |
| 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 200 of file BattlefieldWG.h.
| BattlefieldWG::~BattlefieldWG | ( | ) |
Definition at line 399 of file BattlefieldWG.cpp.
References BuildingsInZone, and Workshops.
|
delete |
|
delete |
|
explicit |
Constructor.
Definition at line 156 of file Battlefield.cpp.
| void BattlefieldWG::BrokenWallOrTower | ( | TeamId | team, |
| BfWGGameObjectBuilding * | building | ||
| ) |
Called when a wall/tower is broken.
Definition at line 1138 of file BattlefieldWG.cpp.
References ASSERT_NOTNULL, ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), Battlefield::GetGameObject(), BfWGGameObjectBuilding::GetGUID(), Battlefield::m_PlayersInWar, and QUEST_CREDIT_DEFEND_SIEGE.
Referenced by BfWGGameObjectBuilding::Destroyed().
|
inline |
Check if players can interact with the relic (Only if the last door has been broken)
Definition at line 313 of file BattlefieldWG.h.
References m_isRelicInteractible.
Referenced by ProcessEvent().
|
overridevirtual |
Reimplemented from Battlefield.
Definition at line 744 of file BattlefieldWG.cpp.
References ACHIEVEMENTS_WIN_WG_100, Player::CompletedAchievement(), and sAchievementStore.
Referenced by OnBattleEnd(), and UpdatedDestroyedTowerCount().
| bool BattlefieldWG::FindAndRemoveVehicleFromList | ( | Unit * | vehicle | ) |
Definition at line 965 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, BaseEntity::GetGUID(), m_vehicles, PVP_TEAMS_COUNT, and TEAM_HORDE.
Referenced by OnUnitDeath().
Reimplemented from Battlefield.
Definition at line 1117 of file BattlefieldWG.cpp.
References AREA_EASTPARK_WORKSHOP, AREA_THE_BROKEN_TEMPLATE, AREA_THE_SUNKEN_RING, AREA_WESTPARK_WORKSHOP, Battlefield::GetData(), Battlefield::GetGraveyardById(), and GetSpiritGraveyardId().
Referenced by OnCreatureCreate(), OnPlayerJoinWar(), UpdatedDestroyedTowerCount(), and UpdateVehicleCountWG().
|
inline |
Return pointer to relic object.
Definition at line 307 of file BattlefieldWG.h.
References Battlefield::GetGameObject(), and m_titansRelicGUID.
Referenced by BfWGGameObjectBuilding::Destroyed(), and ProcessEvent().
Definition at line 773 of file BattlefieldWG.cpp.
References AREA_EASTPARK_WORKSHOP, AREA_THE_BROKEN_TEMPLATE, AREA_THE_CHILLED_QUAGMIRE, AREA_THE_SUNKEN_RING, AREA_WESTPARK_WORKSHOP, AREA_WINTERGRASP, AREA_WINTERGRASP_FORTRESS, BATTLEFIELD_WG_GY_ALLIANCE, BATTLEFIELD_WG_GY_HORDE, BATTLEFIELD_WG_GY_KEEP, BATTLEFIELD_WG_GY_WORKSHOP_NE, BATTLEFIELD_WG_GY_WORKSHOP_NW, BATTLEFIELD_WG_GY_WORKSHOP_SE, BATTLEFIELD_WG_GY_WORKSHOP_SW, and TC_LOG_ERROR.
Referenced by GetData(), and OnCreatureCreate().
Called when a Unit is kill in battlefield zone.
@todoRecent PvP activity worldstate
Reimplemented from Battlefield.
Definition at line 949 of file BattlefieldWG.cpp.
References BaseEntity::GetTypeId(), HandlePromotion(), Unit::SetUnitFlag(), TYPEID_PLAYER, and UNIT_FLAG_SKINNABLE.
Definition at line 993 of file BattlefieldWG.cpp.
References ObjectAccessor::FindPlayer(), Player::GetTeamId(), Battlefield::m_PlayersInWar, and PromotePlayer().
Referenced by HandleKill(), and npc_wg_give_promotion_credit::npc_wg_give_promotion_creditAI::JustDied().
|
overridevirtual |
Called when battle end.
| endByTimer | : true if battle ended when timer is at 00:00, false if battle ended by clicking on relic |
Reimplemented from Battlefield.
Definition at line 626 of file BattlefieldWG.cpp.
References ACHIEVEMENTS_WIN_WG, ACHIEVEMENTS_WIN_WG_TIMER_10, BATTLEFIELD_WG_GY_HORDE, BATTLEFIELD_WG_TEXT_FORTRESS_CAPTURE_ALLIANCE, BATTLEFIELD_WG_TEXT_FORTRESS_CAPTURE_HORDE, BATTLEFIELD_WG_TEXT_FORTRESS_DEFEND_ALLIANCE, BATTLEFIELD_WG_TEXT_FORTRESS_DEFEND_HORDE, BuildingsInZone, CanonList, ObjectGuid::Clear(), ClockWorldState, DefenderPortalList, DoCompleteOrIncrementAchievement(), ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Battlefield::GetGameObject(), GameTime::GetGameTime(), Battlefield::GetGraveyardById(), Battlefield::GetTimer(), WorldStateMgr::GetValue(), Battlefield::HideNpc(), IN_MILLISECONDS, ObjectGuid::IsEmpty(), Battlefield::m_DefenderTeam, Battlefield::m_Map, Battlefield::m_players, Battlefield::m_PlayersInWar, Battlefield::m_Timer, m_titansRelicGUID, m_vehicles, PVP_TEAMS_COUNT, QUEST_VICTORY_WINTERGRASP_A, QUEST_VICTORY_WINTERGRASP_H, RemoveAurasFromPlayer(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, Battlefield::SendWarning(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), SPELL_ALLIANCE_CONTROL_PHASE_SHIFT, SPELL_DEFEAT_REWARD, SPELL_ESSENCE_OF_WINTERGRASP, SPELL_HORDE_CONTROL_PHASE_SHIFT, SPELL_VICTORY_REWARD, TEAM_ALLIANCE, TEAM_HORDE, WintergraspFaction, WS_BATTLEFIELD_WG_ATTACKED_A, WS_BATTLEFIELD_WG_ATTACKED_H, WS_BATTLEFIELD_WG_DEFENDED_A, WS_BATTLEFIELD_WG_DEFENDED_H, WS_BATTLEFIELD_WG_DEFENDER, WS_BATTLEFIELD_WG_SHOW_TIME_BATTLE_END, and WS_BATTLEFIELD_WG_SHOW_TIME_NEXT_BATTLE.
|
overridevirtual |
Called when the battle start.
Reimplemented from Battlefield.
Definition at line 538 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, BATTLEFIELD_WG_DATA_BROKEN_TOWER_DEF, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_DEF, BATTLEFIELD_WG_TEXT_START_BATTLE, BuildingsInZone, CanonList, ClockWorldState, ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), GO_FLAG_IN_USE, GO_FLAG_NOT_SELECTABLE, GO_WINTERGRASP_TITAN_S_RELIC, IN_MILLISECONDS, Battlefield::m_Map, Battlefield::m_players, Battlefield::m_Timer, m_titansRelicGUID, PVP_TEAMS_COUNT, Battlefield::SendWarning(), Battlefield::SetData(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), Battlefield::ShowNpc(), Battlefield::SpawnGameObject(), TC_LOG_ERROR, UpdateCounterVehicle(), WintergraspFaction, WintergraspRelicPos, WintergraspRelicRot, Workshops, WS_BATTLEFIELD_WG_ATTACKER, WS_BATTLEFIELD_WG_DEFENDER, WS_BATTLEFIELD_WG_SHOW_TIME_BATTLE_END, and WS_BATTLEFIELD_WG_SHOW_TIME_NEXT_BATTLE.
|
overridevirtual |
Called when a creature is created.
Reimplemented from ZoneScript.
Definition at line 799 of file BattlefieldWG.cpp.
References Unit::AddAura(), BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, WorldObject::CastSpell(), Creature::DespawnOrUnsummon(), ObjectAccessor::FindPlayer(), WorldObject::GetAreaId(), GetData(), Object::GetEntry(), BaseEntity::GetGUID(), GetSpiritGraveyardId(), TempSummon::GetSummonerGUID(), Player::GetTeamId(), Battlefield::IsWarTime(), Battlefield::m_GraveyardList, m_vehicles, NPC_DWARVEN_SPIRIT_GUIDE, NPC_TAUNKA_SPIRIT_GUIDE, NPC_WINTERGRASP_CATAPULT, NPC_WINTERGRASP_DEMOLISHER, NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE, NPC_WINTERGRASP_SIEGE_ENGINE_HORDE, SPELL_ALLIANCE_FLAG, SPELL_GRAB_PASSENGER, SPELL_HORDE_FLAG, TEAM_ALLIANCE, TEAM_HORDE, Unit::ToTempSummon(), and UpdateVehicleCountWG().
|
overridevirtual |
Called when a creature is removed.
Reimplemented from ZoneScript.
Definition at line 872 of file BattlefieldWG.cpp.
|
overridevirtual |
Called when a gameobject is created.
Reimplemented from ZoneScript.
Definition at line 905 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_WORKSHOP_NE, BATTLEFIELD_WG_WORKSHOP_NW, BATTLEFIELD_WG_WORKSHOP_SE, BATTLEFIELD_WG_WORKSHOP_SW, Battlefield::ControlZoneHandlers, Battlefield::GetAttackerTeam(), Object::GetEntry(), GO_WINTERGRASP_FACTORY_BANNER_NE, GO_WINTERGRASP_FACTORY_BANNER_NW, GO_WINTERGRASP_FACTORY_BANNER_SE, GO_WINTERGRASP_FACTORY_BANNER_SW, GameObject::HandleCustomTypeCommand(), TEAM_ALLIANCE, TEAM_HORDE, and Workshops.
|
overridevirtual |
Called when player enters in WG zone.
| player | : Player who enters the zone |
Reimplemented from Battlefield.
Definition at line 1109 of file BattlefieldWG.cpp.
References Unit::AddAura(), Battlefield::m_DefenderTeam, Battlefield::m_isActive, RemoveAurasFromPlayer(), SPELL_ALLIANCE_CONTROL_PHASE_SHIFT, SPELL_HORDE_CONTROL_PHASE_SHIFT, and TEAM_HORDE.
|
overridevirtual |
Called when player accept invite to join battle.
| player | : Player who accepted invite |
Reimplemented from Battlefield.
Definition at line 1047 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, WorldObject::CastSpell(), Battlefield::GetAttackerTeam(), GetData(), Battlefield::GetDefenderTeam(), Player::GetTeamId(), WorldObject::GetZoneId(), Battlefield::m_ZoneId, RemoveAurasFromPlayer(), Unit::SetAuraStack(), SPELL_RECRUIT, SPELL_TOWER_CONTROL, TEAM_HORDE, Player::TeleportTo(), and UpdateTenacity().
|
overridevirtual |
Called when player left the battle.
| player | : Player who left the battle |
Reimplemented from Battlefield.
Definition at line 1080 of file BattlefieldWG.cpp.
References Player::GetSession(), Unit::GetVehicleCreatureBase(), WorldSession::PlayerLogout(), Unit::RemoveAurasDueToSpell(), RemoveAurasFromPlayer(), SPELL_ALLIANCE_CONTROL_PHASE_SHIFT, SPELL_ALLIANCE_CONTROLS_FACTORY_PHASE_SHIFT, SPELL_HORDE_CONTROL_PHASE_SHIFT, SPELL_HORDE_CONTROLS_FACTORY_PHASE_SHIFT, and UpdateTenacity().
|
overridevirtual |
Called when player left the WG zone.
| player | : Player who left the zone |
Reimplemented from Battlefield.
Definition at line 1098 of file BattlefieldWG.cpp.
References Battlefield::m_isActive, Unit::RemoveAurasDueToSpell(), RemoveAurasFromPlayer(), SPELL_ALLIANCE_CONTROL_PHASE_SHIFT, SPELL_ALLIANCE_CONTROLS_FACTORY_PHASE_SHIFT, SPELL_HORDE_CONTROL_PHASE_SHIFT, and SPELL_HORDE_CONTROLS_FACTORY_PHASE_SHIFT.
|
overridevirtual |
Called when grouping starts (15 minutes before battlestart)
Reimplemented from Battlefield.
Definition at line 768 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_TEXT_START_GROUPING, and Battlefield::SendWarning().
|
overridevirtual |
Reimplemented from ZoneScript.
Definition at line 985 of file BattlefieldWG.cpp.
References FindAndRemoveVehicleFromList(), Unit::IsVehicle(), Battlefield::IsWarTime(), and UpdateVehicleCountWG().
|
overridevirtual |
Reimplemented from Battlefield.
Definition at line 1195 of file BattlefieldWG.cpp.
References BuildingsInZone, CanInteractWithRelic(), Battlefield::EndBattle(), Object::GetEntry(), Battlefield::GetGameObject(), BaseEntity::GetGUID(), GetRelic(), GO_WINTERGRASP_TITAN_S_RELIC, Battlefield::IsWarTime(), Battlefield::ProcessEvent(), RESPAWN_IMMEDIATELY, and Object::ToGameObject().
| void BattlefieldWG::PromotePlayer | ( | Player * | killer | ) |
Definition at line 1004 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_TEXT_RANK_CORPORAL, BATTLEFIELD_WG_TEXT_RANK_FIRST_LIEUTENANT, WorldObject::CastSpell(), CHAT_MSG_ADDON, Unit::GetAura(), Battlefield::GetCreature(), LANG_ADDON, Battlefield::m_isActive, Normal, Unit::RemoveAura(), sCreatureTextMgr, SPELL_CORPORAL, SPELL_LIEUTENANT, SPELL_RECRUIT, Battlefield::StalkerGuid, TEAM_OTHER, and TEXT_RANGE_NORMAL.
Referenced by HandlePromotion().
| void BattlefieldWG::RemoveAurasFromPlayer | ( | Player * | player | ) |
Definition at line 1035 of file BattlefieldWG.cpp.
References Unit::RemoveAurasDueToSpell(), SPELL_CORPORAL, SPELL_ESSENCE_OF_WINTERGRASP, SPELL_LIEUTENANT, SPELL_RECRUIT, SPELL_SPIRITUAL_IMMUNITY, SPELL_TENACITY, SPELL_TOWER_CONTROL, and SPELL_WINTERGRASP_RESTRICTED_FLIGHT_AREA.
Referenced by OnBattleEnd(), OnPlayerEnterZone(), OnPlayerJoinWar(), OnPlayerLeaveWar(), and OnPlayerLeaveZone().
|
inline |
|
inline |
Define if player can interact with the relic.
Definition at line 316 of file BattlefieldWG.h.
References m_isRelicInteractible.
Referenced by BfWGGameObjectBuilding::Destroyed().
|
overridevirtual |
Called when battlefield is setup, at server start.
Reimplemented from Battlefield.
Definition at line 408 of file BattlefieldWG.cpp.
References WintergraspGameObjectData::AllianceEntry, AREA_WINTERGRASP, BATTLEFIELD_BATTLEID_WG, BATTLEFIELD_WG, BATTLEFIELD_WG_DATA_MAX, BATTLEFIELD_WG_GRAVEYARD_MAX, BATTLEFIELD_WG_NPC_STALKER, BATTLEFIELD_WG_WORKSHOP_NE, BuildingsInZone, CanonList, ClockWorldState, CONFIG_WINTERGRASP_BATTLETIME, CONFIG_WINTERGRASP_ENABLE, CONFIG_WINTERGRASP_NOBATTLETIME, CONFIG_WINTERGRASP_PLR_MAX, CONFIG_WINTERGRASP_PLR_MIN, CONFIG_WINTERGRASP_PLR_MIN_LVL, CONFIG_WINTERGRASP_RESTART_AFTER_CRASH, DefenderPortalList, Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), Position::GetPosition(), WorldStateMgr::GetValue(), WintergraspWorkshop::GiveControlTo(), GO_DESTRUCTIBLE_DESTROYED, GO_WINTERGRASP_VAULT_GATE, Battlefield::HideNpc(), WintergraspGameObjectData::HordeEntry, IN_MILLISECONDS, BfWGGameObjectBuilding::Init(), BfGraveyard::Initialize(), Battlefield::InitStalker(), Battlefield::IsEnabled(), Battlefield::KickPosition, Battlefield::m_BattleId, Battlefield::m_BattleTime, Battlefield::m_Data32, Battlefield::m_DefenderTeam, 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, m_tenacityStack, m_tenacityTeam, Battlefield::m_TimeForAcceptInvite, Battlefield::m_Timer, Battlefield::m_TypeId, Battlefield::m_ZoneId, MINUTE, NPC_WINTERGRASP_TOWER_CANNON, WintergraspGameObjectData::Pos, Battlefield::RegisterZone(), Position::Relocate(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, WintergraspGameObjectData::Rot, Battlefield::SetGraveyardNumber(), BfGraveyardWG::SetTextId(), WorldStateMgr::SetValue(), WorldStateMgr::SetValueAndSaveInDb(), Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), sWorld, TEAM_ALLIANCE, TEAM_HORDE, TEAM_NEUTRAL, UpdateCounterVehicle(), urand(), WG_MAX_OBJ, WG_MAX_TELEPORTER, WG_MAX_TURRET, WG_MAX_WORKSHOP, WGGameObjectBuilding, WGGraveyard, WGPortalDefenderData, WGTurret, WintergraspStalkerPos, Workshops, WS_BATTLEFIELD_WG_ATTACKER, WS_BATTLEFIELD_WG_DEFENDER, and WS_BATTLEFIELD_WG_SHOW_TIME_NEXT_BATTLE.
| void BattlefieldWG::UpdateCounterVehicle | ( | bool | init | ) |
Definition at line 605 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, Battlefield::SetData(), TEAM_ALLIANCE, TEAM_HORDE, UpdateVehicleCountWG(), and Workshops.
Referenced by WintergraspWorkshop::GiveControlTo(), OnBattleStart(), and SetupBattlefield().
| void BattlefieldWG::UpdateDamagedTowerCount | ( | TeamId | team | ) |
Called when a tower is damaged.
Definition at line 1233 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_DEF, and Battlefield::GetAttackerTeam().
Referenced by BfWGGameObjectBuilding::Damaged().
| void BattlefieldWG::UpdatedDestroyedTowerCount | ( | TeamId | team | ) |
Called when tower is broken.
Definition at line 1152 of file BattlefieldWG.cpp.
References ACHIEVEMENTS_WG_TOWER_DESTROY, BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, BATTLEFIELD_WG_DATA_BROKEN_TOWER_DEF, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_DEF, ClockWorldState, DoCompleteOrIncrementAchievement(), ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), GetData(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), IN_MILLISECONDS, Battlefield::m_Map, Battlefield::m_PlayersInWar, Battlefield::m_Timer, QUEST_CREDIT_TOWERS_DESTROYED, WorldStateMgr::SetValue(), and SPELL_TOWER_CONTROL.
Referenced by BfWGGameObjectBuilding::Destroyed().
| void BattlefieldWG::UpdateTenacity | ( | ) |
Definition at line 1250 of file BattlefieldWG.cpp.
References ObjectAccessor::FindPlayer(), Battlefield::GetCreature(), Battlefield::m_MinLevel, Battlefield::m_players, Battlefield::m_PlayersInWar, m_tenacityStack, m_tenacityTeam, m_vehicles, SPELL_GREAT_HONOR, SPELL_GREATER_HONOR, SPELL_GREATEST_HONOR, SPELL_TENACITY, SPELL_TENACITY_VEHICLE, TEAM_ALLIANCE, TEAM_HORDE, and TEAM_NEUTRAL.
Referenced by OnPlayerJoinWar(), and OnPlayerLeaveWar().
| void BattlefieldWG::UpdateVehicleCountWG | ( | ) |
Definition at line 1242 of file BattlefieldWG.cpp.
References BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, GetData(), Battlefield::m_Map, WorldStateMgr::SetValue(), WS_BATTLEFIELD_WG_MAX_VEHICLE_A, WS_BATTLEFIELD_WG_MAX_VEHICLE_H, WS_BATTLEFIELD_WG_VEHICLE_A, and WS_BATTLEFIELD_WG_VEHICLE_H.
Referenced by OnCreatureCreate(), OnUnitDeath(), and UpdateCounterVehicle().
|
protected |
Definition at line 342 of file BattlefieldWG.h.
Referenced by OnBattleEnd(), OnBattleStart(), ProcessEvent(), SetupBattlefield(), and ~BattlefieldWG().
|
protected |
Definition at line 345 of file BattlefieldWG.h.
Referenced by OnBattleEnd(), OnBattleStart(), and SetupBattlefield().
|
protected |
Definition at line 341 of file BattlefieldWG.h.
Referenced by OnBattleEnd(), and SetupBattlefield().
|
protected |
Definition at line 337 of file BattlefieldWG.h.
Referenced by CanInteractWithRelic(), and SetRelicInteractible().
|
protected |
Definition at line 348 of file BattlefieldWG.h.
Referenced by SetupBattlefield(), and UpdateTenacity().
|
protected |
Definition at line 347 of file BattlefieldWG.h.
Referenced by SetupBattlefield(), and UpdateTenacity().
|
protected |
Definition at line 350 of file BattlefieldWG.h.
Referenced by GetRelic(), OnBattleEnd(), OnBattleStart(), and SetRelic().
|
protected |
Definition at line 344 of file BattlefieldWG.h.
Referenced by FindAndRemoveVehicleFromList(), OnBattleEnd(), OnCreatureCreate(), and UpdateTenacity().
|
protected |
Definition at line 339 of file BattlefieldWG.h.
Referenced by OnBattleStart(), OnGameObjectCreate(), SetupBattlefield(), UpdateCounterVehicle(), and ~BattlefieldWG().