Core/Scripts: reverted Auriaya spell script logic

Thanks Shauren for spotting it
This commit is contained in:
ariel-
2018-01-24 12:31:06 -03:00
parent 178b530ab6
commit 6dd465c441

View File

@@ -583,15 +583,20 @@ class spell_auriaya_random_agro_periodic : public AuraScript
if (!owner || !owner->IsAIEnabled || owner->HasReactState(REACT_PASSIVE))
return;
bool farTarget = true;
Unit* target = owner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, CatsTargetSelector(owner, 15.0f, 25.0f));
if (!target)
{
farTarget = false;
target = owner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0);
}
if (!target)
return;
owner->GetThreatManager().AddThreat(target, 3000000.0f, nullptr, true);
owner->CastSpell(target, SPELL_FERAL_POUNCE, true);
if (farTarget)
owner->CastSpell(target, SPELL_FERAL_POUNCE, true);
owner->AI()->AttackStart(target);
}