AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "BattlefieldWG.h"
Public Member Functions | |
~BattlefieldWG () override | |
void | OnBattleStart () override |
Called when the battle start. More... | |
void | OnBattleEnd (bool endByTimer) override |
Called when battle end. More... | |
void | OnStartGrouping () override |
Called when grouping starts (15 minutes before battlestart) More... | |
void | OnPlayerJoinWar (Player *player) override |
Called when player accept invite to join battle. More... | |
void | OnPlayerLeaveWar (Player *player) override |
Called when player left the battle. More... | |
void | OnPlayerLeaveZone (Player *player) override |
Called when player left the WG zone. More... | |
void | OnPlayerEnterZone (Player *player) override |
Called when player enters in WG zone. More... | |
bool | Update (uint32 diff) override |
Called for update battlefield data. More... | |
void | OnCreatureCreate (Creature *creature) override |
Called when a creature is created. More... | |
void | OnCreatureRemove (Creature *creature) override |
Called when a creature is removed. More... | |
void | OnGameObjectCreate (GameObject *go) override |
Called when a gameobject is created. More... | |
void | BrokenWallOrTower (TeamId team) |
Called when a wall/tower is broken. More... | |
void | UpdateDamagedTowerCount (TeamId team) |
Called when a tower is damaged. More... | |
void | UpdatedDestroyedTowerCount (TeamId team, GameObject *go) |
Called when tower is broken. More... | |
void | RemoveAurasFromPlayer (Player *player) |
bool | SetupBattlefield () override |
Called when battlefield is setup, at server start. More... | |
GameObject * | GetRelic () |
Return pointer to relic object. More... | |
bool | CanInteractWithRelic () |
Define relic object. More... | |
void | SetRelicInteractible (bool allow) |
Define if player can interact with the relic. More... | |
void | UpdateCounterVehicle (bool init) |
Vehicle world states update. More... | |
void | UpdateVehicleCountWG () |
void | CapturePointTaken (uint32 areaId) |
void | SendInitWorldStatesTo (Player *player) |
void | SendInitWorldStatesToAll () override |
Send all worldstate data to all player in zone. More... | |
void | FillInitialWorldStates (WorldPacket &data) override |
void | HandleKill (Player *killer, Unit *victim) override |
Called when a Unit is kill in battlefield zone. More... | |
void | OnUnitDeath (Unit *unit) override |
void | PromotePlayer (Player *killer) |
uint32 | GetHonorBuff (int32 stack) const |
void | UpdateTenacity () |
void | AddUpdateTenacity (Player *player) |
void | RemoveUpdateTenacity (Player *player) |
void | ProcessEvent (WorldObject *obj, uint32 eventId) override |
bool | FindAndRemoveVehicleFromList (Unit *vehicle) |
uint8 | GetSpiritGraveyardId (uint32 areaId) const |
uint32 | GetAreaByGraveyardId (uint8 gId) const |
uint32 | GetData (uint32 data) const override |
bool | IsKeepNpc (uint32 entry) |
Public Member Functions inherited from Battlefield | |
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) |
Additional Inherited Members | |
Public Types inherited from Battlefield | |
typedef std::vector< BfCapturePoint * > | BfCapturePointVector |
typedef of map witch store capturepoint and the associate gameobject entry More... | |
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 | AddCapturePoint (BfCapturePoint *cp) |
void | RegisterZone (uint32 zoneid) |
bool | HasPlayer (Player *player) const |
void | TeamCastSpell (TeamId team, int32 spellId) |
|
override |
: Implement proper support for vehicle+player teleportation
: Use spell victory/defeat in wg instead of RewardMarkOfHonor() && RewardHonor
: Add proper implement of achievement
References BuildingsInZone, and WorkshopsList.
void BattlefieldWG::AddUpdateTenacity | ( | Player * | player | ) |
References Object::GetGUID(), and m_updateTenacityList.
Referenced by OnPlayerJoinWar().
void BattlefieldWG::BrokenWallOrTower | ( | TeamId | team | ) |
Called when a wall/tower is broken.
Referenced by BfWGGameObjectBuilding::Destroyed().
|
inline |
Define relic object.
Check if players can interact with the relic (Only if the last door has been broken)
References m_isRelicInteractible.
Referenced by ProcessEvent().
void BattlefieldWG::CapturePointTaken | ( | uint32 | areaId | ) |
References ObjectAccessor::FindPlayer(), Battlefield::m_players, and PVP_TEAMS_COUNT.
Referenced by WGWorkshop::GiveControlTo().
|
overridevirtual |
Implements Battlefield.
References BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, BATTLEFIELD_WG_WORLD_STATE_ACTIVE, BATTLEFIELD_WG_WORLD_STATE_ATTACKER, BATTLEFIELD_WG_WORLD_STATE_DEFENDER, BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A, BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H, BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE, BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A, BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H, BuildingsInZone, ClockWorldState, Battlefield::GetAttackerTeam(), GetData(), Battlefield::GetDefenderTeam(), GameTime::GetGameTime(), Battlefield::IsWarTime(), Battlefield::m_Timer, sWorld, WorkshopsData, WorkshopsList, WGWorkshopData::worldstate, WORLDSTATE_ALLIANCE_KEEP_CAPTURED, WORLDSTATE_ALLIANCE_KEEP_DEFENDED, WORLDSTATE_HORDE_KEEP_CAPTURED, and WORLDSTATE_HORDE_KEEP_DEFENDED.
Referenced by SendInitWorldStatesTo().
bool BattlefieldWG::FindAndRemoveVehicleFromList | ( | Unit * | vehicle | ) |
References BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, Object::GetGUID(), m_vehicles, and TEAM_HORDE.
Referenced by OnUnitDeath().
References AREA_EASTPARK_WORKSHOP, AREA_THE_BROKEN_TEMPLE, AREA_THE_SUNKEN_RING, AREA_WESTPARK_WORKSHOP, BATTLEFIELD_WG_GY_WORKSHOP_NE, BATTLEFIELD_WG_GY_WORKSHOP_NW, BATTLEFIELD_WG_GY_WORKSHOP_SE, and BATTLEFIELD_WG_GY_WORKSHOP_SW.
Referenced by WGWorkshop::GiveControlTo().
Reimplemented from Battlefield.
References AREA_EASTPARK_WORKSHOP, AREA_THE_BROKEN_TEMPLE, AREA_THE_CHILLED_QUAGMIRE, AREA_THE_SUNKEN_RING, AREA_WESTPARK_WORKSHOP, Battlefield::GetData(), Battlefield::GetGraveyardById(), and GetSpiritGraveyardId().
Referenced by FillInitialWorldStates(), OnBattleEnd(), OnCreatureCreate(), OnPlayerJoinWar(), UpdatedDestroyedTowerCount(), and UpdateVehicleCountWG().
References SPELL_GREAT_HONOR, SPELL_GREATER_HONOR, and SPELL_GREATEST_HONOR.
Referenced by UpdateTenacity().
|
inline |
Return pointer to relic object.
References Battlefield::GetGameObject(), and m_titansRelic.
Referenced by BfWGGameObjectBuilding::Destroyed(), OnBattleEnd(), and ProcessEvent().
References AREA_EASTPARK_WORKSHOP, AREA_THE_BROKEN_TEMPLE, 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 LOG_ERROR.
Referenced by GetData(), and OnCreatureCreate().
Called when a Unit is kill in battlefield zone.
Reimplemented from Battlefield.
References ObjectAccessor::FindPlayer(), Object::GetEntry(), Player::GetTeamId(), Unit::HasAura(), Unit::IsFriendlyTo(), IsKeepNpc(), Object::IsPlayer(), Unit::IsVehicle(), Battlefield::m_PlayersInWar, NPC_QUEST_PVP_KILL_ALLIANCE, NPC_QUEST_PVP_KILL_HORDE, NPC_QUEST_PVP_KILL_VEHICLE, NPC_WINTERGRASP_TOWER_CANNON, PromotePlayer(), Unit::SetUnitFlag(), SPELL_LIEUTENANT, TEAM_HORDE, and UNIT_FLAG_SKINNABLE.
|
inline |
References BATTLEFIELD_WG_NPC_ANCHORITE_TESSA, BATTLEFIELD_WG_NPC_BOWYER_RANDOLPH, BATTLEFIELD_WG_NPC_BRIGADIER_GENERAL, BATTLEFIELD_WG_NPC_CHAMPION_ROS_SLAI, BATTLEFIELD_WG_NPC_COMMANDER_DARDOSH, BATTLEFIELD_WG_NPC_COMMANDER_ZANNETH, BATTLEFIELD_WG_NPC_GUARD_A, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_HOODOO_MASTER_FU_JIN, BATTLEFIELD_WG_NPC_HORDE_WARBRINGER, BATTLEFIELD_WG_NPC_KNIGHT_DAMERON, BATTLEFIELD_WG_NPC_LIEUTENANT_MURP, BATTLEFIELD_WG_NPC_MARSHAL_MAGRUDER, BATTLEFIELD_WG_NPC_PRIMALIST_MULFORT, BATTLEFIELD_WG_NPC_SENIOR_DEMOLITIONIST_LEGOSO, BATTLEFIELD_WG_NPC_SIEGE_MASTER_STOUTHANDLE, BATTLEFIELD_WG_NPC_SIEGESMITH_STRONGHOOF, BATTLEFIELD_WG_NPC_SORCERESS_KAYLANA, BATTLEFIELD_WG_NPC_STONE_GUARD_MUKAR, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_AHBRAMIS, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_KILRATH, and BATTLEFIELD_WG_NPC_VIERON_BLAZEFEATHER.
Referenced by HandleKill().
|
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.
References BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_INTACT_TOWER_ATT, BATTLEFIELD_WG_GY_HORDE, BATTLEFIELD_WG_GY_WORKSHOP_SE, BATTLEFIELD_WG_GY_WORKSHOP_SW, BATTLEFIELD_WG_TEXT_DEFEND_KEEP, BATTLEFIELD_WG_TEXT_WIN_KEEP, BATTLEFIELD_WG_WORKSHOP_SE, BATTLEFIELD_WG_WORKSHOP_SW, BuildingsInZone, CanonList, ObjectGuid::Clear(), DefenderPortalList, ObjectAccessor::FindPlayer(), GAMEOBJECT_FACTION, Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), GetData(), Battlefield::GetDefenderTeam(), Battlefield::GetGraveyardById(), GetRelic(), Battlefield::HideNpc(), KeepCreature, Battlefield::m_DefenderTeam, m_KeepGameObject, Battlefield::m_players, Battlefield::m_PlayersInWar, m_titansRelic, m_vehicles, OutsideCreature, RemoveAurasFromPlayer(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, Battlefield::SendWarning(), Battlefield::ShowNpc(), SPELL_ALLIANCE_CONTROL_PHASE_SHIFT, SPELL_DAMAGED_BUILDING, SPELL_DAMAGED_TOWER, SPELL_DEFEAT_REWARD, SPELL_DESTROYED_TOWER, SPELL_ESSENCE_OF_WINTERGRASP, SPELL_HORDE_CONTROL_PHASE_SHIFT, SPELL_INTACT_BUILDING, SPELL_VICTORY_REWARD, sWorld, TEAM_ALLIANCE, TEAM_HORDE, WintergraspFaction, WorkshopsList, WORLDSTATE_ALLIANCE_KEEP_CAPTURED, WORLDSTATE_ALLIANCE_KEEP_DEFENDED, WORLDSTATE_HORDE_KEEP_CAPTURED, and WORLDSTATE_HORDE_KEEP_DEFENDED.
|
overridevirtual |
Called when the battle start.
Reimplemented from Battlefield.
References BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_INTACT_TOWER_ATT, BATTLEFIELD_WG_TEXT_START, BATTLEFIELD_WG_WORLD_START_MESSAGE, BuildingsInZone, CanonList, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, ObjectAccessor::FindPlayer(), GAMEOBJECT_FACTION, Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Object::GetGUID(), GO_FLAG_NOT_SELECTABLE, GO_WINTERGRASP_FACTORY_BANNER_SE, GO_WINTERGRASP_FACTORY_BANNER_SW, GO_WINTERGRASP_TITAN_S_RELIC, LOG_ERROR, Battlefield::m_capturePoints, Battlefield::m_players, m_tenacityStack, m_tenacityUpdateTimer, m_titansRelic, SendInitWorldStatesTo(), Battlefield::SendWarning(), ChatHandler::SendWorldText(), Battlefield::SetData(), GameObject::SetGameObjectFlag(), Object::SetUInt32Value(), Battlefield::ShowNpc(), Battlefield::SpawnGameObject(), sWorld, UpdateCounterVehicle(), WG_MAX_ATTACKTOWERS, WintergraspFaction, and WorkshopsList.
|
overridevirtual |
Called when a creature is created.
Reimplemented from ZoneScript.
References BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, BATTLEFIELD_WG_GY_WORKSHOP_NW, Unit::CastSpell(), Creature::DespawnOrUnsummon(), ObjectAccessor::FindPlayer(), WorldObject::GetAreaId(), GetData(), Object::GetEntry(), Object::GetGUID(), GetSpiritGraveyardId(), TempSummon::GetSummonerGUID(), TempSummon::GetSummonerUnit(), Player::GetTeamId(), Unit::IsSummon(), Battlefield::IsWarTime(), WorldObject::IsWithinDist2d(), 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, NPC_WINTERGRASP_SIEGE_ENGINE_TURRET_ALLIANCE, NPC_WINTERGRASP_SIEGE_ENGINE_TURRET_HORDE, Unit::SetFaction(), SPELL_ALLIANCE_FLAG, SPELL_HORDE_FLAG, TEAM_ALLIANCE, TEAM_HORDE, Unit::ToTempSummon(), and UpdateVehicleCountWG().
|
overridevirtual |
Called when a creature is removed.
Reimplemented from ZoneScript.
|
overridevirtual |
Called when a gameobject is created.
Reimplemented from ZoneScript.
References Battlefield::AddCapturePoint(), BATTLEFIELD_WG_WORKSHOP_NE, BATTLEFIELD_WG_WORKSHOP_NW, BATTLEFIELD_WG_WORKSHOP_SE, BATTLEFIELD_WG_WORKSHOP_SW, Object::GetEntry(), GO_WINTERGRASP_FACTORY_BANNER_NE, GO_WINTERGRASP_FACTORY_BANNER_NW, GO_WINTERGRASP_FACTORY_BANNER_SE, GO_WINTERGRASP_FACTORY_BANNER_SW, WintergraspCapturePoint::LinkToWorkshop(), BfCapturePoint::SetCapturePointData(), TEAM_NEUTRAL, and WorkshopsList.
|
overridevirtual |
Called when player enters in WG zone.
player | : Player who enters the zone |
Reimplemented from Battlefield.
References Unit::AddAura(), Battlefield::GetAttackerTeam(), Object::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), Player::GetTeamId(), Battlefield::KickPlayerFromBattlefield(), Battlefield::m_DefenderTeam, Battlefield::m_isActive, RemoveAurasFromPlayer(), SendInitWorldStatesTo(), 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.
References AddUpdateTenacity(), BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, Unit::CastSpell(), Battlefield::GetAttackerTeam(), GetData(), Battlefield::GetDefenderTeam(), Player::GetTeamId(), RemoveAurasFromPlayer(), SendInitWorldStatesTo(), Unit::SetAuraStack(), SPELL_RECRUIT, SPELL_TOWER_CONTROL, TEAM_HORDE, and Player::TeleportTo().
|
overridevirtual |
Called when player left the battle.
player | : Player who left the battle |
Reimplemented from Battlefield.
References Vehicle::Dismiss(), Player::GetSession(), Unit::GetVehicle(), WorldSession::PlayerLogout(), RemoveAurasFromPlayer(), and RemoveUpdateTenacity().
|
overridevirtual |
Called when player left the WG zone.
player | : Player who left the zone |
Reimplemented from Battlefield.
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.
References BATTLEFIELD_WG_TEXT_WILL_START, Battlefield::IsWarTime(), and Battlefield::SendWarning().
|
overridevirtual |
Reimplemented from ZoneScript.
References FindAndRemoveVehicleFromList(), Unit::IsVehicle(), Battlefield::IsWarTime(), and UpdateVehicleCountWG().
|
overridevirtual |
Reimplemented from ZoneScript.
References BuildingsInZone, CanInteractWithRelic(), Battlefield::EndBattle(), Object::GetEntry(), ObjectAccessor::GetGameObject(), GetRelic(), GO_WINTERGRASP_TITAN_S_RELIC, Battlefield::IsWarTime(), RESPAWN_IMMEDIATELY, and Object::ToGameObject().
void BattlefieldWG::PromotePlayer | ( | Player * | killer | ) |
References BATTLEFIELD_WG_TEXT_FIRSTRANK, BATTLEFIELD_WG_TEXT_SECONDRANK, Unit::CastSpell(), Unit::GetAura(), Battlefield::m_isActive, Unit::RemoveAura(), Battlefield::SendWarning(), SPELL_CORPORAL, SPELL_LIEUTENANT, and SPELL_RECRUIT.
Referenced by HandleKill().
void BattlefieldWG::RemoveAurasFromPlayer | ( | Player * | player | ) |
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().
void BattlefieldWG::RemoveUpdateTenacity | ( | Player * | player | ) |
References ObjectGuid::Empty, Object::GetGUID(), and m_updateTenacityList.
Referenced by OnPlayerLeaveWar().
void BattlefieldWG::SendInitWorldStatesTo | ( | Player * | player | ) |
References BuildingsInZone, FillInitialWorldStates(), Player::GetSession(), Battlefield::m_MapId, Battlefield::m_ZoneId, WorldSession::SendPacket(), SMSG_INIT_WORLD_STATES, and WorkshopsList.
Referenced by OnBattleStart(), OnPlayerEnterZone(), OnPlayerJoinWar(), and SendInitWorldStatesToAll().
|
overridevirtual |
Send all worldstate data to all player in zone.
Implements Battlefield.
References ObjectAccessor::FindPlayer(), Battlefield::m_players, and SendInitWorldStatesTo().
Referenced by UpdatedDestroyedTowerCount().
|
inline |
Define if player can interact with the relic.
References m_isRelicInteractible.
Referenced by BfWGGameObjectBuilding::Destroyed().
|
overridevirtual |
Called when battlefield is setup, at server start.
Reimplemented from Battlefield.
References BATTLEFIELD_BATTLEID_WG, BATTLEFIELD_WG, BATTLEFIELD_WG_DATA_MAX, BATTLEFIELD_WG_GRAVEYARD_MAX, BATTLEFIELD_WG_GY_WORKSHOP_SE, BATTLEFIELD_WG_GY_WORKSHOP_SW, BATTLEFIELD_WG_MAPID, BATTLEFIELD_WG_NPC_STALKER, BATTLEFIELD_WG_WORKSHOP_SE, BATTLEFIELD_WG_WORKSHOP_SW, BATTLEFIELD_WG_WORLD_STATE_ACTIVE, BATTLEFIELD_WG_WORLD_STATE_DEFENDER, BATTLEFIELD_WG_ZONEID, BuildingsInZone, CanonList, ObjectGuid::Clear(), 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, GAMEOBJECT_FACTION, Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Position::GetPosition(), WGWorkshop::GiveControlTo(), Battlefield::HideNpc(), IN_MILLISECONDS, BfWGGameObjectBuilding::Init(), BfGraveyard::Initialize(), Battlefield::InitStalker(), KeepCreature, 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, m_saveTimer, Battlefield::m_StartGrouping, Battlefield::m_StartGroupingTimer, m_tenacityStack, Battlefield::m_TimeForAcceptInvite, Battlefield::m_Timer, m_titansRelic, Battlefield::m_TypeId, Battlefield::m_ZoneId, MINUTE, NPC_WINTERGRASP_TOWER_CANNON, OutsideCreature, Battlefield::RegisterZone(), Position::Relocate(), Battlefield::SetGraveyardNumber(), BfGraveyardWG::SetTextId(), Object::SetUInt32Value(), sMapMgr, Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), sWorld, TEAM_ALLIANCE, TEAM_HORDE, TEAM_NEUTRAL, UpdateCounterVehicle(), urand(), WG_MAX_KEEP_NPC, WG_MAX_OBJ, WG_MAX_OUTSIDE_NPC, WG_MAX_TELEPORTER, WG_MAX_TURRET, WG_MAX_WORKSHOP, WG_OUTSIDE_ALLIANCE_NPC, WGGameObjectBuilding, WGGraveYard, WGKeepNPC, WGOutsideNPC, WGPortalDefenderData, WGTurret, WintergraspFaction, WintergraspStalkerPos, and WorkshopsList.
|
overridevirtual |
Called for update battlefield data.
diff | : time elapsed since the last call (in ms) |
Reimplemented from Battlefield.
References BATTLEFIELD_WG_WORLD_STATE_ACTIVE, BATTLEFIELD_WG_WORLD_STATE_DEFENDER, ClockWorldState, IN_MILLISECONDS, Battlefield::IsWarTime(), Battlefield::m_DefenderTeam, Battlefield::m_isActive, m_saveTimer, m_tenacityUpdateTimer, Battlefield::m_Timer, m_updateTenacityList, sWorld, Battlefield::Update(), and UpdateTenacity().
void BattlefieldWG::UpdateCounterVehicle | ( | bool | init | ) |
Vehicle world states update.
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 WorkshopsList.
Referenced by WGWorkshop::GiveControlTo(), OnBattleStart(), and SetupBattlefield().
void BattlefieldWG::UpdateDamagedTowerCount | ( | TeamId | team | ) |
Called when a tower is damaged.
References BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, BATTLEFIELD_WG_DATA_INTACT_TOWER_ATT, and Battlefield::GetAttackerTeam().
Referenced by BfWGGameObjectBuilding::Damaged().
void BattlefieldWG::UpdatedDestroyedTowerCount | ( | TeamId | team, |
GameObject * | go | ||
) |
Called when tower is broken.
References ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, BATTLEFIELD_WG_DATA_BROKEN_TOWER_ATT, BATTLEFIELD_WG_DATA_DAMAGED_TOWER_ATT, ObjectAccessor::FindPlayer(), Battlefield::GetAttackerTeam(), GetData(), Battlefield::GetDefenderTeam(), WorldObject::GetDistance2d(), Battlefield::m_PlayersInWar, Battlefield::m_Timer, NPC_QUEST_SOUTHERN_TOWER_KILL, NPC_QUEST_VEHICLE_PROTECTED, SendInitWorldStatesToAll(), SPELL_LEANING_TOWER_ACHIEVEMENT, and SPELL_TOWER_CONTROL.
Referenced by BfWGGameObjectBuilding::Destroyed().
void BattlefieldWG::UpdateTenacity | ( | ) |
References ObjectAccessor::FindPlayer(), Battlefield::GetCreature(), GetHonorBuff(), Battlefield::m_PlayersInWar, m_tenacityStack, m_updateTenacityList, m_vehicles, SPELL_TENACITY, SPELL_TENACITY_VEHICLE, TEAM_ALLIANCE, TEAM_HORDE, and TEAM_NEUTRAL.
Referenced by Update().
void BattlefieldWG::UpdateVehicleCountWG | ( | ) |
References BATTLEFIELD_WG_DATA_MAX_VEHICLE_A, BATTLEFIELD_WG_DATA_MAX_VEHICLE_H, BATTLEFIELD_WG_DATA_VEHICLE_A, BATTLEFIELD_WG_DATA_VEHICLE_H, BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A, BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H, BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A, BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H, ObjectAccessor::FindPlayer(), GetData(), Battlefield::m_players, and PVP_TEAMS_COUNT.
Referenced by OnCreatureCreate(), OnUnitDeath(), and UpdateCounterVehicle().
|
protected |
Referenced by FillInitialWorldStates(), OnBattleEnd(), OnBattleStart(), ProcessEvent(), SendInitWorldStatesTo(), SetupBattlefield(), and ~BattlefieldWG().
|
protected |
Referenced by OnBattleEnd(), OnBattleStart(), and SetupBattlefield().
|
protected |
Referenced by OnBattleEnd(), and SetupBattlefield().
|
protected |
Referenced by OnBattleEnd(), and SetupBattlefield().
|
protected |
Referenced by CanInteractWithRelic(), and SetRelicInteractible().
|
protected |
Referenced by OnBattleEnd().
|
protected |
Referenced by SetupBattlefield(), and Update().
|
protected |
Referenced by OnBattleStart(), SetupBattlefield(), and UpdateTenacity().
|
protected |
Referenced by OnBattleStart(), and Update().
|
protected |
Referenced by GetRelic(), OnBattleEnd(), OnBattleStart(), and SetupBattlefield().
|
protected |
Referenced by AddUpdateTenacity(), RemoveUpdateTenacity(), Update(), and UpdateTenacity().
|
protected |
Referenced by FindAndRemoveVehicleFromList(), OnBattleEnd(), OnCreatureCreate(), and UpdateTenacity().
|
protected |
Referenced by OnBattleEnd(), and SetupBattlefield().
|
protected |