movement, disable hearthstone

This commit is contained in:
Yunfan Li
2023-05-27 23:59:59 +08:00
parent 3ec656d7ec
commit 09463feb8f
4 changed files with 28 additions and 28 deletions

View File

@@ -46,21 +46,21 @@ bool CheckMountStateAction::Execute(Event event)
if (!bot->GetGroup() || bot->GetGroup()->GetLeaderGUID() != master->GetGUID())
return false;
bool farFromMaster = sServerFacade->GetDistance2d(bot, master) > sPlayerbotAIConfig->sightDistance;
// bool farFromMaster = sServerFacade->GetDistance2d(bot, master) > sPlayerbotAIConfig->sightDistance;
if (master->IsMounted() && !bot->IsMounted() && noattackers)
{
return Mount();
}
if (!bot->IsMounted() && (chasedistance || (farFromMaster && botAI->HasStrategy("follow", BOT_STATE_NON_COMBAT))) && !bot->IsInCombat() && !dps)
return Mount();
// if (!bot->IsMounted() && (chasedistance || (farFromMaster && botAI->HasStrategy("follow", BOT_STATE_NON_COMBAT))) && !bot->IsInCombat() && !dps)
// return Mount();
if (!bot->IsFlying() && ((!farFromMaster && !master->IsMounted()) || attackdistance) && bot->IsMounted())
{
WorldPacket emptyPacket;
bot->GetSession()->HandleCancelMountAuraOpcode(emptyPacket);
return true;
}
// if (!bot->IsFlying() && ((!farFromMaster && !master->IsMounted()) || attackdistance) && bot->IsMounted())
// {
// WorldPacket emptyPacket;
// bot->GetSession()->HandleCancelMountAuraOpcode(emptyPacket);
// return true;
// }
return false;
}

View File

@@ -382,23 +382,23 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
}
}
if (pathType == TravelNodePathType::teleportSpell && entry)
{
if (entry == 8690)
{
if (!bot->HasSpellCooldown(8690))
{
return botAI->DoSpecificAction("hearthstone", Event("move action"));
}
else
{
movePath.clear();
AI_VALUE(LastMovement&, "last movement").setPath(movePath);
LOG_DEBUG("playerbots", "bot->HasSpellCooldown(8690)");
return false;
}
}
}
// if (pathType == TravelNodePathType::teleportSpell && entry)
// {
// if (entry == 8690)
// {
// if (!bot->HasSpellCooldown(8690))
// {
// return botAI->DoSpecificAction("hearthstone", Event("move action"));
// }
// else
// {
// movePath.clear();
// AI_VALUE(LastMovement&, "last movement").setPath(movePath);
// LOG_DEBUG("playerbots", "bot->HasSpellCooldown(8690)");
// return false;
// }
// }
// }
//if (!isTransport && bot->GetTransport())
// bot->GetTransport()->RemovePassenger(bot);