Misc: replace Unit::GetPlayer with ObjectAccessor::GetPlayer and some cosmetic changes
This commit is contained in:
@@ -343,7 +343,7 @@ void SmartAI::UpdateAI(uint32 diff)
|
||||
{
|
||||
if (me->FindNearestCreature(mFollowArrivedEntry, INTERACTION_DISTANCE, true))
|
||||
{
|
||||
if (Player* player = me->GetPlayer(*me, mFollowGuid))
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid))
|
||||
{
|
||||
if (!mFollowCreditType)
|
||||
player->RewardPlayerAndGroupAtEvent(mFollowCredit, me);
|
||||
@@ -365,7 +365,9 @@ void SmartAI::UpdateAI(uint32 diff)
|
||||
return;
|
||||
}
|
||||
mFollowArrivedTimer = 1000;
|
||||
} else mFollowArrivedTimer -= diff;
|
||||
}
|
||||
else
|
||||
mFollowArrivedTimer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
|
||||
Reference in New Issue
Block a user