/*
 * 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 "DelayAction.h"

#include "Event.h"
#include "PlayerbotAI.h"
#include "PlayerbotAIConfig.h"

bool DelayAction::Execute(Event /*event*/)
{
    const uint32 delay = PlayerbotAIConfig::instance().passiveDelay + PlayerbotAIConfig::instance().globalCoolDown;

    botAI->SetNextCheckDelay(delay);

    return true;
}

bool DelayAction::isUseful()
{
    return !botAI->AllowActivity(ALL_ACTIVITY);
}
