From e7bb27b5bd9ae459096f1c2282a558ee872bc0c5 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 8 Jan 2009 19:14:52 +0000 Subject: * refactor: move code to send a dialog to a user from scene to DialogModule --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1afa08d..f2a8474 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5722,6 +5722,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) { + IDialogModule dm = World.RequestModuleInterface(); + + if (dm == null) + return; + m_host.AddScriptLPS(1); UUID av = new UUID(); if (!UUID.TryParse(avatar,out av)) @@ -5749,7 +5754,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } buts[i] = buttons.Data[i].ToString(); } - World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); + + dm.SendDialogToUser( + av, m_host.Name, m_host.UUID, m_host.OwnerID, + message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); + // ScriptSleep(1000); } -- cgit v1.1