Battlegrounds/WSG: Fixed door LoS in Warsong Gulch
Closes #6147 Signed-off-by: Subv <[email protected]>
This commit is contained in:
@@ -1459,9 +1459,8 @@ void Battleground::DoorClose(uint32 type)
|
|||||||
// If doors are open, close it
|
// If doors are open, close it
|
||||||
if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY)
|
if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY)
|
||||||
{
|
{
|
||||||
// Change state to allow door to be closed
|
|
||||||
obj->SetLootState(GO_READY);
|
obj->SetLootState(GO_READY);
|
||||||
obj->UseDoorOrButton(RESPAWN_ONE_DAY);
|
obj->SetGoState(GO_STATE_READY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1473,9 +1472,8 @@ void Battleground::DoorOpen(uint32 type)
|
|||||||
{
|
{
|
||||||
if (GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]))
|
if (GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]))
|
||||||
{
|
{
|
||||||
// Change state to be sure they will be opened
|
obj->SetLootState(GO_ACTIVATED);
|
||||||
obj->SetLootState(GO_READY);
|
obj->SetGoState(GO_STATE_ACTIVE);
|
||||||
obj->UseDoorOrButton(RESPAWN_ONE_DAY);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sLog->outError("Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
sLog->outError("Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||||
|
|||||||
@@ -179,9 +179,9 @@ void BattlegroundWS::StartingEventCloseDoors()
|
|||||||
|
|
||||||
void BattlegroundWS::StartingEventOpenDoors()
|
void BattlegroundWS::StartingEventOpenDoors()
|
||||||
{
|
{
|
||||||
for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; ++i)
|
for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_6; ++i)
|
||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
for (uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; ++i)
|
for (uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_4; ++i)
|
||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
|
|
||||||
SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY);
|
SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY);
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ void GameObject::AddToWorld()
|
|||||||
bool toggledState = GetGoState() == GO_STATE_READY;
|
bool toggledState = GetGoState() == GO_STATE_READY;
|
||||||
if (m_model)
|
if (m_model)
|
||||||
GetMap()->Insert(*m_model);
|
GetMap()->Insert(*m_model);
|
||||||
if ((startOpen && !toggledState) || (!startOpen && toggledState))
|
if (startOpen ^ toggledState)
|
||||||
EnableCollision(false);
|
EnableCollision(false);
|
||||||
|
|
||||||
WorldObject::AddToWorld();
|
WorldObject::AddToWorld();
|
||||||
|
|||||||
Reference in New Issue
Block a user