diff options
author | Melanie | 2013-10-06 18:32:20 +0100 |
---|---|---|
committer | Melanie | 2013-10-06 18:32:20 +0100 |
commit | 69054ad134f4418b344227b2b0cb42aa77bb3d78 (patch) | |
tree | e46a68f215aeff4122aad078cbaacaa59f49c9c2 /OpenSim/Region/OptionalModules/World | |
parent | Merge branch 'master' into careminster (diff) | |
parent | * Added a unique and interesting WebSocket grid login processor by hijacking ... (diff) | |
download | opensim-SC-69054ad134f4418b344227b2b0cb42aa77bb3d78.zip opensim-SC-69054ad134f4418b344227b2b0cb42aa77bb3d78.tar.gz opensim-SC-69054ad134f4418b344227b2b0cb42aa77bb3d78.tar.bz2 opensim-SC-69054ad134f4418b344227b2b0cb42aa77bb3d78.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/VersionInfo.cs
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index f2355e2..c88ccc5 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -44,6 +44,20 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
44 | { | 44 | { |
45 | public bool SenseAsAgent { get; set; } | 45 | public bool SenseAsAgent { get; set; } |
46 | 46 | ||
47 | public delegate void ChatToNPC( | ||
48 | string message, byte type, Vector3 fromPos, string fromName, | ||
49 | UUID fromAgentID, UUID ownerID, byte source, byte audible); | ||
50 | |||
51 | /// <summary> | ||
52 | /// Fired when the NPC receives a chat message. | ||
53 | /// </summary> | ||
54 | public event ChatToNPC OnChatToNPC; | ||
55 | |||
56 | /// <summary> | ||
57 | /// Fired when the NPC receives an instant message. | ||
58 | /// </summary> | ||
59 | public event Action<GridInstantMessage> OnInstantMessageToNPC; | ||
60 | |||
47 | private readonly string m_firstname; | 61 | private readonly string m_firstname; |
48 | private readonly string m_lastname; | 62 | private readonly string m_lastname; |
49 | private readonly Vector3 m_startPos; | 63 | private readonly Vector3 m_startPos; |
@@ -624,17 +638,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
624 | string message, byte type, Vector3 fromPos, string fromName, | 638 | string message, byte type, Vector3 fromPos, string fromName, |
625 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | 639 | UUID fromAgentID, UUID ownerID, byte source, byte audible) |
626 | { | 640 | { |
627 | } | 641 | ChatToNPC ctn = OnChatToNPC; |
628 | 642 | ||
629 | public virtual void SendChatMessage( | 643 | if (ctn != null) |
630 | byte[] message, byte type, Vector3 fromPos, string fromName, | 644 | ctn(message, type, fromPos, fromName, fromAgentID, ownerID, source, audible); |
631 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | ||
632 | { | ||
633 | } | 645 | } |
634 | 646 | ||
635 | public void SendInstantMessage(GridInstantMessage im) | 647 | public void SendInstantMessage(GridInstantMessage im) |
636 | { | 648 | { |
637 | 649 | Action<GridInstantMessage> oimtn = OnInstantMessageToNPC; | |
650 | |||
651 | if (oimtn != null) | ||
652 | oimtn(im); | ||
638 | } | 653 | } |
639 | 654 | ||
640 | public void SendGenericMessage(string method, UUID invoice, List<string> message) | 655 | public void SendGenericMessage(string method, UUID invoice, List<string> message) |