diff --git a/prebuild.xml b/prebuild.xml
index ff70498..af0ac3a 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -28,6 +28,9 @@
+
+
+
diff --git a/src/Appearance2Avatar.cs b/src/Appearance2Avatar.cs
index 3726d39..90085f0 100644
--- a/src/Appearance2Avatar.cs
+++ b/src/Appearance2Avatar.cs
@@ -7,6 +7,9 @@ using OpenSim.Framework;
using OpenSim.Modules.Appearance2Avatar.helper;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.ScriptEngine.Interfaces;
+using OpenSim.Region.ScriptEngine.Shared.Api;
+using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -68,25 +71,12 @@ namespace OpenSim.Modules.Appearance2Avatar
}
- protected string LoadNotecard(UUID assetID)
+ protected string LoadNotecard(SceneObjectPart host, String notecardname)
{
- if (assetID != UUID.Zero)
- {
- StringBuilder notecardData = new StringBuilder();
+ IScriptEngine wComm = m_scene.RequestModuleInterface();
- for (int count = 0; count < NotecardCache.GetLines(assetID); count++)
- {
- string line = NotecardCache.GetLine(assetID, count) + "\n";
-
- // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line);
-
- notecardData.Append(line);
- }
-
- return notecardData.ToString();
- }
-
- return null;
+ IOSSL_Api _api = (IOSSL_Api)wComm.GetApi(host.UUID, "LSL");
+ return _api.osGetNotecard(notecardname);
}
[ScriptInvocation]
@@ -105,13 +95,12 @@ namespace OpenSim.Modules.Appearance2Avatar
{
if (notecardItem.Type != 7)
{
- m_log.Error("[" + Name + "] ERROR: Given item is not a notecard");
throw new Exception("Given item is not a notecard.");
return;
}
m_log.Info("[" + Name + "] Info: Fetch asset data for notecard.");
- String asset = LoadNotecard(notecardItem.AssetID);
+ String asset = LoadNotecard(_host, notecard);
if (asset != null)
{