Core/Scripts: Fixed GAMEOBJECT_TYPE_DOOR closing automatically after being opened with .gobj act (#19342)

Closes #19261.

(cherry picked from commit 3eba093704)
This commit is contained in:
S.V
2017-06-18 15:23:45 +02:00
committed by Carbenium
parent 148dc34cb2
commit ced4820252

View File

@@ -98,9 +98,11 @@ public:
return false;
}
uint32_t const autoCloseTime = object->GetGOInfo()->GetAutoCloseTime() ? 10000u : 0u;
// Activate
object->SetLootState(GO_READY);
object->UseDoorOrButton(10000, false, handler->GetSession()->GetPlayer());
object->UseDoorOrButton(autoCloseTime, false, handler->GetSession()->GetPlayer());
handler->PSendSysMessage("Object activated!");