fix(Core/Movement): Only update home position for patrolling NPCs (#24080)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
@@ -874,7 +874,11 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid, uint32 vendorEntry)
|
||||
// Stop the npc if moving
|
||||
if (uint32 pause = vendor->GetMovementTemplate().GetInteractionPauseTimer())
|
||||
vendor->PauseMovement(pause);
|
||||
vendor->SetHomePosition(vendor->GetPosition());
|
||||
|
||||
// Update home position for patrolling NPCs only (prevents drift for stationary NPCs)
|
||||
if (vendor->GetDefaultMovementType() == WAYPOINT_MOTION_TYPE ||
|
||||
vendor->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
vendor->SetHomePosition(vendor->GetPosition());
|
||||
|
||||
SetCurrentVendor(vendorEntry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user