rendered paste bodyIndex: src/game/Chat.cpp
===================================================================
--- src/game/Chat.cpp (revision 5626)
+++ src/game/Chat.cpp (working copy)
@@ -383,6 +383,7 @@
{ "cast", SEC_ADMINISTRATOR, &ChatHandler::HandleCastCommand, "", NULL },
{ "castback", SEC_ADMINISTRATOR, &ChatHandler::HandleCastBackCommand, "", NULL },
{ "casttarget", SEC_ADMINISTRATOR, &ChatHandler::HandleCastTargetCommand, "", NULL },
+ { "cometome", SEC_ADMINISTRATOR, &ChatHandler::HandleComeToMeCommand, "", NULL },
//! Development Commands
{ "setvalue", SEC_ADMINISTRATOR, &ChatHandler::HandleSetValue, "", NULL },
Index: src/game/Chat.h
===================================================================
--- src/game/Chat.h (revision 5626)
+++ src/game/Chat.h (working copy)
@@ -332,6 +332,7 @@
bool HandleCastCommand(const char *args);
bool HandleCastBackCommand(const char *args);
bool HandleCastTargetCommand(const char *args);
+ bool HandleComeToMeCommand(const char *args);
//! Development Commands
bool HandleSetValue(const char* args);
Index: src/game/ConfusedMovementGenerator.h
===================================================================
--- src/game/ConfusedMovementGenerator.h (revision 5626)
+++ src/game/ConfusedMovementGenerator.h (working copy)
@@ -26,7 +26,7 @@
#define MAX_CONF_WAYPOINTS 24
template<class T>
-class MANGOS_DLL_DECL ConfusedMovementGenerator
+class MANGOS_DLL_SPEC ConfusedMovementGenerator
: public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
{
public:
Index: src/game/Level3.cpp
===================================================================
--- src/game/Level3.cpp (revision 5626)
+++ src/game/Level3.cpp (working copy)
@@ -39,6 +39,7 @@
#include "CellImpl.h"
#include "Weather.h"
#include "TargetedMovementGenerator.h"
+#include "PointMovementGenerator.h"
#include "SkillDiscovery.h"
#include "SkillExtraItems.h"
#include "SystemConfig.h"
@@ -4630,3 +4631,20 @@
return true;
}
+
+bool ChatHandler::HandleComeToMeCommand(const char *args)
+{
+ Unit* caster = getSelectedUnit();
+
+ if(!caster)
+ {
+ SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
+ return true;
+ }
+
+ if (caster->GetTypeId() == TYPEID_PLAYER)
+ caster->GetMotionMaster()->Mutate(new PointMovementGenerator<Player>(0, m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ()));
+ else caster->GetMotionMaster()->Mutate(new PointMovementGenerator<Creature>(0, m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ()));
+
+ return true;
+}
\ No newline at end of file
Index: src/game/PointMovementGenerator.cpp
===================================================================
--- src/game/PointMovementGenerator.cpp (revision 5627)
+++ src/game/PointMovementGenerator.cpp (working copy)
@@ -32,11 +32,6 @@
i_destinationHolder.SetDestination(traveller,x,y,z);
}
-void PointMovementGenerator<Creature>::MovementInform(Creature &unit)
-{
- unit.AI()->MovementInform(POINT_MOTION_TYPE, id);
-}
-
template<class T>
bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
{
@@ -58,4 +53,17 @@
}
return true;
-}
\ No newline at end of file
+}
+
+
+template<class T>
+void PointMovementGenerator<T>::MovementInform(T &unit)
+{
+}
+
+void PointMovementGenerator<Creature>::MovementInform(Creature &unit)
+{
+ unit.AI()->MovementInform(POINT_MOTION_TYPE, id);
+}
+
+template void PointMovementGenerator<Player>::Initialize(Player&);
\ No newline at end of file
Index: src/game/PointMovementGenerator.h
===================================================================
--- src/game/PointMovementGenerator.h (revision 5627)
+++ src/game/PointMovementGenerator.h (working copy)
@@ -33,8 +33,8 @@
x(_x), y(_y), z(_z), i_nextMoveTime(0) {}
void Initialize(T &);
- void Finalize(T &) {}
- void Reset(T &unit) { unit.StopMoving(); }
+ void Finalize(T &){}
+ void Reset(T &unit){unit.StopMoving();}
bool Update(T &, const uint32 &diff);
void MovementInform(T &);
@@ -47,9 +47,4 @@
uint32 id;
DestinationHolder< Traveller<T> > i_destinationHolder;
};
-
-//template<>
-void MANGOS_DLL_SPEC PointMovementGenerator<Creature>::Initialize(Creature &unit);
-//template<>
-bool MANGOS_DLL_SPEC PointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff);
#endif
Index: src/game/RandomMovementGenerator.h
===================================================================
--- src/game/RandomMovementGenerator.h (revision 5626)
+++ src/game/RandomMovementGenerator.h (working copy)
@@ -26,7 +26,7 @@
#define MAX_RAND_WAYPOINTS 8
template<class T>
-class MANGOS_DLL_DECL RandomMovementGenerator
+class MANGOS_DLL_SPEC RandomMovementGenerator
: public MovementGeneratorMedium< T, RandomMovementGenerator<T> >
{
public:
Index: src/game/WaypointMovementGenerator.h
===================================================================
--- src/game/WaypointMovementGenerator.h (revision 5627)
+++ src/game/WaypointMovementGenerator.h (working copy)
@@ -51,7 +51,7 @@
};
template<class T>
-class MANGOS_DLL_DECL PathMovementBase
+class MANGOS_DLL_SPEC PathMovementBase
{
public:
PathMovementBase() : i_currentNode(0) {}
@@ -76,10 +76,10 @@
*/
template<class T>
-class MANGOS_DLL_DECL WaypointMovementGenerator;
+class MANGOS_DLL_SPEC WaypointMovementGenerator;
template<>
-class MANGOS_DLL_DECL WaypointMovementGenerator<Creature>
+class MANGOS_DLL_SPEC WaypointMovementGenerator<Creature>
: public MovementGeneratorMedium< Creature, WaypointMovementGenerator<Creature> >,
public PathMovementBase<Creature>
{
@@ -117,7 +117,7 @@
/** FlightPathMovementGenerator generates movement of the player for the paths
* and hence generates ground and activities for the player.
*/
-class MANGOS_DLL_DECL FlightPathMovementGenerator
+class MANGOS_DLL_SPEC FlightPathMovementGenerator
: public MovementGeneratorMedium< Player, FlightPathMovementGenerator >,
public PathMovementBase<Player>
{