mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-26 15:06:22 +00:00
Battleground Rewrite
- Refactored BattleGroundTactics.cpp - Bots choose strategies to determine if they are more aggressive or defensive in objectives - Largely improved bots tactics in WSG, AB, AV and EY - Improved how bots chase flag carriers - Fixed some bots stuck in action loops - especially in WSG and AV - Fixed several other Bugs
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#ifndef _PLAYERBOT_BATTLEGROUNDTACTICSACTION_H
|
||||
#define _PLAYERBOT_BATTLEGROUNDTACTICSACTION_H
|
||||
|
||||
#include "BattlegroundAV.h"
|
||||
#include "MovementActions.h"
|
||||
|
||||
class ChatHandler;
|
||||
@@ -27,6 +28,31 @@ struct BattleBotWaypoint
|
||||
BattleBotWaypointFunc pFunc = nullptr;
|
||||
};
|
||||
|
||||
struct AVNodePositionData
|
||||
{
|
||||
Position pos;
|
||||
float maxRadius;
|
||||
};
|
||||
|
||||
// Added to fix bot stuck at objectives
|
||||
static std::unordered_map<uint8, AVNodePositionData> AVNodeMovementTargets = {
|
||||
{BG_AV_NODES_FIRSTAID_STATION, {Position(640.364f, -36.535f, 45.625f), 15.0f}},
|
||||
{BG_AV_NODES_STORMPIKE_GRAVE, {Position(665.598f, -292.976f, 30.291f), 15.0f}},
|
||||
{BG_AV_NODES_STONEHEART_GRAVE, {Position(76.108f, -399.602f, 45.730f), 15.0f}},
|
||||
{BG_AV_NODES_SNOWFALL_GRAVE, {Position(-201.298f, -119.661f, 78.291f), 15.0f}},
|
||||
{BG_AV_NODES_ICEBLOOD_GRAVE, {Position(-617.858f, -400.654f, 59.692f), 15.0f}},
|
||||
{BG_AV_NODES_FROSTWOLF_GRAVE, {Position(-1083.803f, -341.520f, 55.304f), 15.0f}},
|
||||
{BG_AV_NODES_FROSTWOLF_HUT, {Position(-1405.678f, -309.108f, 89.377f, 0.392f), 10.0f}},
|
||||
{BG_AV_NODES_DUNBALDAR_SOUTH, {Position(556.551f, -77.240f, 51.931f), 0.0f}},
|
||||
{BG_AV_NODES_DUNBALDAR_NORTH, {Position(670.664f, -142.031f, 63.666f), 0.0f}},
|
||||
{BG_AV_NODES_ICEWING_BUNKER, {Position(200.310f, -361.232f, 56.387f), 0.0f}},
|
||||
{BG_AV_NODES_STONEHEART_BUNKER, {Position(-156.302f, -440.032f, 40.403f), 0.0f}},
|
||||
{BG_AV_NODES_ICEBLOOD_TOWER, {Position(-569.702f, -265.362f, 75.009f), 0.0f}},
|
||||
{BG_AV_NODES_TOWER_POINT, {Position(-767.439f, -360.200f, 90.895f), 0.0f}},
|
||||
{BG_AV_NODES_FROSTWOLF_ETOWER, {Position(-1303.737f, -314.070f, 113.868f), 0.0f}},
|
||||
{BG_AV_NODES_FROSTWOLF_WTOWER, {Position(-1300.648f, -267.356f, 114.151f), 0.0f}},
|
||||
};
|
||||
|
||||
typedef std::vector<BattleBotWaypoint> BattleBotPath;
|
||||
|
||||
extern std::vector<BattleBotPath*> const vPaths_WS;
|
||||
@@ -48,13 +74,13 @@ private:
|
||||
static std::string const HandleConsoleCommandPrivate(WorldSession* session, char const* args);
|
||||
bool moveToStart(bool force = false);
|
||||
bool selectObjective(bool reset = false);
|
||||
bool moveToObjective();
|
||||
bool moveToObjective(bool ignoreDist);
|
||||
bool selectObjectiveWp(std::vector<BattleBotPath*> const& vPaths);
|
||||
bool moveToObjectiveWp(BattleBotPath* const& currentPath, uint32 currentPoint, bool reverse = false);
|
||||
bool startNewPathBegin(std::vector<BattleBotPath*> const& vPaths);
|
||||
bool startNewPathFree(std::vector<BattleBotPath*> const& vPaths);
|
||||
bool resetObjective();
|
||||
bool wsgPaths();
|
||||
bool wsJumpDown();
|
||||
bool eyJumpDown();
|
||||
bool atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<uint32> const& vFlagIds);
|
||||
bool flagTaken();
|
||||
|
||||
Reference in New Issue
Block a user