Make bots use mounts when player is in travel form as well (#806)

Addition to https://github.com/liyunfan1223/mod-playerbots/pull/805
This commit is contained in:
SaW
2024-12-21 17:22:06 +01:00
committed by GitHub
parent 7ccc18c7d6
commit 848401be67

View File

@@ -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;