refactor(Core/Combat): Port TrinityCore heap-based threat system (#24715)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: Treeston <treeston.mmoc@gmail.com> Co-authored-by: killerwife <killerwife@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1158,12 +1158,9 @@ namespace Acore
|
||||
if (!u->IsWithinLOSInMap(i_enemy))
|
||||
return;
|
||||
|
||||
if (u->AI())
|
||||
{
|
||||
u->SetNoCallForHelp(true); // avoid recursive call for help causing stack overflow
|
||||
u->AI()->AttackStart(i_enemy);
|
||||
u->SetNoCallForHelp(false);
|
||||
}
|
||||
u->SetNoCallForHelp(true); // avoid recursive call for help causing stack overflow
|
||||
u->EngageWithTarget(i_enemy);
|
||||
u->SetNoCallForHelp(false);
|
||||
}
|
||||
private:
|
||||
Unit* const i_funit;
|
||||
|
||||
Reference in New Issue
Block a user