diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 4674489..fa1d38a 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; |
@@ -67,6 +81,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
67 | get { return m_scene; } | 81 | get { return m_scene; } |
68 | } | 82 | } |
69 | 83 | ||
84 | public int PingTimeMS { get { return 0; } } | ||
85 | |||
70 | public UUID OwnerID | 86 | public UUID OwnerID |
71 | { | 87 | { |
72 | get { return m_ownerID; } | 88 | get { return m_ownerID; } |
@@ -259,6 +275,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
259 | public event Action<IClientAPI, bool> OnCompleteMovementToRegion; | 275 | public event Action<IClientAPI, bool> OnCompleteMovementToRegion; |
260 | public event UpdateAgent OnPreAgentUpdate; | 276 | public event UpdateAgent OnPreAgentUpdate; |
261 | public event UpdateAgent OnAgentUpdate; | 277 | public event UpdateAgent OnAgentUpdate; |
278 | public event UpdateAgent OnAgentCameraUpdate; | ||
262 | public event AgentRequestSit OnAgentRequestSit; | 279 | public event AgentRequestSit OnAgentRequestSit; |
263 | public event AgentSit OnAgentSit; | 280 | public event AgentSit OnAgentSit; |
264 | public event AvatarPickerRequest OnAvatarPickerRequest; | 281 | public event AvatarPickerRequest OnAvatarPickerRequest; |
@@ -393,6 +410,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
393 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; | 410 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; |
394 | public event EstateChangeInfo OnEstateChangeInfo; | 411 | public event EstateChangeInfo OnEstateChangeInfo; |
395 | public event EstateManageTelehub OnEstateManageTelehub; | 412 | public event EstateManageTelehub OnEstateManageTelehub; |
413 | public event CachedTextureRequest OnCachedTextureRequest; | ||
396 | public event ScriptReset OnScriptReset; | 414 | public event ScriptReset OnScriptReset; |
397 | public event GetScriptRunning OnGetScriptRunning; | 415 | public event GetScriptRunning OnGetScriptRunning; |
398 | public event SetScriptRunning OnSetScriptRunning; | 416 | public event SetScriptRunning OnSetScriptRunning; |
@@ -573,6 +591,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
573 | { | 591 | { |
574 | } | 592 | } |
575 | 593 | ||
594 | public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures) | ||
595 | { | ||
596 | |||
597 | } | ||
598 | |||
576 | public virtual void Kick(string message) | 599 | public virtual void Kick(string message) |
577 | { | 600 | { |
578 | } | 601 | } |
@@ -590,7 +613,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
590 | 613 | ||
591 | } | 614 | } |
592 | 615 | ||
593 | public virtual void SendKillObject(ulong regionHandle, List<uint> localID) | 616 | public virtual void SendKillObject(List<uint> localID) |
594 | { | 617 | { |
595 | } | 618 | } |
596 | 619 | ||
@@ -617,17 +640,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
617 | string message, byte type, Vector3 fromPos, string fromName, | 640 | string message, byte type, Vector3 fromPos, string fromName, |
618 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | 641 | UUID fromAgentID, UUID ownerID, byte source, byte audible) |
619 | { | 642 | { |
620 | } | 643 | ChatToNPC ctn = OnChatToNPC; |
621 | 644 | ||
622 | public virtual void SendChatMessage( | 645 | if (ctn != null) |
623 | byte[] message, byte type, Vector3 fromPos, string fromName, | 646 | ctn(message, type, fromPos, fromName, fromAgentID, ownerID, source, audible); |
624 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | ||
625 | { | ||
626 | } | 647 | } |
627 | 648 | ||
628 | public void SendInstantMessage(GridInstantMessage im) | 649 | public void SendInstantMessage(GridInstantMessage im) |
629 | { | 650 | { |
630 | 651 | Action<GridInstantMessage> oimtn = OnInstantMessageToNPC; | |
652 | |||
653 | if (oimtn != null) | ||
654 | oimtn(im); | ||
631 | } | 655 | } |
632 | 656 | ||
633 | public void SendGenericMessage(string method, UUID invoice, List<string> message) | 657 | public void SendGenericMessage(string method, UUID invoice, List<string> message) |
@@ -1236,7 +1260,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1236 | { | 1260 | { |
1237 | } | 1261 | } |
1238 | 1262 | ||
1239 | public void StopFlying(ISceneEntity presence) | 1263 | public void SendAgentTerseUpdate(ISceneEntity presence) |
1240 | { | 1264 | { |
1241 | } | 1265 | } |
1242 | 1266 | ||
@@ -1248,5 +1272,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1248 | { | 1272 | { |
1249 | } | 1273 | } |
1250 | 1274 | ||
1275 | public void SendPartFullUpdate(ISceneEntity ent, uint? parentID) | ||
1276 | { | ||
1277 | } | ||
1278 | |||
1251 | } | 1279 | } |
1252 | } | 1280 | } |