Queued ReplaceOutfit with 2s delay
This commit is contained in:
parent
681d6b915b
commit
801c740549
1 changed files with 10 additions and 6 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue