diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 28e09294..eed9c784 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -1426,8 +1426,8 @@ void PlayerbotAI::DoNextAction(bool min) return; } - // Change engine if just ressed - if (currentEngine == engines[BOT_STATE_DEAD] && isBotAlive) + // Change engine if just ressed (no movement update when rooted) + if (currentEngine == engines[BOT_STATE_DEAD] && isBotAlive && !bot->IsRooted()) { bot->SendMovementFlagUpdate(); diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index a2fe72f6..0b666b9a 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1654,6 +1654,10 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& if (bot->IsBeingTeleported() || !bot->IsInWorld()) return; + // no teleport / movement update when rooted. + if (bot->IsRooted()) + return; + // ignore when in queue for battle grounds. if (bot->InBattlegroundQueue()) return; diff --git a/src/ServerFacade.cpp b/src/ServerFacade.cpp index f85525bc..dda19aeb 100644 --- a/src/ServerFacade.cpp +++ b/src/ServerFacade.cpp @@ -41,13 +41,17 @@ bool ServerFacade::IsDistanceLessOrEqualThan(float dist1, float dist2) { return void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool force) { + if (!bot) + return; + float angle = bot->GetAngle(wo); // if (!force && bot->isMoving()) // bot->SetFacingTo(bot->GetAngle(wo)); // else // { bot->SetOrientation(angle); - bot->SendMovementFlagUpdate(); + if (!bot->IsRooted()) + bot->SendMovementFlagUpdate(); // } } diff --git a/src/strategy/actions/FishingAction.cpp b/src/strategy/actions/FishingAction.cpp index 45228817..195d3fc7 100644 --- a/src/strategy/actions/FishingAction.cpp +++ b/src/strategy/actions/FishingAction.cpp @@ -417,7 +417,8 @@ bool FishingAction::Execute(Event event) { float angle = bot->GetAngle(pos.GetPositionX(), pos.GetPositionY()); bot->SetOrientation(angle); - bot->SendMovementFlagUpdate(); + if (!bot->IsRooted()) + bot->SendMovementFlagUpdate(); } EquipFishingPoleAction equipAction(botAI);