[Attack Target] Prioritized targets

This commit is contained in:
Yunfan Li
2024-05-28 11:25:07 +08:00
parent 43c0435e78
commit d5d1bb3904
5 changed files with 75 additions and 7 deletions

View File

@@ -36,7 +36,8 @@ bool AttackMyTargetAction::Execute(Event event)
return false;
}
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({guid});
bool result = Attack(botAI->GetUnit(guid));
if (result)
context->GetValue<ObjectGuid>("pull target")->Set(guid);