Index: GameObject.cpp =================================================================== --- GameObject.cpp (revision 5614) +++ GameObject.cpp (working copy) @@ -46,7 +46,7 @@ m_valuesCount = GAMEOBJECT_END; m_respawnTime = 0; m_respawnDelayTime = 25; - m_lootState = GO_READY; + m_lootState = GO_NOT_READY; m_spawnedByDefault = true; m_usetimes = 0; m_spellId = 0; @@ -166,6 +166,19 @@ switch (m_lootState) { case GO_NOT_READY: + { + // Arming Time for GAMEOBJECT_TYPE_TRAP (6) + if (GetGoType() == GAMEOBJECT_TYPE_TRAP) + { + Unit* owner = GetOwner(); + if (owner && ((Player*)owner)->isInCombat()) + m_cooldownTime = time(NULL) + GetGOInfo()->trap._data6; + + m_lootState = GO_READY; + return; + } + + // Clickable boober for GAMEOBJECT_TYPE_FISHINGNODE (17) if (GetGoType()==GAMEOBJECT_TYPE_FISHINGNODE) { // fishing code (bobber ready) @@ -197,6 +210,7 @@ m_lootState = GO_READY; // for other GOis same switched without delay to GO_READY // NO BREAK + } case GO_READY: { if (m_respawnTime > 0) // timer on Index: GameObject.h =================================================================== --- GameObject.h (revision 5614) +++ GameObject.h (working copy) @@ -84,7 +84,7 @@ uint32 spellId; //3 uint32 isNeedDespawn; //4 (if >0) uint32 _data5; //5 - uint32 _data6[6]; + uint32 _data6; //6 arming time in seconds uint32 _data12; //12 something == chest.data14 == goober.data14 ??? } trap; //7 GAMEOBJECT_TYPE_CHAIR Index: SpellEffects.cpp =================================================================== --- SpellEffects.cpp (revision 5614) +++ SpellEffects.cpp (working copy) @@ -4369,7 +4369,6 @@ int32 duration = GetSpellDuration(m_spellInfo); pGameObj->SetRespawnTime(duration > 0 ? duration/1000 : 0); pGameObj->SetSpellId(m_spellInfo->Id); - pGameObj->SetLootState(GO_READY); m_caster->AddGameObject(pGameObj); MapManager::Instance().GetMap(pGameObj->GetMapId(), pGameObj)->Add(pGameObj);