Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed Jul 12, 2023
2 parents a214f7e + 74c1f18 commit e585b9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
3 changes: 3 additions & 0 deletions playerbot/strategy/actions/CheckMountStateAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ bool CheckMountStateAction::isUseful()
if (!bot->GetPlayerbotAI()->HasStrategy("mount", BotState::BOT_STATE_NON_COMBAT) && !bot->IsMounted())
return false;

if (!bot->IsMounted() && bot->IsInWater())
return false;

bool firstmount = bot->GetLevel() >=
#ifdef MANGOSBOT_ZERO
40
Expand Down
17 changes: 1 addition & 16 deletions playerbot/strategy/actions/MovementActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,22 +418,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
{
if (!sTravelNodeMap.getNodes().empty() && !bot->InBattleGround())
{
if (sPlayerbotAIConfig.tweakValue)
{
if (lastMove.future.valid())
{
if(lastMove.future.wait_for(0s) != future_status::ready)
return true; //we have no path. Wait until it is ready.
movePath = lastMove.future.get();
}
else
{
lastMove.future = std::async(&TravelNodeMap::getFullPath, startPosition, endPosition, bot);
return true;
}
}
else
movePath = sTravelNodeMap.getFullPath(startPosition, endPosition, bot);
movePath = sTravelNodeMap.getFullPath(startPosition, endPosition, bot);

if (movePath.empty())
{
Expand Down
1 change: 0 additions & 1 deletion playerbot/strategy/values/LastMovementValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ namespace ai
WorldPosition lastMoveShort;
TravelPath lastPath;
time_t nextTeleport;
std::future<TravelPath> future;
};

class LastMovementValue : public ManualSetValue<LastMovement&>
Expand Down

0 comments on commit e585b9f

Please sign in to comment.