Improve combat reach and dps target, allowing spell interruption

This commit is contained in:
Yunfan Li
2024-09-06 12:33:54 +08:00
parent 73f699fe89
commit 927d893945
5 changed files with 60 additions and 73 deletions

View File

@@ -29,13 +29,14 @@ bool TellAttackersAction::Execute(Event event)
botAI->TellMaster("--- Attackers ---");
GuidVector attackers = context->GetValue<GuidVector>("attackers")->Get();
int32 count = 0;
for (ObjectGuid const guid : attackers)
{
Unit* unit = botAI->GetUnit(guid);
if (!unit || !unit->IsAlive())
continue;
botAI->TellMaster(unit->GetName());
botAI->TellMaster(std::to_string(++count) + std::string(".") + unit->GetName());
}
botAI->TellMaster("--- Threat ---");