All pastes #983978 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-13 20:10 UTC
rendered paste body
Index: scripts/custom/test.cpp
===================================================================
--- scripts/custom/test.cpp	(revision 335)
+++ scripts/custom/test.cpp	(working copy)
@@ -25,6 +25,7 @@
 #include "../creature/simple_ai.h"
 #include "Map.h"
 #include "GridNotifiersImpl.h"
+#include "PointMovementGenerator.h"
 
 
 struct MANGOS_DLL_DECL testAI : public ScriptedAI
@@ -35,11 +36,12 @@
 
     void Reset()
     {
-        Cleave_Timer = 5000;      //These times are probably wrong
+        Cleave_Timer = 10000;      //These times are probably wrong
     }
 
     void Aggro(Unit *who)
     {
+
     }
 
     void UpdateAI(const uint32 diff)
@@ -50,16 +52,20 @@
 
         if (Cleave_Timer < diff)
         {
-            /*char test[128];
-            sprintf(test, "Found %d friendly units in 20 yard radius", GetNearByFriendlyUnits(20.0f).size());
+            DoYell("Switching to Point Movement Gen on your location $N", LANG_UNIVERSAL, m_creature->getVictim());
+            m_creature->GetMotionMaster()->Clear();
+            m_creature->GetMotionMaster()->Mutate(new PointMovementGenerator<Creature>(0, m_creature->getVictim()->GetPositionX(), m_creature->getVictim()->GetPositionY(), m_creature->getVictim()->GetPositionZ()));
 
-            DoYell(test, LANG_UNIVERSAL, NULL);*/
-
-            Cleave_Timer = 5000;
+            Cleave_Timer = 999999;
         }else Cleave_Timer -= diff;
 
         DoMeleeAttackIfReady();
     }
+
+    void MovementInform(uint32 type, uint32 id)
+    {
+        DoYell("Recived MovementInform", LANG_UNIVERSAL, NULL);
+    }
 /*
     std::list<Unit *> GetNearByFriendlyUnits(float radius_check)
     {