mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core: ported headers cleanup from master branch
This commit is contained in:
@@ -23,10 +23,14 @@ SDComment: This AI is under development
|
||||
SDCategory: Npc
|
||||
EndScriptData */
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedFollowerAI.h"
|
||||
#include "Creature.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
const float MAX_PLAYER_DISTANCE = 100.0f;
|
||||
|
||||
@@ -38,7 +42,7 @@ enum Points
|
||||
FollowerAI::FollowerAI(Creature* creature) : ScriptedAI(creature),
|
||||
m_uiUpdateFollowTimer(2500),
|
||||
m_uiFollowState(STATE_FOLLOW_NONE),
|
||||
m_pQuestForFollow(NULL)
|
||||
m_pQuestForFollow(nullptr)
|
||||
{ }
|
||||
|
||||
void FollowerAI::AttackStart(Unit* who)
|
||||
@@ -146,7 +150,7 @@ void FollowerAI::JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
|
||||
if (Player* member = groupRef->GetSource())
|
||||
if (member->IsInMap(player))
|
||||
member->FailQuest(m_pQuestForFollow->GetQuestId());
|
||||
@@ -174,7 +178,7 @@ void FollowerAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
me->SetLootRecipient(NULL);
|
||||
me->SetLootRecipient(nullptr);
|
||||
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
|
||||
{
|
||||
@@ -224,7 +228,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
|
||||
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
|
||||
{
|
||||
Player* member = groupRef->GetSource();
|
||||
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
|
||||
@@ -282,7 +286,7 @@ void FollowerAI::MovementInform(uint32 motionType, uint32 pointId)
|
||||
}
|
||||
}
|
||||
|
||||
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Quest* quest)
|
||||
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, Quest const* quest)
|
||||
{
|
||||
if (me->GetVictim())
|
||||
{
|
||||
@@ -330,7 +334,7 @@ Player* FollowerAI::GetLeaderForFollower()
|
||||
{
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != NULL; groupRef = groupRef->next())
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
|
||||
{
|
||||
Player* member = groupRef->GetSource();
|
||||
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE) && member->IsAlive())
|
||||
@@ -345,7 +349,7 @@ Player* FollowerAI::GetLeaderForFollower()
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("scripts", "FollowerAI GetLeader can not find suitable leader.");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void FollowerAI::SetFollowComplete(bool bWithEndEvent)
|
||||
|
||||
Reference in New Issue
Block a user