Scripts/SmartAI: SMART_TARGET_INVOKER cleanup step 1. The core will n…
…ow log errors on start-up if SMART_TARGET_INVOKER abuse is found, but will continue to load the scripts as deprecated for now. Note that a lot of these scripts may either not currently work, not work reliably, or may be prone to breaking unexpectedly when core internals change. SMART_TARGET_INVOKER is undefined behavior on any event that doesn't directly specify its invoker. (We are considering options for allowing INVOKER to make sense in timed action lists in a reliable fashion, so they are exempted at this time.)
This commit is contained in:
1 parent
9ce54f06fd
commit
74b7ac101a
5 files changed
+67
-7
No files matched your search
@@ -891,7 +891,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);
|
||||
@@ -901,7 +902,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)
|
||||
|
||||
Reference in new issue
Block a user