mod-playerbots/src/Ai/Base/Actions/CheckValuesAction.cpp

33 lines
1.1 KiB
C++

/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
* and/or modify it under version 3 of the License, or (at your option), any later version.
*/
#include "CheckValuesAction.h"
#include "Event.h"
#include "ObjectGuid.h"
#include "ServerFacade.h"
#include "PlayerbotAI.h"
#include "AiObjectContext.h"
CheckValuesAction::CheckValuesAction(PlayerbotAI* botAI) : Action(botAI, "check values") {}
bool CheckValuesAction::Execute(Event /*event*/)
{
if (botAI->HasStrategy("debug move", BOT_STATE_NON_COMBAT))
{
botAI->Ping(bot->GetPositionX(), bot->GetPositionY());
}
GuidVector possible_targets = *context->GetValue<GuidVector>("possible targets");
GuidVector all_targets = *context->GetValue<GuidVector>("all targets");
GuidVector npcs = *context->GetValue<GuidVector>("nearest npcs");
GuidVector corpses = *context->GetValue<GuidVector>("nearest corpses");
GuidVector gos = *context->GetValue<GuidVector>("nearest game objects");
GuidVector nfp = *context->GetValue<GuidVector>("nearest friendly players");
return true;
}