aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs38
1 files changed, 30 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 4674489..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;
@@ -259,6 +273,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
259 public event Action<IClientAPI, bool> OnCompleteMovementToRegion; 273 public event Action<IClientAPI, bool> OnCompleteMovementToRegion;
260 public event UpdateAgent OnPreAgentUpdate; 274 public event UpdateAgent OnPreAgentUpdate;
261 public event UpdateAgent OnAgentUpdate; 275 public event UpdateAgent OnAgentUpdate;
276 public event UpdateAgent OnAgentCameraUpdate;
262 public event AgentRequestSit OnAgentRequestSit; 277 public event AgentRequestSit OnAgentRequestSit;
263 public event AgentSit OnAgentSit; 278 public event AgentSit OnAgentSit;
264 public event AvatarPickerRequest OnAvatarPickerRequest; 279 public event AvatarPickerRequest OnAvatarPickerRequest;
@@ -393,6 +408,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
393 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; 408 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
394 public event EstateChangeInfo OnEstateChangeInfo; 409 public event EstateChangeInfo OnEstateChangeInfo;
395 public event EstateManageTelehub OnEstateManageTelehub; 410 public event EstateManageTelehub OnEstateManageTelehub;
411 public event CachedTextureRequest OnCachedTextureRequest;
396 public event ScriptReset OnScriptReset; 412 public event ScriptReset OnScriptReset;
397 public event GetScriptRunning OnGetScriptRunning; 413 public event GetScriptRunning OnGetScriptRunning;
398 public event SetScriptRunning OnSetScriptRunning; 414 public event SetScriptRunning OnSetScriptRunning;
@@ -573,6 +589,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
573 { 589 {
574 } 590 }
575 591
592 public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures)
593 {
594
595 }
596
576 public virtual void Kick(string message) 597 public virtual void Kick(string message)
577 { 598 {
578 } 599 }
@@ -590,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
590 611
591 } 612 }
592 613
593 public virtual void SendKillObject(ulong regionHandle, List<uint> localID) 614 public virtual void SendKillObject(List<uint> localID)
594 { 615 {
595 } 616 }
596 617
@@ -617,17 +638,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC
617 string message, byte type, Vector3 fromPos, string fromName, 638 string message, byte type, Vector3 fromPos, string fromName,
618 UUID fromAgentID, UUID ownerID, byte source, byte audible) 639 UUID fromAgentID, UUID ownerID, byte source, byte audible)
619 { 640 {
620 } 641 ChatToNPC ctn = OnChatToNPC;
621 642
622 public virtual void SendChatMessage( 643 if (ctn != null)
623 byte[] message, byte type, Vector3 fromPos, string fromName, 644 ctn(message, type, fromPos, fromName, fromAgentID, ownerID, source, audible);
624 UUID fromAgentID, UUID ownerID, byte source, byte audible)
625 {
626 } 645 }
627 646
628 public void SendInstantMessage(GridInstantMessage im) 647 public void SendInstantMessage(GridInstantMessage im)
629 { 648 {
630 649 Action<GridInstantMessage> oimtn = OnInstantMessageToNPC;
650
651 if (oimtn != null)
652 oimtn(im);
631 } 653 }
632 654
633 public void SendGenericMessage(string method, UUID invoice, List<string> message) 655 public void SendGenericMessage(string method, UUID invoice, List<string> message)
@@ -1236,7 +1258,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1236 { 1258 {
1237 } 1259 }
1238 1260
1239 public void StopFlying(ISceneEntity presence) 1261 public void SendAgentTerseUpdate(ISceneEntity presence)
1240 { 1262 {
1241 } 1263 }
1242 1264