diff options
author | Talun | 2012-04-24 21:54:13 +0100 |
---|---|---|
committer | BlueWall | 2012-04-26 16:13:29 -0400 |
commit | b8114d2b67c8ae8d7551a2ece2177f8b7e958112 (patch) | |
tree | 0b453a72beae6e4a1f9ee86f00df3ec77d12d178 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Mantis 5977 Corrections to llRegionSayTo (diff) | |
download | opensim-SC_OLD-b8114d2b67c8ae8d7551a2ece2177f8b7e958112.zip opensim-SC_OLD-b8114d2b67c8ae8d7551a2ece2177f8b7e958112.tar.gz opensim-SC_OLD-b8114d2b67c8ae8d7551a2ece2177f8b7e958112.tar.bz2 opensim-SC_OLD-b8114d2b67c8ae8d7551a2ece2177f8b7e958112.tar.xz |
Add a version of osNpcSay that takes a channel number Mantis 5747
osNpcSay(UUID npc, string message) left untouched
New functions:-
osNpcSay(UUID npc, int channel, string message)
osNpcShout(UUID npc, int channel, string message)
osNpcWhisper(UUID npc, int channel, string message)
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index fe94b79..890115d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2531,6 +2531,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2531 | 2531 | ||
2532 | public void osNpcSay(LSL_Key npc, string message) | 2532 | public void osNpcSay(LSL_Key npc, string message) |
2533 | { | 2533 | { |
2534 | osNpcSay(npc, 0, message); | ||
2535 | } | ||
2536 | |||
2537 | public void osNpcSay(LSL_Key npc, int channel, string message) | ||
2538 | { | ||
2534 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); | 2539 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); |
2535 | m_host.AddScriptLPS(1); | 2540 | m_host.AddScriptLPS(1); |
2536 | 2541 | ||
@@ -2542,7 +2547,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2542 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2547 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2543 | return; | 2548 | return; |
2544 | 2549 | ||
2545 | module.Say(npcId, World, message); | 2550 | module.Say(npcId, World, message, channel); |
2551 | } | ||
2552 | } | ||
2553 | |||
2554 | public void osNpcShout(LSL_Key npc, int channel, string message) | ||
2555 | { | ||
2556 | CheckThreatLevel(ThreatLevel.High, "osNpcShout"); | ||
2557 | m_host.AddScriptLPS(1); | ||
2558 | |||
2559 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||
2560 | if (module != null) | ||
2561 | { | ||
2562 | UUID npcId = new UUID(npc.m_string); | ||
2563 | |||
2564 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||
2565 | return; | ||
2566 | |||
2567 | module.Shout(npcId, World, message, channel); | ||
2546 | } | 2568 | } |
2547 | } | 2569 | } |
2548 | 2570 | ||
@@ -2627,6 +2649,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2627 | } | 2649 | } |
2628 | } | 2650 | } |
2629 | 2651 | ||
2652 | public void osNpcWhisper(LSL_Key npc, int channel, string message) | ||
2653 | { | ||
2654 | CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); | ||
2655 | m_host.AddScriptLPS(1); | ||
2656 | |||
2657 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||
2658 | if (module != null) | ||
2659 | { | ||
2660 | UUID npcId = new UUID(npc.m_string); | ||
2661 | |||
2662 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||
2663 | return; | ||
2664 | |||
2665 | module.Whisper(npcId, World, message, channel); | ||
2666 | } | ||
2667 | } | ||
2668 | |||
2630 | /// <summary> | 2669 | /// <summary> |
2631 | /// Save the current appearance of the script owner permanently to the named notecard. | 2670 | /// Save the current appearance of the script owner permanently to the named notecard. |
2632 | /// </summary> | 2671 | /// </summary> |