mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Refactor AgentPreferences so that database operations happen centrally. the opensim way.
Signed-off-by: Diva Canto <diva@metaverseink.com>
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user