greatly improve performance

This commit is contained in:
Yunfan Li
2023-07-28 23:27:28 +08:00
parent 74293912ec
commit 7bd7c46088
6 changed files with 19 additions and 17 deletions

View File

@@ -61,13 +61,13 @@ bool DropTargetAction::Execute(Event event)
context->GetValue<LootObjectStack*>("available loot")->Get()->Add(guid);
}
ObjectGuid pullTarget = context->GetValue<ObjectGuid>("pull target")->Get();
GuidVector possible = botAI->GetAiObjectContext()->GetValue<GuidVector>("possible targets no los")->Get();
// ObjectGuid pullTarget = context->GetValue<ObjectGuid>("pull target")->Get();
// GuidVector possible = botAI->GetAiObjectContext()->GetValue<GuidVector>("possible targets no los")->Get();
if (pullTarget && find(possible.begin(), possible.end(), pullTarget) == possible.end())
{
context->GetValue<ObjectGuid>("pull target")->Set(ObjectGuid::Empty);
}
// if (pullTarget && find(possible.begin(), possible.end(), pullTarget) == possible.end())
// {
// context->GetValue<ObjectGuid>("pull target")->Set(ObjectGuid::Empty);
// }
context->GetValue<Unit*>("current target")->Set(nullptr);