Refactor AgentPreferences so that database operations happen centrally. the opensim way.

Signed-off-by: Diva Canto <diva@metaverseink.com>
This commit is contained in:
Cinder
2015-06-12 18:48:07 -06:00
committed by Diva Canto
parent c1ddb7f05e
commit 0fa94f222d
20 changed files with 1062 additions and 104 deletions

View File

@@ -6149,14 +6149,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
// This should only return a value if the avatar is in the same region, but eh. idc.
m_host.AddScriptLPS(1);
IAgentPreferencesModule ap = World.RequestModuleInterface<IAgentPreferencesModule>();
if (ap != null)
UUID key = new UUID();
if (UUID.TryParse(id, out key))
{
UUID key = new UUID();
if (UUID.TryParse(id, out key))
{
return ap.GetLang(key);
}
return new LSL_String(World.AgentPreferencesService.GetLang(key));
}
return new LSL_String("en-us");
}