mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/SmartAI: allow SMART_TARGET_OWNER_OR_SUMMONER to target a temporary summon's summoner, too (#17851)
Core/SmartAI: allow SMART_TARGET_OWNER_OR_SUMMONER to target a temporary summon's summoner, too
This commit is contained in:
@@ -2757,6 +2757,11 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
{
|
||||
ObjectGuid charmerOrOwnerGuid = me->GetCharmerOrOwnerGUID();
|
||||
|
||||
if (!charmerOrOwnerGuid)
|
||||
if (TempSummon* tempSummon = me->ToTempSummon())
|
||||
if (Unit* summoner = tempSummon->GetSummoner())
|
||||
charmerOrOwnerGuid = summoner->GetGUID();
|
||||
|
||||
if (!charmerOrOwnerGuid)
|
||||
charmerOrOwnerGuid = me->GetCreatorGUID();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user