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
This commit is contained in:
Gacko committed 2014-05-11 12:35:40 +02:00
1 parent 71795bf977
commit dabbe38022
1 file changed
+3 -1
@@ -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)