![]() |
TrinityCore
|
Class for manage Strand of Ancient battleground. More...
#include <BattlegroundSA.h>
Inheritance diagram for BattlegroundSA:Public Member Functions | |
| BattlegroundSA () | |
| ~BattlegroundSA () | |
| void | PostUpdateImpl (uint32 diff) override |
| Called every time for update battle data -Update timer -Round switch. | |
| void | AddPlayer (Player *player) override |
| Called when a player join battle. | |
| void | StartingEventCloseDoors () override |
| Called when battle start. | |
| void | StartingEventOpenDoors () override |
| bool | SetupBattleground () override |
| Called for ini battleground, after that the first player be entered. | |
| void | Reset () override |
| void | FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override |
| Called for generate packet contain worldstate data. | |
| void | HandleKillUnit (Creature *creature, Player *killer) override |
| Called when a player kill a unit in bg. | |
| WorldSafeLocsEntry const * | GetClosestGraveyard (Player *player) override |
| Return the nearest graveyard where player can respawn. | |
| void | ProcessEvent (WorldObject *, uint32, WorldObject *=nullptr) override |
| Called when someone activates an event. | |
| void | EventPlayerClickedOnFlag (Player *source, GameObject *go) override |
| Called when a player click on flag (graveyard flag) | |
| void | TitanRelicActivated (Player *clicker) |
| Called when a player clicked on relic. | |
| GateInfo const * | GetGate (uint32 entry) |
| Return GateInfo, relative to bg data, according to gameobject entry. | |
| void | EndBattleground (uint32 winner) override |
| Called on battleground ending. | |
| void | RemovePlayer (Player *player, ObjectGuid guid, uint32 team) override |
| Called when a player leave battleground. | |
| void | HandleAreaTrigger (Player *Source, uint32 Trigger) override |
| bool | CheckAchievementCriteriaMeet (uint32 criteriaId, Player const *source, Unit const *target=nullptr, uint32 miscValue=0) override |
| bool | IsSpellAllowed (uint32 spellId, Player const *player) const override |
Public Member Functions inherited from Battleground | |
| Battleground () | |
| virtual | ~Battleground () |
| void | Update (uint32 diff) |
| virtual void | ResetBGSubclass () |
| virtual bool | IsAllNodesControlledByTeam (uint32) const |
| void | StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry) |
| std::string const & | GetName () const |
| BattlegroundTypeId | GetTypeID (bool GetRandom=false) const |
| BattlegroundBracketId | GetBracketId () const |
| uint32 | GetInstanceID () const |
| BattlegroundStatus | GetStatus () const |
| uint32 | GetClientInstanceID () const |
| uint32 | GetStartTime () const |
| uint32 | GetEndTime () const |
| uint32 | GetLastResurrectTime () const |
| uint32 | GetMaxPlayers () const |
| uint32 | GetMinPlayers () const |
| uint32 | GetMinLevel () const |
| uint32 | GetMaxLevel () const |
| uint32 | GetMaxPlayersPerTeam () const |
| uint32 | GetMinPlayersPerTeam () const |
| int32 | GetStartDelayTime () const |
| uint8 | GetArenaType () const |
| PvPTeamId | GetWinner () const |
| uint32 | GetScriptId () const |
| uint32 | GetBonusHonorFromKill (uint32 kills) const |
| bool | IsRandom () const |
| void | SetName (std::string const &name) |
| void | SetTypeID (BattlegroundTypeId TypeID) |
| void | SetRandomTypeID (BattlegroundTypeId TypeID) |
| void | SetBracket (PvPDifficultyEntry const *bracketEntry) |
| void | SetInstanceID (uint32 InstanceID) |
| void | SetStatus (BattlegroundStatus Status) |
| void | SetClientInstanceID (uint32 InstanceID) |
| void | SetStartTime (uint32 Time) |
| void | SetEndTime (uint32 Time) |
| void | SetLastResurrectTime (uint32 Time) |
| void | SetMaxPlayers (uint32 MaxPlayers) |
| void | SetMinPlayers (uint32 MinPlayers) |
| void | SetLevelRange (uint32 min, uint32 max) |
| void | SetRated (bool state) |
| void | SetArenaType (uint8 type) |
| void | SetArenaorBGType (bool _isArena) |
| void | SetWinner (PvPTeamId winnerTeamId) |
| void | SetScriptId (uint32 scriptId) |
| void | ModifyStartDelayTime (int diff) |
| void | SetStartDelayTime (int Time) |
| void | SetMaxPlayersPerTeam (uint32 MaxPlayers) |
| void | SetMinPlayersPerTeam (uint32 MinPlayers) |
| void | AddToBGFreeSlotQueue () |
| void | RemoveFromBGFreeSlotQueue () |
| void | RemoveFromBGFreeSlotQueueOnShutdown () |
| void | DecreaseInvitedCount (uint32 team) |
| void | IncreaseInvitedCount (uint32 team) |
| void | SetRandom (bool isRandom) |
| uint32 | GetInvitedCount (uint32 team) const |
| bool | HasFreeSlots () const |
| uint32 | GetFreeSlotsForTeam (uint32 Team) const |
| bool | isArena () const |
| bool | isBattleground () const |
| bool | isRated () const |
| BattlegroundPlayerMap const & | GetPlayers () const |
| uint32 | GetPlayersSize () const |
| uint32 | GetPlayerScoresSize () const |
| uint32 | GetReviveQueueSize () const |
| void | AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid) |
| void | RemovePlayerFromResurrectQueue (ObjectGuid player_guid) |
| void | RelocateDeadPlayers (ObjectGuid guideGuid) |
| Relocate all players in ReviveQueue to the closest graveyard. | |
| void | StartBattleground () |
| GameObject * | GetBGObject (uint32 type, bool logError=true) |
| Creature * | GetBGCreature (uint32 type, bool logError=true) |
| void | SetMapId (uint32 MapID) |
| uint32 | GetMapId () const |
| void | SetBgMap (BattlegroundMap *map) |
| BattlegroundMap * | GetBgMap () const |
| BattlegroundMap * | FindBgMap () const |
| void | SetTeamStartPosition (TeamId teamId, Position const &pos) |
| Position const * | GetTeamStartPosition (TeamId teamId) const |
| void | SetStartMaxDist (float startMaxDist) |
| float | GetStartMaxDist () const |
| void | SendPacketToTeam (uint32 TeamID, WorldPacket const *packet, Player *sender=nullptr, bool self=true) const |
| void | SendPacketToAll (WorldPacket const *packet) const |
| void | SendChatMessage (Creature *source, uint8 textId, WorldObject *target=nullptr) |
| void | SendBroadcastText (uint32 id, ChatMsg msgType, WorldObject const *target=nullptr) |
| template<class Do > | |
| void | BroadcastWorker (Do &_do) |
| void | PlaySoundToTeam (uint32 soundID, uint32 teamID) |
| void | PlaySoundToAll (uint32 soundID) |
| void | CastSpellOnTeam (uint32 SpellID, uint32 TeamID) |
| void | RemoveAuraOnTeam (uint32 SpellID, uint32 TeamID) |
| void | RewardHonorToTeam (uint32 Honor, uint32 TeamID) |
| void | RewardReputationToTeam (uint32 faction_id, uint32 Reputation, uint32 TeamID) |
| void | UpdateWorldState (uint32 variable, uint32 value) |
| void | BlockMovement (Player *player) |
| void | SendWarningToAll (uint32 entry,...) |
| void | SendMessageToAll (uint32 entry, ChatMsg type, Player const *source=nullptr) |
| void | PSendMessageToAll (uint32 entry, ChatMsg type, Player const *source,...) |
| Group * | GetBgRaid (uint32 TeamID) const |
| void | SetBgRaid (uint32 TeamID, Group *bg_raid) |
| void | BuildPvPLogDataPacket (WorldPackets::Battleground::PVPMatchStatistics &pvpLogData) |
| virtual bool | UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true) |
| uint32 | GetPlayersCountByTeam (uint32 Team) const |
| uint32 | GetAlivePlayersCountByTeam (uint32 Team) const |
| void | UpdatePlayersCountByTeam (uint32 Team, bool remove) |
| virtual void | CheckWinConditions () |
| void | SetArenaTeamIdForTeam (uint32 Team, uint32 ArenaTeamId) |
| uint32 | GetArenaTeamIdForTeam (uint32 Team) const |
| uint32 | GetArenaTeamIdByIndex (uint32 index) const |
| void | SetArenaMatchmakerRating (uint32 Team, uint32 MMR) |
| uint32 | GetArenaMatchmakerRating (uint32 Team) const |
| virtual void | HandleKillPlayer (Player *player, Player *killer) |
| virtual void | EventPlayerDroppedFlag (Player *) |
| void | EventPlayerLoggedIn (Player *player) |
| void | EventPlayerLoggedOut (Player *player) |
| virtual void | DoAction (uint32, ObjectGuid) |
| virtual void | HandlePlayerResurrect (Player *) |
| void | AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team) |
| virtual void | RemovePlayerAtLeave (ObjectGuid guid, bool Transport, bool SendPacket) |
| void | HandleTriggerBuff (ObjectGuid go_guid) |
| void | SetHoliday (bool is_holiday) |
| void | SpawnBGObject (uint32 type, uint32 respawntime) |
| virtual bool | AddObject (uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY) |
| bool | AddObject (uint32 type, uint32 entry, Position const &pos, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY) |
| virtual Creature * | AddCreature (uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=nullptr) |
| Creature * | AddCreature (uint32 entry, uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=nullptr) |
| bool | DelCreature (uint32 type) |
| bool | DelObject (uint32 type) |
| bool | RemoveObjectFromWorld (uint32 type) |
| virtual bool | AddSpiritGuide (uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL) |
| bool | AddSpiritGuide (uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL) |
| int32 | GetObjectType (ObjectGuid guid) |
| void | DoorOpen (uint32 type) |
| void | DoorClose (uint32 type) |
| virtual bool | HandlePlayerUnderMap (Player *) |
| uint32 | GetPlayerTeam (ObjectGuid guid) const |
| uint32 | GetOtherTeam (uint32 teamId) const |
| bool | IsPlayerInBattleground (ObjectGuid guid) const |
| bool | ToBeDeleted () const |
| void | SetDeleteThis () |
| void | RewardXPAtKill (Player *killer, Player *victim) |
| bool | CanAwardArenaPoints () const |
| virtual ObjectGuid | GetFlagPickerGUID (int32=-1) const |
| virtual void | SetDroppedFlagGUID (ObjectGuid, int32=-1) |
| virtual void | HandleQuestComplete (uint32, Player *) |
| virtual bool | CanActivateGO (int32, uint32) const |
| uint32 | GetTeamScore (uint32 TeamID) const |
| virtual uint32 | GetPrematureWinner () |
| uint8 | GetUniqueBracketId () const |
| BattlegroundPlayer const * | GetBattlegroundPlayerData (ObjectGuid const &playerGuid) const |
| Trinity::unique_weak_ptr< Battleground > | GetWeakPtr () const |
| void | SetWeakPtr (Trinity::unique_weak_ptr< Battleground > weakRef) |
Private Member Functions | |
| bool | ResetObjs () |
| Called on setup and between the two round -Delete all gameobject / creature -Respawn all gameobject / creature to have good faction. | |
| void | StartShips () |
| Called for start ship movement. | |
| void | TeleportPlayers () |
| Called between the two round -Teleport all players to good location. | |
| void | TeleportToEntrancePosition (Player *player) |
| void | OverrideGunFaction () |
| Called on start and between the two round -Update faction of all vehicle. | |
| void | DemolisherStartState (bool start) |
| Set selectable or not demolisher, called on battle start, when boats arrive to dock. | |
| bool | CanInteractWithObject (uint32 objectId) |
| Checks if a player can interact with the given object. | |
| void | UpdateObjectInteractionFlags (uint32 objectId) |
| Updates interaction flags of specific objects. | |
| void | UpdateObjectInteractionFlags () |
| void | DestroyGate (Player *player, GameObject *go) override |
| Called when a gate is destroy -Give honor to player witch destroy it -Update worldstate -Delete gameobject in front of door (lighting object, with different colours for each door) | |
| void | SendTime () |
| Update timer worldstate. | |
| void | CaptureGraveyard (BG_SA_Graveyards i, Player *Source) |
| Called when a graveyard is capture -Update spiritguide -Update gameobject (flag) -Update Worldstate -Send warning for announce this. | |
| void | ToggleTimer () |
| Switch on/off timer worldstate. | |
| void | UpdateDemolisherSpawns () |
| Respawn dead demolisher. | |
| void | SendTransportInit (Player *player) |
| Send packet to player for create boats (client part) | |
| void | SendTransportsRemove (Player *player) |
| Send packet to player for destroy boats (client part) | |
Private Attributes | |
| TeamId | Attackers |
| Id of attacker team. | |
| uint32 | TotalTime |
| Totale elapsed time of current round. | |
| uint32 | EndRoundTimer |
| Max time of round. | |
| bool | ShipsStarted |
| For know if boats has start moving or not yet. | |
| BG_SA_GateState | GateStatus [MAX_GATES] |
| Status of each gate (Destroy/Damage/Intact) | |
| BG_SA_Status | Status |
| Statu of battle (Start or not, and what round) | |
| TeamId | GraveyardStatus [BG_SA_MAX_GY] |
| Team witch conntrol each graveyard. | |
| BG_SA_RoundScore | RoundScores [2] |
| Score of each round. | |
| bool | TimerEnabled |
| used for know we are in timer phase or not (used for worldstate update) | |
| uint32 | UpdateWaitTimer |
| 5secs before starting the 1min countdown for second round | |
| bool | SignaledRoundTwo |
| for know if warning about second round start has been sent | |
| bool | SignaledRoundTwoHalfMin |
| for know if warning about second round start has been sent | |
| bool | InitSecondRound |
| for know if second round has been init | |
| std::map< uint32, uint32 > | DemoliserRespawnList |
| bool | _gateDestroyed |
| bool | _allVehiclesAlive [PVP_TEAMS_COUNT] |
Class for manage Strand of Ancient battleground.
Definition at line 552 of file BattlegroundSA.h.
| BattlegroundSA::BattlegroundSA | ( | ) |
This is here to prevent an uninitialised variable warning The warning only occurs when SetUpBattleGround fails though. In the future this function should be called BEFORE sending initial worldstates.
Definition at line 37 of file BattlegroundSA.cpp.
Here is the call graph for this function:| BattlegroundSA::~BattlegroundSA | ( | ) |
Definition at line 71 of file BattlegroundSA.cpp.
|
overridevirtual |
Called when a player join battle.
Reimplemented from Battleground.
Definition at line 481 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
private |
Checks if a player can interact with the given object.
Definition at line 737 of file BattlegroundSA.cpp.
Here is the caller graph for this function:
|
private |
Called when a graveyard is capture -Update spiritguide -Update gameobject (flag) -Update Worldstate -Send warning for announce this.
| i | : id of graveyard |
| Source | : Player who capture gy |
Definition at line 804 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from Battleground.
Definition at line 1043 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
private |
Set selectable or not demolisher, called on battle start, when boats arrive to dock.
Definition at line 672 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Called when a gate is destroy -Give honor to player witch destroy it -Update worldstate -Delete gameobject in front of door (lighting object, with different colours for each door)
Reimplemented from Battleground.
Definition at line 690 of file BattlegroundSA.cpp.
|
overridevirtual |
Called on battleground ending.
Reimplemented from Battleground.
Definition at line 966 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Called when a player click on flag (graveyard flag)
Reimplemented from Battleground.
Definition at line 780 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
overridevirtual |
Called for generate packet contain worldstate data.
Reimplemented from Battleground.
Definition at line 444 of file BattlegroundSA.cpp.
|
overridevirtual |
Return the nearest graveyard where player can respawn.
Reimplemented from Battleground.
Definition at line 694 of file BattlegroundSA.cpp.
Here is the call graph for this function:Return GateInfo, relative to bg data, according to gameobject entry.
Definition at line 588 of file BattlegroundSA.h.
Here is the caller graph for this function:Reimplemented from Battleground.
Definition at line 496 of file BattlegroundSA.cpp.
Here is the call graph for this function:Called when a player kill a unit in bg.
Reimplemented from Battleground.
Definition at line 641 of file BattlegroundSA.cpp.
Here is the call graph for this function:Reimplemented from Battleground.
Definition at line 1056 of file BattlegroundSA.cpp.
|
private |
Called on start and between the two round -Update faction of all vehicle.
Definition at line 654 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Called every time for update battle data -Update timer -Round switch.
Reimplemented from Battleground.
Definition at line 319 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
overridevirtual |
Called when someone activates an event.
Reimplemented from Battleground.
Definition at line 549 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
overridevirtual |
Called when a player leave battleground.
Reimplemented from Battleground.
Definition at line 494 of file BattlegroundSA.cpp.
|
overridevirtual |
Reimplemented from Battleground.
Definition at line 73 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
private |
Called on setup and between the two round -Delete all gameobject / creature -Respawn all gameobject / creature to have good faction.
Definition at line 91 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Update timer worldstate.
Definition at line 729 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Send packet to player for create boats (client part)
Definition at line 1011 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Send packet to player for destroy boats (client part)
Definition at line 1028 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Called for ini battleground, after that the first player be entered.
Reimplemented from Battleground.
Definition at line 86 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
overridevirtual |
Called when battle start.
Reimplemented from Battleground.
Definition at line 440 of file BattlegroundSA.cpp.
|
overridevirtual |
Reimplemented from Battleground.
Definition at line 442 of file BattlegroundSA.cpp.
|
private |
Called for start ship movement.
Definition at line 294 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Called between the two round -Teleport all players to good location.
Definition at line 503 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 529 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void BattlegroundSA::TitanRelicActivated | ( | Player * | clicker | ) |
Called when a player clicked on relic.
Definition at line 893 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Switch on/off timer worldstate.
Definition at line 960 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Respawn dead demolisher.
Definition at line 981 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 773 of file BattlegroundSA.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Updates interaction flags of specific objects.
Definition at line 762 of file BattlegroundSA.cpp.
Here is the call graph for this function:
|
private |
Definition at line 702 of file BattlegroundSA.h.
|
private |
Definition at line 699 of file BattlegroundSA.h.
|
private |
Id of attacker team.
Definition at line 670 of file BattlegroundSA.h.
Definition at line 696 of file BattlegroundSA.h.
|
private |
Max time of round.
Definition at line 675 of file BattlegroundSA.h.
|
private |
Status of each gate (Destroy/Damage/Intact)
Definition at line 679 of file BattlegroundSA.h.
|
private |
Team witch conntrol each graveyard.
Definition at line 683 of file BattlegroundSA.h.
|
private |
for know if second round has been init
Definition at line 695 of file BattlegroundSA.h.
|
private |
Score of each round.
Definition at line 685 of file BattlegroundSA.h.
|
private |
For know if boats has start moving or not yet.
Definition at line 677 of file BattlegroundSA.h.
|
private |
for know if warning about second round start has been sent
Definition at line 691 of file BattlegroundSA.h.
|
private |
for know if warning about second round start has been sent
Definition at line 693 of file BattlegroundSA.h.
|
private |
Statu of battle (Start or not, and what round)
Definition at line 681 of file BattlegroundSA.h.
|
private |
used for know we are in timer phase or not (used for worldstate update)
Definition at line 687 of file BattlegroundSA.h.
|
private |
Totale elapsed time of current round.
Definition at line 673 of file BattlegroundSA.h.
|
private |
5secs before starting the 1min countdown for second round
Definition at line 689 of file BattlegroundSA.h.