diff options
author | Ovah <dreadkiller@gmx.de> | 2019-05-26 21:54:09 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-08 21:54:41 +0100 |
commit | 09fe78dd59095fa31b83a846d5fcbb53dd3afb1b (patch) | |
tree | b96df0eed74522a093e3206ce58ab0572f3e6a5d | |
parent | e9aed3e442374db74ebc98edc39ba4ee46acf123 (diff) |
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 a70845c93de0902c4c6fa55ff10293f7e3679ac5)
-rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index c8a7d9d71a1..ad6d16d7e0e 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -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()) |