All pastes #983441 Raw Edit

Nevan

public text v1 · immutable
·published 2008-04-13 11:08 UTC
rendered paste body
Index: GameObject.cpp

===================================================================

--- GameObject.cpp	(revision 5619)

+++ GameObject.cpp	(working copy)

@@ -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._data7;
+
+				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 5619)

+++ GameObject.h	(working copy)

@@ -84,7 +84,9 @@

             uint32 spellId;                                 //3
             uint32 isNeedDespawn;                           //4 (if >0)
             uint32 _data5;                                  //5
-            uint32 _data6[6];
+            uint32 _data6;
+			uint32 _data7;
+			uint32 _data8[4];
             uint32 _data12;                                 //12 something == chest.data14 == goober.data14 (openText?)
         } trap;
         //7 GAMEOBJECT_TYPE_CHAIR