mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Second pass for adding 'healer dps' check based on map ID. Now works when teleporting in addition to on init.
This commit is contained in:
@@ -722,6 +722,7 @@ void PlayerbotAI::HandleTeleportAck()
|
||||
// SetNextCheckDelay(urand(2000, 5000));
|
||||
if (sPlayerbotAIConfig->applyInstanceStrategies)
|
||||
ApplyInstanceStrategies(bot->GetMapId(), true);
|
||||
EvaluateHealerDpsStrategy();
|
||||
Reset(true);
|
||||
}
|
||||
|
||||
@@ -6390,3 +6391,14 @@ void PlayerbotAI::AddTimedEvent(std::function<void()> callback, uint32 delayMs)
|
||||
// Every Player already owns an EventMap called m_Events
|
||||
bot->m_Events.AddEvent(new LambdaEvent(std::move(callback)), bot->m_Events.CalculateTime(delayMs));
|
||||
}
|
||||
|
||||
void PlayerbotAI::EvaluateHealerDpsStrategy()
|
||||
{
|
||||
if (!IsHeal(bot, true))
|
||||
return;
|
||||
|
||||
if (sPlayerbotAIConfig->IsRestrictedHealerDPSMap(bot->GetMapId()))
|
||||
ChangeStrategy("-healer dps", BOT_STATE_COMBAT);
|
||||
else
|
||||
ChangeStrategy("+healer dps", BOT_STATE_COMBAT);
|
||||
}
|
||||
|
||||
@@ -401,6 +401,7 @@ public:
|
||||
void ClearStrategies(BotState type);
|
||||
std::vector<std::string> GetStrategies(BotState type);
|
||||
void ApplyInstanceStrategies(uint32 mapId, bool tellMaster = false);
|
||||
void EvaluateHealerDpsStrategy();
|
||||
bool ContainsStrategy(StrategyType type);
|
||||
bool HasStrategy(std::string const name, BotState type);
|
||||
BotState GetState() { return currentState; };
|
||||
|
||||
Reference in New Issue
Block a user