mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 15:33:59 +00:00
fix(Core/Misc): Memleaks fixes. Part I. (#5546)
This commit is contained in:
@@ -364,14 +364,14 @@ void MotionMaster::MoveCircleTarget(Unit* target)
|
||||
return;
|
||||
}
|
||||
|
||||
Position* point = target->GetMeleeAttackPoint(_owner);
|
||||
if (point == nullptr)
|
||||
Position pos;
|
||||
if (!target->GetMeleeAttackPoint(_owner, pos))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Movement::MoveSplineInit init(_owner);
|
||||
init.MoveTo(point->m_positionX, point->m_positionY, point->m_positionZ, false);
|
||||
init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), false);
|
||||
init.SetWalk(true);
|
||||
init.SetFacing(target);
|
||||
init.Launch();
|
||||
|
||||
Reference in New Issue
Block a user