From efc680f45b71be33aeb36165f2d82988a3c13aa9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 11 May 2008 12:01:12 +0000 Subject: * Changed implicit string conversion to LSL_Types.LSLString in money event of the key of the payer to an Explicit one. * Fixes Mantis: #1045 --- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 3 +++ OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 2 +- .../ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index c904b1d..4bdb0ba 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -1110,6 +1110,8 @@ namespace OpenSim.Region.ScriptEngine.Common } } + + static public implicit operator String(LSLString s) { return s.m_string; @@ -1272,6 +1274,7 @@ namespace OpenSim.Region.ScriptEngine.Common i.value++; return i; } + public static LSLInteger operator --(LSLInteger i) { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index ecf2a45..214f7c9 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -145,7 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void money(uint localID, LLUUID agentID, int amount) { - myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { agentID.ToString(), new LSL_Types.LSLInteger(amount) }); + myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) }); } // TODO: Replace placeholders below diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index ed11337..b08a0fa 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -326,12 +326,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); //if (m_host != null) //{ - m_ScriptEngine.World.SimChat(Helpers.StringToField(text.Substring(0,999)), + m_ScriptEngine.World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition, m_host.Name, m_host.UUID); } - catch + catch (Exception f) { //} //else -- cgit v1.1