mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Removed Static declarations for role assignment cooldowns
This commit is contained in:
parent
c265a5e018
commit
11c9ee4d72
@ -72,7 +72,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit RazorscaleBossHelper(PlayerbotAI* botAI)
|
explicit RazorscaleBossHelper(PlayerbotAI* botAI)
|
||||||
: AiObject(botAI), _boss(nullptr), _lastRoleSwapTime(0), _roleSwapCooldown(10) {}
|
: AiObject(botAI), _boss(nullptr) {}
|
||||||
|
|
||||||
bool UpdateBossAI();
|
bool UpdateBossAI();
|
||||||
Unit* GetBoss() const;
|
Unit* GetBoss() const;
|
||||||
@ -93,8 +93,12 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Unit* _boss;
|
Unit* _boss;
|
||||||
std::time_t _lastRoleSwapTime;
|
|
||||||
const std::time_t _roleSwapCooldown;
|
// A map to track the last role swap *per bot* by their GUID
|
||||||
|
static std::unordered_map<ObjectGuid, std::time_t> _lastRoleSwapTime;
|
||||||
|
|
||||||
|
// The cooldown that applies to every bot
|
||||||
|
static const std::time_t _roleSwapCooldown = 10;
|
||||||
|
|
||||||
static std::unordered_map<ObjectGuid, time_t> _harpoonCooldowns;
|
static std::unordered_map<ObjectGuid, time_t> _harpoonCooldowns;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user