mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
* refactor: Move RequestInventoryForUser() from service to CachedUserInfo
* This simplifies callers in most cases - CachedUserInfo is already handling the rest of the fetch inventory work anyway
This commit is contained in:
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (recipientUserInfo != null)
|
||||
{
|
||||
if (!recipientUserInfo.HasReceivedInventory)
|
||||
CommsManager.UserProfileCacheService.RequestInventoryForUser(recipient);
|
||||
recipientUserInfo.FetchInventory();
|
||||
|
||||
// Insert a copy of the item into the recipient
|
||||
InventoryItemBase itemCopy = new InventoryItemBase();
|
||||
@@ -1202,7 +1202,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
avatarId);
|
||||
}
|
||||
if (!profile.HasReceivedInventory)
|
||||
CommsManager.UserProfileCacheService.RequestInventoryForUser(avatarId);
|
||||
profile.FetchInventory();
|
||||
|
||||
InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
|
||||
|
||||
if (agentItem == null)
|
||||
@@ -1841,8 +1842,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Async inventory requests will queue, but they will never
|
||||
// execute unless inventory is actually fetched
|
||||
//
|
||||
CommsManager.UserProfileCacheService.RequestInventoryForUser(
|
||||
userInfo.UserProfile.ID);
|
||||
userInfo.FetchInventory();
|
||||
}
|
||||
|
||||
if (userInfo != null)
|
||||
|
||||
@@ -847,7 +847,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//SendAnimPack();
|
||||
|
||||
m_scene.SwapRootAgentCount(false);
|
||||
m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid);
|
||||
|
||||
CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid);
|
||||
if (userInfo != null)
|
||||
userInfo.FetchInventory();
|
||||
else
|
||||
m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid);
|
||||
|
||||
//m_scene.CapsModule.AddCapsHandler(m_uuid);
|
||||
|
||||
// On the next prim update, all objects will be sent
|
||||
@@ -2504,8 +2510,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
// Restore the user structures that we needed to delete before asking the receiving region to complete the crossing
|
||||
m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID);
|
||||
// Restore the user structures that we needed to delete before asking the receiving region
|
||||
// to complete the crossing
|
||||
userInfo.FetchInventory();
|
||||
m_scene.CapsModule.AddCapsHandler(UUID);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user