TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattlegroundRV Class Reference

#include <BattlegroundRV.h>

Public Member Functions

 BattlegroundRV ()
 
void StartingEventOpenDoors () override
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void HandleAreaTrigger (Player *source, uint32 trigger, bool entered) override
 
bool SetupBattleground () override
 
- Public Member Functions inherited from Battleground
 Battleground ()
 
virtual ~Battleground ()
 
void Update (uint32 diff)
 
virtual void Reset ()
 
virtual void StartingEventCloseDoors ()
 
virtual void ResetBGSubclass ()
 
virtual void DestroyGate (Player *, GameObject *)
 
virtual bool IsAllNodesControlledByTeam (uint32) const
 
void StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
std::string constGetName () const
 
uint64 GetQueueId () const
 
BattlegroundTypeId GetTypeID (bool GetRandom=false) const
 
BattlegroundBracketId GetBracketId () const
 
uint32 GetInstanceID () const
 
BattlegroundStatus GetStatus () const
 
uint32 GetClientInstanceID () const
 
uint32 GetElapsedTime () const
 
uint32 GetRemainingTime () 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
 
BattlegroundTeamId GetWinner () const
 
uint32 GetScriptId () const
 
uint32 GetBonusHonorFromKill (uint32 kills) const
 
bool IsRandom () const
 
void SetQueueId (uint64 queueId)
 
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 SetElapsedTime (uint32 Time)
 
void SetRemainingTime (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 (BattlegroundTeamId 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 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 constGetPlayers () 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. More...
 
void StartBattleground ()
 
GameObjectGetBGObject (uint32 type, bool logError=true)
 
CreatureGetBGCreature (uint32 type, bool logError=true)
 
void SetMapId (uint32 MapID)
 
uint32 GetMapId () const
 
void SetBgMap (BattlegroundMap *map)
 
BattlegroundMapGetBgMap () const
 
BattlegroundMapFindBgMap () const
 
void SetTeamStartPosition (TeamId teamId, Position const &pos)
 
Position constGetTeamStartPosition (TeamId teamId) const
 
void SetStartMaxDist (float startMaxDist)
 
float GetStartMaxDist () const
 
void SendPacketToTeam (uint32 TeamID, WorldPacket const *packet, Player *sender=NULL, bool self=true) const
 
void SendPacketToAll (WorldPacket const *packet) const
 
void SendChatMessage (Creature *source, uint8 textId, WorldObject *target=NULL)
 
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, bool hidden=false)
 
void BlockMovement (Player *player)
 
void SendMessageToAll (uint32 entry, ChatMsg type, Player const *source=NULL)
 
void PSendMessageToAll (uint32 entry, ChatMsg type, Player const *source,...)
 
void SendMessage2ToAll (uint32 entry, ChatMsg type, Player const *source, uint32 strId1=0, uint32 strId2=0)
 
GroupGetBgRaid (uint32 TeamID) const
 
void SetBgRaid (uint32 TeamID, Group *bg_raid)
 
void BuildPvPLogDataPacket (WorldPackets::Battleground::PVPLogData &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)
 
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 HandleKillUnit (Creature *, Player *)
 
virtual void EventPlayerDroppedFlag (Player *)
 
virtual void EventPlayerClickedOnFlag (Player *, GameObject *)
 
void EventPlayerLoggedIn (Player *player)
 
void EventPlayerLoggedOut (Player *player)
 
virtual void ProcessEvent (WorldObject *, uint32, WorldObject *=NULL)
 
virtual void DoAction (uint32, ObjectGuid)
 
virtual void HandlePlayerResurrect (Player *)
 
virtual WorldSafeLocsEntry constGetClosestGraveYard (Player *player)
 
void AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team)
 
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 CreatureAddCreature (uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=NULL)
 
CreatureAddCreature (uint32 entry, uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=NULL)
 
bool DelCreature (uint32 type)
 
