/* * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. */ #ifndef _PLAYERBOT_BATTLEGROUNDTACTICSACTION_H #define _PLAYERBOT_BATTLEGROUNDTACTICSACTION_H #include "MovementActions.h" class ChatHandler; class Battleground; class PlayerbotAI; struct Position; #define SPELL_CAPTURE_BANNER 21651 typedef void(*BattleBotWaypointFunc)(); struct BattleBotWaypoint { BattleBotWaypoint(float x_, float y_, float z_, BattleBotWaypointFunc func) : x(x_), y(y_), z(z_), pFunc(func) { }; float x = 0.0f; float y = 0.0f; float z = 0.0f; BattleBotWaypointFunc pFunc = nullptr; }; typedef std::vector BattleBotPath; extern std::vector const vPaths_WS; extern std::vector const vPaths_AB; extern std::vector const vPaths_AV; extern std::vector const vPaths_EY; extern std::vector const vPaths_IC; class BGTactics : public MovementAction { public: static bool HandleConsoleCommand(ChatHandler* handler, char const* args); BGTactics(PlayerbotAI* botAI, std::string const name = "bg tactics") : MovementAction(botAI, name) { } bool Execute(Event event) override; private: static std::string const HandleConsoleCommandPrivate(WorldSession* session, char const* args); bool moveToStart(bool force = false); bool selectObjective(bool reset = false); bool moveToObjective(); bool selectObjectiveWp(std::vector const& vPaths); bool moveToObjectiveWp(BattleBotPath* const& currentPath, uint32 currentPoint, bool reverse = false); bool startNewPathBegin(std::vector const& vPaths); bool startNewPathFree(std::vector const& vPaths); bool resetObjective(); bool wsgPaths(); bool atFlag(std::vector const& vPaths, std::vector const& vFlagIds); bool flagTaken(); bool teamFlagTaken(); bool protectFC(); bool useBuff(); uint32 getDefendersCount(Position point, float range, bool combat = true); bool IsLockedInsideKeep(); }; class ArenaTactics : public MovementAction { public: ArenaTactics(PlayerbotAI* botAI, std::string const name = "arena tactics") : MovementAction(botAI, name) { } bool Execute(Event event) override; private: bool moveToCenter(Battleground *bg); }; #endif