mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 15:01:38 -04:00
Core/SmartAI: added TARGET_OWNER_OR_SUMMONER, useful if you have a creature summoned by a spell, you can use Summoner as target
--HG-- branch : trunk
This commit is contained in:
@@ -1440,6 +1440,14 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder e, Unit* invoker)
|
||||
l->push_back(target);
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_OWNER_OR_SUMMONER:
|
||||
{
|
||||
if (!me) return NULL;
|
||||
uint64 guid = me->GetCharmerOrOwnerGUID();
|
||||
if (Unit* owner = ObjectAccessor::GetUnit(*me, guid))
|
||||
l->push_back(owner);
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_POSITION:
|
||||
default:
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user