aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs25
1 files changed, 22 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 61394af..e90f577 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3190,13 +3190,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3190 { 3190 {
3191 CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatarFromInventory"); 3191 CheckThreatLevel(ThreatLevel.High, "osForceAttachToAvatarFromInventory");
3192 3192
3193 m_host.AddScriptLPS(1);
3194
3195 ForceAttachToAvatarFromInventory(m_host.OwnerID, itemName, attachmentPoint);
3196 }
3197
3198 public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
3199 {
3200 CheckThreatLevel(ThreatLevel.Severe, "osForceAttachToOtherAvatarFromInventory");
3201
3202 m_host.AddScriptLPS(1);
3203
3204 UUID avatarId;
3205
3206 if (!UUID.TryParse(rawAvatarId, out avatarId))
3207 return;
3208
3209 ForceAttachToAvatarFromInventory(avatarId, itemName, attachmentPoint);
3210 }
3211
3212 public void ForceAttachToAvatarFromInventory(UUID avatarId, string itemName, int attachmentPoint)
3213 {
3193 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; 3214 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3194 3215
3195 if (attachmentsModule == null) 3216 if (attachmentsModule == null)
3196 return; 3217 return;
3197 3218
3198 m_host.AddScriptLPS(1);
3199
3200 InitLSL(); 3219 InitLSL();
3201 3220
3202 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); 3221 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName);
@@ -3219,7 +3238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3219 return; 3238 return;
3220 } 3239 }
3221 3240
3222 ScenePresence sp = World.GetScenePresence(m_host.OwnerID); 3241 ScenePresence sp = World.GetScenePresence(avatarId);
3223 3242
3224 if (sp == null) 3243 if (sp == null)
3225 return; 3244 return;