Core/Movement: ported and merged Follow and Chase movement generator rewrite
This commit is contained in:
1 parent
33566426aa
commit
7edabcbd88
25 files changed
+666
-725
No files matched your search
@@ -20,9 +20,11 @@
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CharacterCache.h"
|
||||
#include "ChaseMovementGenerator.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "FollowMovementGenerator.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Group.h"
|
||||
#include "GroupMgr.h"
|
||||
@@ -45,7 +47,6 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TargetedMovementGenerator.h"
|
||||
#include "Transport.h"
|
||||
#include "Weather.h"
|
||||
#include "WeatherMgr.h"
|
||||
@@ -2153,11 +2154,7 @@ public:
|
||||
break;
|
||||
case CHASE_MOTION_TYPE:
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||
target = static_cast<ChaseMovementGenerator<Player> const*>(movementGenerator)->GetTarget();
|
||||
else
|
||||
target = static_cast<ChaseMovementGenerator<Creature> const*>(movementGenerator)->GetTarget();
|
||||
Unit* target = static_cast<ChaseMovementGenerator const*>(movementGenerator)->GetTarget();
|
||||
|
||||
if (!target)
|
||||
handler->SendSysMessage(LANG_MOVEGENS_CHASE_NULL);
|
||||
@@ -2169,11 +2166,7 @@ public:
|
||||
}
|
||||
case FOLLOW_MOTION_TYPE:
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||
target = static_cast<FollowMovementGenerator<Player> const*>(movementGenerator)->GetTarget();
|
||||
else
|
||||
target = static_cast<FollowMovementGenerator<Creature> const*>(movementGenerator)->GetTarget();
|
||||
Unit* target = static_cast<FollowMovementGenerator const*>(movementGenerator)->GetTarget();
|
||||
|
||||
if (!target)
|
||||
handler->SendSysMessage(LANG_MOVEGENS_FOLLOW_NULL);
|
||||
|
||||
Reference in new issue
Block a user