add osNpcSetProfileAbout(LSL_Key npc, string about) to set NPCs profile About text. requires OsNpcCreate rights

This commit is contained in:
UbitUmarov
2016-12-06 17:05:02 +00:00
parent 240ab951b5
commit d4e285b1a1
6 changed files with 40 additions and 3 deletions

View File

@@ -2999,6 +2999,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
public void osNpcSetProfileAbout(LSL_Key npc, string about)
{
CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
m_host.AddScriptLPS(1);
INPCModule module = World.RequestModuleInterface<INPCModule>();
if (module != null)
{
UUID npcId = new UUID(npc.m_string);
if (!module.CheckPermissions(npcId, m_host.OwnerID))
return;
ScenePresence sp = World.GetScenePresence(npcId);
if (sp != null)
((INPC)(sp.ControllingClient)).profileAbout = about;
}
}
public void osNpcSay(LSL_Key npc, string message)
{
osNpcSay(npc, 0, message);