From de161585c0960a93911f446f0179441ba5470245 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Oct 2011 01:56:25 +0100 Subject: Implement osNpcStand() Allows you to stand an NPC that has sat. --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 +++++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ 3 files changed, 17 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7cf6642..49c8722 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2362,6 +2362,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + public void osNpcStand(LSL_Key npc) + { + CheckThreatLevel(ThreatLevel.High, "osNpcStand"); + + INPCModule module = World.RequestModuleInterface(); + if (module != null) + { + module.Stand(new UUID(npc.m_string), World); + } + } + public void osNpcRemove(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index bb0a870..3221833 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -179,6 +179,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void osNpcStopMoveToTarget(LSL_Key npc); void osNpcSay(key npc, string message); void osNpcSit(key npc, key target, int options); + void osNpcStand(LSL_Key npc); void osNpcRemove(key npc); LSL_Key osOwnerSaveAppearance(string notecard); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 38391df..9e7c8da 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -533,6 +533,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_OSSL_Functions.osNpcSit(npc, target, options); } + public void osNpcStand(LSL_Key npc) + { + m_OSSL_Functions.osNpcStand(npc); + } + public void osNpcRemove(key npc) { m_OSSL_Functions.osNpcRemove(npc); -- cgit v1.1