From 848401be676d88bab431086157ddc44474c1aff2 Mon Sep 17 00:00:00 2001 From: SaW Date: Sat, 21 Dec 2024 17:22:06 +0100 Subject: [PATCH] Make bots use mounts when player is in travel form as well (#806) Addition to https://github.com/liyunfan1223/mod-playerbots/pull/805 --- src/strategy/actions/CheckMountStateAction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/CheckMountStateAction.cpp b/src/strategy/actions/CheckMountStateAction.cpp index 4b6c1dc8..953f47c6 100644 --- a/src/strategy/actions/CheckMountStateAction.cpp +++ b/src/strategy/actions/CheckMountStateAction.cpp @@ -74,13 +74,13 @@ bool CheckMountStateAction::Execute(Event event) auto masterInShapeshiftForm = master->GetShapeshiftForm(); // bool farFromMaster = sServerFacade->GetDistance2d(bot, master) > sPlayerbotAIConfig->sightDistance; - if ((master->IsMounted() || masterInShapeshiftForm == FORM_FLIGHT || masterInShapeshiftForm == FORM_FLIGHT_EPIC) + if ((master->IsMounted() || masterInShapeshiftForm == FORM_FLIGHT || masterInShapeshiftForm == FORM_FLIGHT_EPIC || masterInShapeshiftForm == FORM_TRAVEL) && !bot->IsMounted() && noattackers && shouldMount && !bot->IsInCombat() && botAI->GetState() != BOT_STATE_COMBAT) { return Mount(); } - if ((!master->IsMounted() && masterInShapeshiftForm != FORM_FLIGHT && masterInShapeshiftForm != FORM_FLIGHT_EPIC) + if ((!master->IsMounted() && masterInShapeshiftForm != FORM_FLIGHT && masterInShapeshiftForm != FORM_FLIGHT_EPIC && masterInShapeshiftForm != FORM_TRAVEL) && bot->IsMounted()) { WorldPacket emptyPacket;