aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/LLSDHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/LLSDHelpers.cs')
-rw-r--r--OpenSim/Capabilities/LLSDHelpers.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Capabilities/LLSDHelpers.cs b/OpenSim/Capabilities/LLSDHelpers.cs
index d582267..e331cfb 100644
--- a/OpenSim/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Capabilities/LLSDHelpers.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using OpenMetaverse;
33 34
34namespace OpenSim.Framework.Capabilities 35namespace OpenSim.Framework.Capabilities
35{ 36{
@@ -160,7 +161,18 @@ namespace OpenSim.Framework.Capabilities
160 else if(enumerator.Value is Boolean && field.FieldType == typeof(int) ) 161 else if(enumerator.Value is Boolean && field.FieldType == typeof(int) )
161 { 162 {
162 int i = (bool)enumerator.Value ? 1 : 0; 163 int i = (bool)enumerator.Value ? 1 : 0;
163 field.SetValue(obj, (object)i); 164 field.SetValue(obj, i);
165 }
166 else if(field.FieldType == typeof(bool) && enumerator.Value is int)
167 {
168 bool b = (int)enumerator.Value != 0;
169 field.SetValue(obj, b);
170 }
171 else if(field.FieldType == typeof(UUID) && enumerator.Value is string)
172 {
173 UUID u;
174 UUID.TryParse((string)enumerator.Value, out u);
175 field.SetValue(obj, u);
164 } 176 }
165 else 177 else
166 { 178 {