diff options
author | Ovah <dreadkiller@gmx.de> | 2019-05-26 21:54:09 +0200 |
---|---|---|
committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-05-26 21:54:09 +0200 |
commit | a70845c93de0902c4c6fa55ff10293f7e3679ac5 (patch) | |
tree | 1465192ef0aea86976439a788ac17e4f31927a16 | |
parent | 9e58ef6940c78d92f1553cf7ab75e87a6e2cf112 (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
-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 b2d88630aeb..63244513846 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -755,7 +755,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()) |