diff options
author | Gacko <gacko28@gmx.de> | 2014-05-11 12:35:40 +0200 |
---|---|---|
committer | Gacko <gacko28@gmx.de> | 2014-05-11 12:35:40 +0200 |
commit | dabbe38022fddce5778ea7d71915a65dbe9d4b8c (patch) | |
tree | dcd3b46b409e21907006fc6c66cbe7ab14535aad /src | |
parent | 71795bf9776183429455d5742125b069836810e4 (diff) |
Core/GameObject: Set trap type 0 back to GO_READY after activation.
Otherwise it would be activated again on every update. My fault, moving the activation code to GO_ACTIVATED skips the cooldown check.
Closes #12047
Diffstat (limited to 'src')
-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 8051c757bf2..5efe5a75335 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -568,10 +568,12 @@ void GameObject::Update(uint32 diff) CastSpell(target, goInfo->trap.spellId); // Template value or 4 seconds - m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4)); + m_cooldownTime = time(NULL) + (goInfo->trap.cooldown ? goInfo->trap.cooldown : uint32(4)); if (goInfo->trap.type == 1) SetLootState(GO_JUST_DEACTIVATED); + else if (!goInfo->trap.type) + SetLootState(GO_READY); // Battleground gameobjects have data2 == 0 && data5 == 3 if (!goInfo->trap.diameter && goInfo->trap.cooldown == 3) |