mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* refactor: move code to send a dialog to a user from scene to DialogModule
This commit is contained in:
@@ -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<IDialogModule>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user