aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEilo <eilo2518@gmail.com>2013-04-23 12:41:44 -0500
committerEilo <eilo2518@gmail.com>2013-04-23 12:41:44 -0500
commit2d8a4a1bc968b0749b08236ea5f930561b94bbeb (patch)
tree2d0b3d067bfc0f1dabf631babacbae51fd1a974c /src
parent4537d4082eb3d23fcf2e6d7038d7da9dbecd15b6 (diff)
Script/Arena: Ring of Valor, toggle visuals gameobjects accordingly
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 6325bd2a629..68e961414f9 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -64,8 +64,6 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
setState(BG_RV_STATE_SWITCH_PILLARS);
break;
case BG_RV_STATE_SWITCH_PILLARS:
- for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
- DoorOpen(i);
TogglePillarCollision();
setTimer(BG_RV_PILLAR_SWITCH_TIMER);
break;
@@ -211,6 +209,13 @@ void BattlegroundRV::TogglePillarCollision()
{
bool apply = GetPillarCollision();
+ // Toggle visual pillars, pulley, gear, and collision based on previous state
+ for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_GEAR_2; ++i)
+ apply ? DoorOpen(i) : DoorClose(i);
+
+ for (uint8 i = BG_RV_OBJECT_PILAR_2; i <= BG_RV_OBJECT_PULLEY_2; ++i)
+ apply ? DoorClose(i) : DoorOpen(i);
+
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PILAR_COLLISION_4; ++i)
{
if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[i]))