mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
add osNpcSetProfileAbout(LSL_Key npc, string about) to set NPCs profile About text. requires OsNpcCreate rights
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -343,6 +343,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
rotation osNpcGetRot(key npc);
|
||||
void osNpcSetRot(LSL_Key npc, rotation rot);
|
||||
void osNpcStopMoveToTarget(LSL_Key npc);
|
||||
void osNpcSetProfileAbout(LSL_Key npc, string about);
|
||||
void osNpcSay(key npc, string message);
|
||||
void osNpcSay(key npc, int channel, string message);
|
||||
void osNpcShout(key npc, int channel, string message);
|
||||
|
||||
@@ -637,6 +637,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osNpcStopMoveToTarget(npc);
|
||||
}
|
||||
|
||||
public void osNpcSetProfileAbout(LSL_Key npc, string about)
|
||||
{
|
||||
m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
|
||||
}
|
||||
|
||||
public void osNpcSay(key npc, string message)
|
||||
{
|
||||
m_OSSL_Functions.osNpcSay(npc, message);
|
||||
|
||||
Reference in New Issue
Block a user