Core/SmartAI: allow AreaTrigger SAI scripts to use the player triggering it as base object for actions and targeting
Port From (https://github.com/TrinityCore/TrinityCore/commit/1ddde5ca3cac8ac03239882778af3702b59d582d)
This commit is contained in:
@@ -706,7 +706,7 @@ namespace Game.AI
|
||||
|
||||
void _JustEngagedWith()
|
||||
{
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true);
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
AttackStart(target);
|
||||
}
|
||||
@@ -714,7 +714,7 @@ namespace Game.AI
|
||||
public override void JustSummoned(Creature summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true);
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
summon.GetAI().AttackStart(target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user