mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-27 13:55:55 +00:00
Fix/Feature: Bots can use travel/flight Shapeshift where appropriate (#1042)
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
|
||||
#include "UseItemAction.h"
|
||||
|
||||
const uint16 SPELL_TRAVEL_FORM = 783;
|
||||
const uint16 SPELL_FLIGHT_FORM = 33943;
|
||||
const uint16 SPELL_SWIFT_FLIGHT_FORM = 40120;
|
||||
|
||||
struct MountData
|
||||
{
|
||||
bool swiftMount = false;
|
||||
@@ -30,7 +34,9 @@ public:
|
||||
bool Mount();
|
||||
|
||||
private:
|
||||
Player* master;
|
||||
ShapeshiftForm masterInShapeshiftForm;
|
||||
ShapeshiftForm botInShapeshiftForm;
|
||||
float CalculateDismountDistance() const;
|
||||
float CalculateMountDistance() const;
|
||||
void Dismount();
|
||||
@@ -39,6 +45,7 @@ private:
|
||||
int32 CalculateMasterMountSpeed(Player* master, const MountData& mountData) const;
|
||||
bool CheckForSwiftMount() const;
|
||||
std::map<uint32, std::map<int32, std::vector<uint32>>> GetAllMountSpells() const;
|
||||
bool TryForms(Player* master, int32 masterMountType, int32 masterSpeed) const;
|
||||
bool TryPreferredMount(Player* master) const;
|
||||
uint32 GetMountType(Player* master) const;
|
||||
bool TryRandomMountFiltered(const std::map<int32, std::vector<uint32>>& spells, int32 masterSpeed) const;
|
||||
|
||||
Reference in New Issue
Block a user