Fix region crossings and access to inventory after changing regions within

the same simulator
This commit is contained in:
Melanie Thielker
2008-08-19 15:09:35 +00:00
parent 5c360e7374
commit e5cdba1cb4
4 changed files with 50 additions and 7 deletions

View File

@@ -49,6 +49,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>();
private List<Scene> m_Scenelist = new List<Scene>();
private Dictionary<LLUUID, Scene> m_AgentRegions = new Dictionary<LLUUID, Scene>();
#region IRegionModule Members
@@ -61,6 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
scene.RegisterModuleInterface<IInventoryModule>(this);
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClientClosed += ClientLoggedOut;
}
}
@@ -223,8 +225,28 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
}
}
// public void TestFunction()
// {
// }
public void SetRootAgentScene(LLUUID agentID, Scene scene)
{
m_AgentRegions[agentID] = scene;
}
public bool NeedSceneCacheClear(LLUUID agentID, Scene scene)
{
if (!m_AgentRegions.ContainsKey(agentID))
return true;
if(m_AgentRegions[agentID] == scene)
{
m_AgentRegions.Remove(agentID);
return true;
}
return false;
}
public void ClientLoggedOut(LLUUID agentID)
{
if (m_AgentRegions.ContainsKey(agentID))
m_AgentRegions.Remove(agentID);
}
}
}