added 'move from group' action/strat/shortcut-action

This commit is contained in:
Fuzz
2024-08-26 22:30:36 +10:00
parent 1aa9145902
commit d29569e9ea
14 changed files with 180 additions and 19 deletions

View File

@@ -47,7 +47,9 @@ protected:
bool Flee(Unit* target);
void ClearIdleState();
void UpdateMovementState();
bool MoveAway(Unit* target);
bool MoveAway(Unit* target, float distance = sPlayerbotAIConfig -> fleeDistance);
bool MoveFromGroup(float distance);
bool Move(float angle, float distance);
bool MoveInside(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->followDistance, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL);
void CreateWp(Player* wpOwner, float x, float y, float z, float o, uint32 entry, bool important = false);
Position BestPositionForMeleeToFlee(Position pos, float radius);
@@ -248,4 +250,12 @@ protected:
bool clockwise;
std::vector<std::pair<float, float>> waypoints;
};
class MoveFromGroupAction : public MovementAction
{
public:
MoveFromGroupAction(PlayerbotAI* botAI, std::string const name = "move from group") : MovementAction(botAI, name) {}
bool Execute(Event event) override;
};
#endif