Add osNpcSayTo(key npc, key target, integer channel, string message)
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>0.9.1.0-post-fixes
parent
af2a9d9508
commit
0881840946
|
@ -3164,7 +3164,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
module.Say(npcId, World, message, channel);
|
module.Say(npcId, World, message, channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osNpcSayTo(LSL_Key npc, string target, int channel, string msg)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.High, "osNpcSayTo");
|
||||||
|
|
||||||
|
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||||
|
if (module != null)
|
||||||
|
{
|
||||||
|
UUID npcId = new UUID(npc.m_string);
|
||||||
|
|
||||||
|
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ScenePresence NPCpresence = World.GetScenePresence(npcId);
|
||||||
|
if (NPCpresence == null || NPCpresence.IsDeleted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Vector3 npcPOS = NPCpresence.AbsolutePosition;
|
||||||
|
string npcNAME = NPCpresence.Name;
|
||||||
|
UUID TargetID;
|
||||||
|
UUID.TryParse(target, out TargetID);
|
||||||
|
|
||||||
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
|
if (wComm != null)
|
||||||
|
wComm.DeliverMessageTo(TargetID, channel, npcPOS, npcNAME, npcId, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
public void osNpcShout(LSL_Key npc, int channel, string message)
|
public void osNpcShout(LSL_Key npc, int channel, string message)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.High, "osNpcShout");
|
CheckThreatLevel(ThreatLevel.High, "osNpcShout");
|
||||||
|
|
|
@ -358,6 +358,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osNpcSetProfileImage(LSL_Key npc, string image);
|
void osNpcSetProfileImage(LSL_Key npc, string image);
|
||||||
void osNpcSay(key npc, string message);
|
void osNpcSay(key npc, string message);
|
||||||
void osNpcSay(key npc, int channel, string message);
|
void osNpcSay(key npc, int channel, string message);
|
||||||
|
void osNpcSayTo(LSL_Key npc, string target, int channel, string msg);
|
||||||
void osNpcShout(key npc, int channel, string message);
|
void osNpcShout(key npc, int channel, string message);
|
||||||
void osNpcSit(key npc, key target, int options);
|
void osNpcSit(key npc, key target, int options);
|
||||||
void osNpcStand(LSL_Key npc);
|
void osNpcStand(LSL_Key npc);
|
||||||
|
|
|
@ -682,8 +682,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osNpcSay(npc, channel, message);
|
m_OSSL_Functions.osNpcSay(npc, channel, message);
|
||||||
}
|
}
|
||||||
|
public void osNpcSayTo(LSL_Key npc, string target, int channel, string msg)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osNpcSayTo(npc, target, channel, msg);
|
||||||
|
}
|
||||||
public void osNpcShout(key npc, int channel, string message)
|
public void osNpcShout(key npc, int channel, string message)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osNpcShout(npc, channel, message);
|
m_OSSL_Functions.osNpcShout(npc, channel, message);
|
||||||
|
|
|
@ -171,6 +171,7 @@
|
||||||
Allow_osNpcRemove = ${OSSL|osslNPC}
|
Allow_osNpcRemove = ${OSSL|osslNPC}
|
||||||
Allow_osNpcSaveAppearance = ${OSSL|osslNPC}
|
Allow_osNpcSaveAppearance = ${OSSL|osslNPC}
|
||||||
Allow_osNpcSay = ${OSSL|osslNPC}
|
Allow_osNpcSay = ${OSSL|osslNPC}
|
||||||
|
Allow_osNpcSayTo = ${OSSL|osslNPC}
|
||||||
Allow_osNpcSetRot = ${OSSL|osslNPC}
|
Allow_osNpcSetRot = ${OSSL|osslNPC}
|
||||||
Allow_osNpcShout = ${OSSL|osslNPC}
|
Allow_osNpcShout = ${OSSL|osslNPC}
|
||||||
Allow_osNpcSit = ${OSSL|osslNPC}
|
Allow_osNpcSit = ${OSSL|osslNPC}
|
||||||
|
|
Loading…
Reference in New Issue