mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Script/Arena: Ring of Valor, toggle visuals gameobjects accordingly
This commit is contained in:
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user