From dabbe38022fddce5778ea7d71915a65dbe9d4b8c Mon Sep 17 00:00:00 2001 From: Gacko Date: Sun, 11 May 2014 12:35:40 +0200 Subject: 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 --- src/server/game/Entities/GameObject/GameObject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3