mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-18 01:24:35 +00:00
Refactor of the CheckMountStateAction class (#919)
* Update CheckMountStateAction.cpp The refactoring focused on improving readability, reducing redundancy, and optimizing performance where possible. * Update CheckMountStateAction.h * Update CheckMountStateAction.cpp * Update CheckMountStateAction.cpp * Update CheckMountStateAction.cpp * Update CheckMountStateAction.h * Fix lowest level mount from config * Properly fix * Reduced masterInShapeshiftForm lookups to 1 Reduced masterInShapeshiftForm lookups to 1 * Fix for missing useFastGroundMountAtMinLevel * Final commit: Ensure max 99 speed in BG
This commit is contained in:
@@ -19,6 +19,21 @@ public:
|
||||
bool isUseful() override;
|
||||
bool isPossible() override { return true; }
|
||||
bool Mount();
|
||||
|
||||
private:
|
||||
ShapeshiftForm masterInShapeshiftForm;
|
||||
float CalculateDismountDistance() const;
|
||||
float CalculateMountDistance() const;
|
||||
void Dismount();
|
||||
bool ShouldFollowMasterMountState(Player* master, bool noAttackers, bool shouldMount) const;
|
||||
bool ShouldDismountForMaster(Player* master) const;
|
||||
int32 CalculateMasterMountSpeed(Player* master) const;
|
||||
bool CheckForSwiftMount() const;
|
||||
std::map<uint32, std::map<int32, std::vector<uint32>>> GetAllMountSpells() const;
|
||||
bool TryPreferredMount(Player* master) const;
|
||||
uint32 GetMountType(Player* master) const;
|
||||
void FilterMountsBySpeed(std::map<int32, std::vector<uint32>>& spells, int32 masterSpeed) const;
|
||||
bool TryRandomMount(const std::map<int32, std::vector<uint32>>& spells) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user