/* * Copyright (C) 2016+ AzerothCore , 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 "CombatStrategy.h" #include "Playerbots.h" #include "Strategy.h" void CombatStrategy::InitTriggers(std::vector& triggers) { triggers.push_back( new TriggerNode( "enemy out of spell", { NextAction("reach spell", ACTION_HIGH) } ) ); // drop target relevance 99 (lower than Worldpacket triggers) triggers.push_back( new TriggerNode( "invalid target", { NextAction("drop target", 99) } ) ); triggers.push_back( new TriggerNode( "mounted", { NextAction("check mount state", 54) } ) ); triggers.push_back( new TriggerNode( "combat stuck", { NextAction("reset", 1.0f) } ) ); triggers.push_back( new TriggerNode( "not facing target", { NextAction("set facing", ACTION_MOVE + 7) } ) ); // The pet-attack trigger is commented out because it was forcing the bot's pet to attack, overriding stay and follow commands. // Pets will automatically attack the bot's enemy if they are in "defensive" or "aggressive" // stance, or if the master issues an attack command. } AvoidAoeStrategy::AvoidAoeStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} std::vector AvoidAoeStrategy::getDefaultActions() { return { NextAction("avoid aoe", ACTION_EMERGENCY) }; } void AvoidAoeStrategy::InitTriggers(std::vector& triggers) { } void AvoidAoeStrategy::InitMultipliers(std::vector& multipliers) { } TankFaceStrategy::TankFaceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} std::vector TankFaceStrategy::getDefaultActions() { return { NextAction("tank face", ACTION_MOVE) }; } void TankFaceStrategy::InitTriggers(std::vector& triggers) { } std::vector CombatFormationStrategy::getDefaultActions() { return { NextAction("combat formation move", ACTION_NORMAL) }; }