Core/GameObjects: goober gameobjects may reset only if they have a lock id or a reset time specified (#23298)

* Core/GameObjects: goober gameobjects may reset only if they have a lock id

Tests have shown that Goobers without a lock id (Data0=0) are not allowed to reset their go state such as the teleporters in Ulduar and Icecrown Citadel. The tests has been expanded by checking 4.x goobers as well and the perfect example that confirms that result is the Ancient Bell for Atramedes' intro which also is not suposed to reset after using it.

* Core/GameObjects: allow to reset goobers without a lock id if a reset time is defined

* fixed a typo

(cherry picked from commit a70845c93d)
This commit is contained in:
Ovah
2019-05-26 21:54:09 +02:00
committed by Shauren
parent e9aed3e442
commit 09fe78dd59

View File

@@ -880,7 +880,9 @@ void GameObject::Update(uint32 diff)
m_usetimes = 0;
}
SetGoState(GO_STATE_READY);
// Only goobers with a lock id or a reset time may reset their go state
if (GetGOInfo()->GetLockId() || GetGOInfo()->GetAutoCloseTime())
SetGoState(GO_STATE_READY);
//any return here in case battleground traps
if (GameObjectOverride const* goOverride = GetGameObjectOverride())