Queued ReplaceOutfit with 2s delay

This commit is contained in:
RebeccaNod1 2026-05-08 18:10:56 -06:00
parent 681d6b915b
commit 801c740549

View file

@ -522,12 +522,16 @@ namespace SecondBotEvents.Services
AddLink(item); AddLink(item);
} }
// Clean swap: Remove everything current, then add everything new. // Queued swap: Detach everything, wait for SL to settle, then attach new.
// This ensures proper link folder sync and avoids toggling. ThreadPool.QueueUserWorkItem(sync =>
var current = ContentLinks().Select(RealInventoryItem).ToList(); {
RemoveFromOutfit(current); var current = ContentLinks().Select(RealInventoryItem).ToList();
RemoveFromOutfit(current);
AddToOutfit(outfit, false);
Thread.Sleep(2000); // Wait for SL servers to process detaches
AddToOutfit(outfit, false);
});
} }
/// <summary> /// <summary>