mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-26 05:15:54 +00:00
Reinstate cached preferred mounts (#1058)
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#ifndef _PLAYERBOT_CHECKMOUNTSTATEACTION_H
|
||||
#define _PLAYERBOT_CHECKMOUNTSTATEACTION_H
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "UseItemAction.h"
|
||||
|
||||
const uint16 SPELL_TRAVEL_FORM = 783;
|
||||
@@ -21,6 +24,12 @@ struct MountData
|
||||
int32 maxSpeed = 59;
|
||||
};
|
||||
|
||||
struct PreferredMountCache
|
||||
{
|
||||
std::vector<uint32> groundMounts;
|
||||
std::vector<uint32> flightMounts;
|
||||
};
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CheckMountStateAction : public UseItemAction
|
||||
@@ -37,6 +46,8 @@ private:
|
||||
Player* master;
|
||||
ShapeshiftForm masterInShapeshiftForm;
|
||||
ShapeshiftForm botInShapeshiftForm;
|
||||
static std::unordered_map<uint32, PreferredMountCache> mountCache;
|
||||
static bool preferredMountTableExists;
|
||||
float CalculateDismountDistance() const;
|
||||
float CalculateMountDistance() const;
|
||||
void Dismount();
|
||||
|
||||
Reference in New Issue
Block a user