diff --git a/src/server/game/Movement/MovementGenerators/FollowMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FollowMovementGenerator.cpp index ee2e9d4912..597fb610cf 100644 --- a/src/server/game/Movement/MovementGenerators/FollowMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FollowMovementGenerator.cpp @@ -334,9 +334,15 @@ void FollowMovementGenerator::LaunchMovement(Unit* owner) if (velocity <= 0.1f) return; - // Predicting our follow destination - dest.m_positionX += std::cos(Position::NormalizeOrientation(_target->GetOrientation() + offset)) * velocity; - dest.m_positionY += std::sin(Position::NormalizeOrientation(_target->GetOrientation() + offset)) * velocity; + // Predicting our follow destination if the owner is slower or equally as fast as the target + bool predictDestination = (!_joinFormation && !_catchUpToTarget && velocity < _target->GetSpeed(SelectSpeedType(_target->m_movementInfo.GetMovementFlags()))) + || (_joinFormation || _catchUpToTarget); + + if (predictDestination) + { + dest.m_positionX += std::cos(Position::NormalizeOrientation(_target->GetOrientation() + offset)) * velocity; + dest.m_positionY += std::sin(Position::NormalizeOrientation(_target->GetOrientation() + offset)) * velocity; + } // Now we calculate our actual destination data if (!owner->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING)) diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp index 5e35557d0c..414b0106ac 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp @@ -1815,7 +1815,7 @@ class npc_ascendant_council_frozen_orb : public CreatureScript Talk(SAY_ANNOUNCE_PURSUE_PLAYER, target); DoCast(target, SPELL_FROST_BEACON); me->ClearUnitState(UNIT_STATE_CASTING); - me->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f); + me->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f, false, false, true); _events.ScheduleEvent(EVENT_INCREASE_SPEED, 1s); } break; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp index b92e4f0351..0262228578 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp @@ -274,7 +274,7 @@ struct boss_atramedes : public BossAI if (Unit* summoner = summon->ToTempSummon()->GetSummoner()) { summon->CastSpell(summoner, SPELL_TRACKING); - summon->GetMotionMaster()->MoveFollow(summoner, 0.f, 0.f); + summon->GetMotionMaster()->MoveFollow(summoner, 0.f, 0.f, false, false, true); me->SetFacingToObject(summon); DoCast(summon, SPELL_SONIC_BREATH_CAST); } @@ -288,7 +288,7 @@ struct boss_atramedes : public BossAI summon->CastSpell(summon, SPELL_ROARING_FLAME_BREATH_REVERSE_CAST); summon->CastSpell(summon, SPELL_AGGRO_CREATOR); summon->CastSpell(summoner, SPELL_TRACKING); - summon->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.f); + summon->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.f, false, false, true); _reverberatingFlameGUID = summon->GetGUID(); } break; @@ -492,7 +492,7 @@ struct boss_atramedes : public BossAI { flame->CastSpell(flame, SPELL_SONIC_FLAMES); flame->CastSpell(target, SPELL_TRACKING); - flame->GetMotionMaster()->MoveFollow(target, 0.0f, 0.f); + flame->GetMotionMaster()->MoveFollow(target, 0.0f, 0.f, false, false, true); } } break; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 7fa208ee17..2a9aebdd47 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -722,7 +722,7 @@ class boss_the_lich_king : public CreatureScript summon->CastSpell(summon, SPELL_ICE_SPHERE, false); summon->CastSpell(summon, SPELL_ICE_BURST_TARGET_SEARCH, false); summon->CastSpell(target, SPELL_ICE_PULSE, false); - summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f); + summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f, false, false, true); } else summon->DespawnOrUnsummon();