bool DelObject (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
 
virtual bool IsSpellAllowed (uint32, Player const *) const
 
uint32 GetTeamScore (uint32 TeamID) const
 
virtual uint32 GetPrematureWinner ()
 
uint8 GetUniqueBracketId () const
 

Private Member Functions

void PostUpdateImpl (uint32 diff) override
 Post-update hook. More...
 
void TogglePillarCollision ()
 

Private Attributes

uint32 _timer
 
uint32 _state
 
bool _pillarCollision
 

Additional Inherited Members

- Public Types inherited from Battleground
typedef std::map< ObjectGuid,
BattlegroundPlayer
BattlegroundPlayerMap
 
typedef std::map< ObjectGuid,
BattlegroundScore * > 
BattlegroundScoreMap
 
- Static Public Member Functions inherited from Battleground
static TeamId GetTeamIndexByTeamId (uint32 Team)
 
- Public Attributes inherited from Battleground
GuidVector BgObjects
 
GuidVector BgCreatures
 
- Protected Member Functions inherited from Arena
 Arena ()
 
void AddPlayer (Player *player) override
 
void RemovePlayer (Player *, ObjectGuid, uint32) override
 
void UpdateArenaWorldState ()
 
void HandleKillPlayer (Player *player, Player *killer) override
 
- Protected Member Functions inherited from Battleground
void EndNow ()
 
void PlayerAddedToBGCheckIfBGIsRunning (Player *player)
 
Player_GetPlayer (ObjectGuid guid, bool offlineRemove, const char *context) const
 
Player_GetPlayer (BattlegroundPlayerMap::iterator itr, const char *context)
 
Player_GetPlayer (BattlegroundPlayerMap::const_iterator itr, const char *context) const
 
Player_GetPlayerForTeam (uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char *context) const
 
virtual bool PreUpdateImpl (uint32)
 Pre-update hook. More...
 
void _ProcessOfflineQueue ()
 
void _ProcessResurrect (uint32 diff)
 
void _ProcessProgress (uint32 diff)
 
void _ProcessLeave (uint32 diff)
 
void _ProcessJoin (uint32 diff)
 
void _CheckSafePositions (uint32 diff)
 
void _ProcessPlayerPositionBroadcast (uint32 diff)
 
virtual void GetPlayerPositionData (std::vector< WorldPackets::Battleground::BattlegroundPlayerPosition > *) const
 
- Protected Attributes inherited from Battleground
BattlegroundScoreMap PlayerScores
 
BattlegroundPlayerMap m_Players
 
std::map< ObjectGuid, GuidVectorm_ReviveQueue
 
uint8 m_Events
 
BattlegroundStartTimeIntervals StartDelayTimes [BG_STARTING_EVENT_COUNT]
 
uint32 StartMessageIds [BG_STARTING_EVENT_COUNT]
 
bool m_BuffChange
 
bool m_IsRandom
 
BGHonorMode m_HonorMode
 
int32 m_TeamScores [BG_TEAMS_COUNT]
 
ArenaTeamScore _arenaTeamScores [BG_TEAMS_COUNT]
 

Constructor & Destructor Documentation

BattlegroundRV::BattlegroundRV ( )
26 {
28 
29  _timer = 0;
30  _state = 0;
31  _pillarCollision = false;
32 }
Definition: BattlegroundRV.h:49
uint32 _timer
Definition: BattlegroundRV.h:110
GuidVector BgObjects
Definition: Battleground.h:452
uint32 _state
Definition: BattlegroundRV.h:111
bool _pillarCollision
Definition: BattlegroundRV.h:112

Member Function Documentation

void BattlegroundRV::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
overridevirtual

Reimplemented from Arena.

104 {
105  packet.Worldstates.emplace_back(uint32(BG_RV_WORLD_STATE), 1);
107 }
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: Arena.cpp:74
Definition: BattlegroundRV.h:90
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

void BattlegroundRV::HandleAreaTrigger ( Player source,
uint32  trigger,
bool  entered 
)
overridevirtual

Reimplemented from Battleground.

85 {
87  return;
88 
89  switch (trigger)
90  {
91  case 5224:
92  case 5226:
93  // fire was removed in 3.2.0
94  case 5473:
95  case 5474:
96  break;
97  default:
98  Battleground::HandleAreaTrigger(player, trigger, entered);
99  break;
100  }
101 }
Definition: Battleground.h:159
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
virtual void HandleAreaTrigger(Player *, uint32, bool)
Definition: Battleground.cpp:1933

+ Here is the call graph for this function:

void BattlegroundRV::PostUpdateImpl ( uint32  )
overrideprivatevirtual

Post-update hook.

Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.

Parameters
diffa time difference between two worldserver update loops in milliseconds.
See also
Update(), PreUpdateImpl().

Reimplemented from Battleground.

35 {
37  return;
38 
39  if (_timer < diff)
40  {
41  switch (_state)
42  {
44  // Open fire (only at game start)
46  DoorOpen(i);
49  break;
52  DoorClose(i);
53  // Fire got closed after five seconds, leaves twenty seconds before toggling pillars
56  break;
60  break;
61  }
62  }
63  else
64  _timer -= diff;
65 }
Definition: Battleground.h:159
Definition: BattlegroundRV.h:27
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
uint32 _timer
Definition: BattlegroundRV.h:110
Definition: BattlegroundRV.h:85
Definition: BattlegroundRV.h:82
Definition: BattlegroundRV.h:83
Definition: BattlegroundRV.h:30
void DoorOpen(uint32 type)
Definition: Battleground.cpp:1522
uint8_t uint8
Definition: Define.h:152
Definition: BattlegroundRV.h:81
uint32 _state
Definition: BattlegroundRV.h:111
void TogglePillarCollision()
Definition: BattlegroundRV.cpp:146
Definition: BattlegroundRV.h:87
void DoorClose(uint32 type)
Definition: Battleground.cpp:1506
Definition: BattlegroundRV.h:86

+ Here is the call graph for this function:

bool BattlegroundRV::SetupBattleground ( )
overridevirtual

Reimplemented from Battleground.

110 {
111  // elevators
112  if (!AddObject(BG_RV_OBJECT_ELEVATOR_1, BG_RV_OBJECT_TYPE_ELEVATOR_1, 763.536377f, -294.535767f, 0.505383f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
113  || !AddObject(BG_RV_OBJECT_ELEVATOR_2, BG_RV_OBJECT_TYPE_ELEVATOR_2, 763.506348f, -273.873352f, 0.505383f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
114  // buffs
115  || !AddObject(BG_RV_OBJECT_BUFF_1, BG_RV_OBJECT_TYPE_BUFF_1, 735.551819f, -284.794678f, 28.276682f, 0.034906f, 0, 0, 0, RESPAWN_IMMEDIATELY)
116  || !AddObject(BG_RV_OBJECT_BUFF_2, BG_RV_OBJECT_TYPE_BUFF_2, 791.224487f, -284.794464f, 28.276682f, 2.600535f, 0, 0, 0, RESPAWN_IMMEDIATELY)
117  // fire
118  || !AddObject(BG_RV_OBJECT_FIRE_1, BG_RV_OBJECT_TYPE_FIRE_1, 743.543457f, -283.799469f, 28.286655f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
119  || !AddObject(BG_RV_OBJECT_FIRE_2, BG_RV_OBJECT_TYPE_FIRE_2, 782.971802f, -283.799469f, 28.286655f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
120  || !AddObject(BG_RV_OBJECT_FIREDOOR_1, BG_RV_OBJECT_TYPE_FIREDOOR_1, 743.711060f, -284.099609f, 27.542587f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
121  || !AddObject(BG_RV_OBJECT_FIREDOOR_2, BG_RV_OBJECT_TYPE_FIREDOOR_2, 783.221252f, -284.133362f, 27.535686f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
122  // Gear
123  || !AddObject(BG_RV_OBJECT_GEAR_1, BG_RV_OBJECT_TYPE_GEAR_1, 763.664551f, -261.872986f, 26.686588f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
124  || !AddObject(BG_RV_OBJECT_GEAR_2, BG_RV_OBJECT_TYPE_GEAR_2, 763.578979f, -306.146149f, 26.665222f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
125  // Pulley
126  || !AddObject(BG_RV_OBJECT_PULLEY_1, BG_RV_OBJECT_TYPE_PULLEY_1, 700.722290f, -283.990662f, 39.517582f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
127  || !AddObject(BG_RV_OBJECT_PULLEY_2, BG_RV_OBJECT_TYPE_PULLEY_2, 826.303833f, -283.996429f, 39.517582f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
128  // Pilars
129  || !AddObject(BG_RV_OBJECT_PILAR_1, BG_RV_OBJECT_TYPE_PILAR_1, 763.632385f, -306.162384f, 25.909504f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
130  || !AddObject(BG_RV_OBJECT_PILAR_2, BG_RV_OBJECT_TYPE_PILAR_2, 723.644287f, -284.493256f, 24.648525f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
131  || !AddObject(BG_RV_OBJECT_PILAR_3, BG_RV_OBJECT_TYPE_PILAR_3, 763.611145f, -261.856750f, 25.909504f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
132  || !AddObject(BG_RV_OBJECT_PILAR_4, BG_RV_OBJECT_TYPE_PILAR_4, 802.211609f, -284.493256f, 24.648525f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
133 
134  // Pilars Collision
135  || !AddObject(BG_RV_OBJECT_PILAR_COLLISION_1, BG_RV_OBJECT_TYPE_PILAR_COLLISION_1, 763.632385f, -306.162384f, 30.639660f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
136  || !AddObject(BG_RV_OBJECT_PILAR_COLLISION_2, BG_RV_OBJECT_TYPE_PILAR_COLLISION_2, 723.644287f, -284.493256f, 32.382710f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
137  || !AddObject(BG_RV_OBJECT_PILAR_COLLISION_3, BG_RV_OBJECT_TYPE_PILAR_COLLISION_3, 763.611145f, -261.856750f, 30.639660f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
138  || !AddObject(BG_RV_OBJECT_PILAR_COLLISION_4, BG_RV_OBJECT_TYPE_PILAR_COLLISION_4, 802.211609f, -284.493256f, 32.382710f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY))
139  {
140  TC_LOG_ERROR("sql.sql", "BatteGroundRV: Failed to spawn some object!");
141  return false;
142  }
143  return true;
144 }
Definition: BattlegroundRV.h:55
Definition: BattlegroundRV.h:60
Definition: Battleground.h:129
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)
Definition: Battleground.cpp:1446
Definition: BattlegroundRV.h:57
Definition: BattlegroundRV.h:43
Definition: BattlegroundRV.h:54
Definition: BattlegroundRV.h:66
Definition: BattlegroundRV.h:62
Definition: BattlegroundRV.h:34
Definition: BattlegroundRV.h:27
Definition: BattlegroundRV.h:68
Definition: BattlegroundRV.h:73
Definition: BattlegroundRV.h:32
Definition: BattlegroundRV.h:64
Definition: BattlegroundRV.h:48
Definition: BattlegroundRV.h:33
Definition: BattlegroundRV.h:35
Definition: BattlegroundRV.h:74
Definition: BattlegroundRV.h:38
Definition: BattlegroundRV.h:76
Definition: BattlegroundRV.h:26
Definition: BattlegroundRV.h:63
Definition: BattlegroundRV.h:75
Definition: BattlegroundRV.h:28
Definition: BattlegroundRV.h:30
Definition: BattlegroundRV.h:61
Definition: BattlegroundRV.h:59
Definition: BattlegroundRV.h:25
Definition: BattlegroundRV.h:29
Definition: BattlegroundRV.h:39
Definition: BattlegroundRV.h:37
Definition: BattlegroundRV.h:71
Definition: BattlegroundRV.h:56
Definition: BattlegroundRV.h:69
Definition: BattlegroundRV.h:42
Definition: BattlegroundRV.h:65
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: BattlegroundRV.h:45
Definition: BattlegroundRV.h:40
Definition: BattlegroundRV.h:70
Definition: BattlegroundRV.h:47
Definition: BattlegroundRV.h:44

+ Here is the call graph for this function:

void BattlegroundRV::StartingEventOpenDoors ( )
overridevirtual

Reimplemented from Battleground.

68 {
69  // Buff respawn
72  // Elevators
75 
78 
79  // Should be false at first, TogglePillarCollision will do it.
80  _pillarCollision = true;
82 }
uint32 _timer
Definition: BattlegroundRV.h:110
Definition: BattlegroundRV.h:48
void SpawnBGObject(uint32 type, uint32 respawntime)
Definition: Battleground.cpp:1564
Definition: BattlegroundRV.h:26
Definition: BattlegroundRV.h:25
Definition: BattlegroundRV.h:88
void DoorOpen(uint32 type)
Definition: Battleground.cpp:1522
Definition: BattlegroundRV.h:81
uint32 _state
Definition: BattlegroundRV.h:111
Definition: BattlegroundRV.h:47
void TogglePillarCollision()
Definition: BattlegroundRV.cpp:146
bool _pillarCollision
Definition: BattlegroundRV.h:112

+ Here is the call graph for this function:

void BattlegroundRV::TogglePillarCollision ( )
private
147 {
148  // Toggle visual pillars, pulley, gear, and collision based on previous state
149  for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_GEAR_2; ++i)
151 
154 
156  {
157  if (GameObject* go = GetBGObject(i))
158  {
160  {
161  GOState state = ((go->GetGOInfo()->door.startOpen != 0) == _pillarCollision) ? GO_STATE_ACTIVE : GO_STATE_READY;
162  go->SetGoState(state);
163  }
164 
165  for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
166  if (Player* player = ObjectAccessor::FindPlayer(itr->first))
167  go->SendUpdateToPlayer(player);
168  }
169  }
170 
172 }
Definition: BattlegroundRV.h:32
GameObject * GetBGObject(uint32 type, bool logError=true)
Definition: Battleground.cpp:1534
Definition: BattlegroundRV.h:35
BattlegroundPlayerMap const & GetPlayers() const
Definition: Battleground.h:331
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
Definition: ObjectAccessor.cpp:209
Definition: GameObject.h:880
Definition: BattlegroundRV.h:37
Definition: GameObject.h:822
Definition: GameObject.h:823
GOState
Definition: GameObject.h:820
void DoorOpen(uint32 type)
Definition: Battleground.cpp:1522
Definition: BattlegroundRV.h:42
uint8_t uint8
Definition: Define.h:152
Definition: BattlegroundRV.h:45
Definition: BattlegroundRV.h:40
bool _pillarCollision
Definition: BattlegroundRV.h:112
void DoorClose(uint32 type)
Definition: Battleground.cpp:1506

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool BattlegroundRV::_pillarCollision
private
uint32 BattlegroundRV::_state
private
uint32 BattlegroundRV::_timer
private

The documentation for this class was generated from the following files: