feat(Scripts/SmartAI): SMART_TARGET_INVOKER (#9802)

This commit is contained in:
IntelligentQuantum
2022-01-13 14:16:25 +03:30
committed by GitHub
parent 97012997af
commit df4b621527
5 changed files with 86 additions and 7 deletions

View File

@@ -1054,7 +1054,8 @@ void SmartAI::StopFollow(bool complete)
if (!complete)
return;
if (Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid))
Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid);
if (player)
{
if (!mFollowCreditType)
player->RewardPlayerAndGroupAtEvent(mFollowCredit, me);
@@ -1065,7 +1066,7 @@ void SmartAI::StopFollow(bool complete)
SetDespawnTime(5000);
StartDespawn();
GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED);
GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED, player);
}
void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)