From f7926eb28c45969dde1b0be3cb7e9739319dd7e9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 25 Jan 2019 21:35:23 +0000 Subject: [PATCH] ok take the all change --- .../Caps/EventQueue/EventQueueGetModule.cs | 17 +++++++++++++++-- .../Linden/Caps/EventQueue/EventQueueHelper.cs | 17 ----------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index f9f18c67ec..4da4412175 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -594,9 +594,22 @@ namespace OpenSim.Region.ClientStack.Linden Enqueue(item, avatarID); } - public OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, UUID avatarID) + public void ScriptRunningEvent(UUID objectID, UUID itemID, bool running, UUID avatarID) { - return EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, running); + StringBuilder sb = EventQueueHelper.StartEvent("ScriptRunningReply"); + LLSDxmlEncode.AddArray("Script", sb); + + LLSDxmlEncode.AddMap(sb); + LLSDxmlEncode.AddElem("ObjectID", objectID, sb); + LLSDxmlEncode.AddElem("ItemID", itemID, sb); + LLSDxmlEncode.AddElem("Running", running, sb); + LLSDxmlEncode.AddElem("Mono", true, sb); + LLSDxmlEncode.AddEndMap(sb); + + LLSDxmlEncode.AddEndArray(sb); + + OSDllsdxml item = new OSDllsdxml(EventQueueHelper.EndEvent(sb)); + Enqueue(item, avatarID); } public OSD BuildEvent(string eventName, OSD eventBody) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 2b11f5c552..6f392d5269 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -187,23 +187,6 @@ namespace OpenSim.Region.ClientStack.Linden return BuildEvent("TeleportFinish", body); } - public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running) - { - OSDMap script = new OSDMap(); - script.Add("ObjectID", OSD.FromUUID(objectID)); - script.Add("ItemID", OSD.FromUUID(itemID)); - script.Add("Running", OSD.FromBoolean(running)); - script.Add("Mono", OSD.FromBoolean(true)); - - OSDArray scriptArr = new OSDArray(); - scriptArr.Add(script); - - OSDMap body = new OSDMap(); - body.Add("Script", scriptArr); - - return BuildEvent("ScriptRunningReply", body); - } - public static OSD EstablishAgentCommunication(UUID agentID, string simIpAndPort, string seedcap, ulong regionHandle, int regionSizeX, int regionSizeY) {