diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 5ea2bcd..fb644b7 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -44,10 +44,24 @@ 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; |
50 | private readonly UUID m_uuid = UUID.Random(); | 64 | private readonly UUID m_uuid; |
51 | private readonly Scene m_scene; | 65 | private readonly Scene m_scene; |
52 | private readonly UUID m_ownerID; | 66 | private readonly UUID m_ownerID; |
53 | 67 | ||
@@ -57,6 +71,19 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
57 | m_firstname = firstname; | 71 | m_firstname = firstname; |
58 | m_lastname = lastname; | 72 | m_lastname = lastname; |
59 | m_startPos = position; | 73 | m_startPos = position; |
74 | m_uuid = UUID.Random(); | ||
75 | m_scene = scene; | ||
76 | m_ownerID = ownerID; | ||
77 | SenseAsAgent = senseAsAgent; | ||
78 | } | ||
79 | |||
80 | public NPCAvatar( | ||
81 | string firstname, string lastname, UUID agentID, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) | ||
82 | { | ||
83 | m_firstname = firstname; | ||
84 | m_lastname = lastname; | ||
85 | m_startPos = position; | ||
86 | m_uuid = agentID; | ||
60 | m_scene = scene; | 87 | m_scene = scene; |
61 | m_ownerID = ownerID; | 88 | m_ownerID = ownerID; |
62 | SenseAsAgent = senseAsAgent; | 89 | SenseAsAgent = senseAsAgent; |
@@ -258,6 +285,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
258 | public event Action<IClientAPI, bool> OnCompleteMovementToRegion; | 285 | public event Action<IClientAPI, bool> OnCompleteMovementToRegion; |
259 | public event UpdateAgent OnPreAgentUpdate; | 286 | public event UpdateAgent OnPreAgentUpdate; |
260 | public event UpdateAgent OnAgentUpdate; | 287 | public event UpdateAgent OnAgentUpdate; |
288 | public event UpdateAgent OnAgentCameraUpdate; | ||
261 | public event AgentRequestSit OnAgentRequestSit; | 289 | public event AgentRequestSit OnAgentRequestSit; |
262 | public event AgentSit OnAgentSit; | 290 | public event AgentSit OnAgentSit; |
263 | public event AvatarPickerRequest OnAvatarPickerRequest; | 291 | public event AvatarPickerRequest OnAvatarPickerRequest; |
@@ -391,6 +419,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
391 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; | 419 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; |
392 | public event EstateChangeInfo OnEstateChangeInfo; | 420 | public event EstateChangeInfo OnEstateChangeInfo; |
393 | public event EstateManageTelehub OnEstateManageTelehub; | 421 | public event EstateManageTelehub OnEstateManageTelehub; |
422 | public event CachedTextureRequest OnCachedTextureRequest; | ||
394 | public event ScriptReset OnScriptReset; | 423 | public event ScriptReset OnScriptReset; |
395 | public event GetScriptRunning OnGetScriptRunning; | 424 | public event GetScriptRunning OnGetScriptRunning; |
396 | public event SetScriptRunning OnSetScriptRunning; | 425 | public event SetScriptRunning OnSetScriptRunning; |
@@ -569,6 +598,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
569 | { | 598 | { |
570 | } | 599 | } |
571 | 600 | ||
601 | public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures) | ||
602 | { | ||
603 | |||
604 | } | ||
605 | |||
572 | public virtual void Kick(string message) | 606 | public virtual void Kick(string message) |
573 | { | 607 | { |
574 | } | 608 | } |
@@ -586,7 +620,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
586 | 620 | ||
587 | } | 621 | } |
588 | 622 | ||
589 | public virtual void SendKillObject(ulong regionHandle, List<uint> localID) | 623 | public virtual void SendKillObject(List<uint> localID) |
590 | { | 624 | { |
591 | } | 625 | } |
592 | 626 | ||
@@ -607,25 +641,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
607 | string message, byte type, Vector3 fromPos, string fromName, | 641 | string message, byte type, Vector3 fromPos, string fromName, |
608 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | 642 | UUID fromAgentID, UUID ownerID, byte source, byte audible) |
609 | { | 643 | { |
610 | } | 644 | ChatToNPC ctn = OnChatToNPC; |
611 | 645 | ||
612 | public virtual void SendChatMessage( | 646 | if (ctn != null) |
613 | byte[] message, byte type, Vector3 fromPos, string fromName, | 647 | ctn(message, type, fromPos, fromName, fromAgentID, ownerID, source, audible); |
614 | UUID fromAgentID, UUID ownerID, byte source, byte audible) | ||
615 | { | ||
616 | } | 648 | } |
617 | 649 | ||
618 | public void SendInstantMessage(GridInstantMessage im) | 650 | public void SendInstantMessage(GridInstantMessage im) |
619 | { | 651 | { |
620 | 652 | Action<GridInstantMessage> oimtn = OnInstantMessageToNPC; | |
653 | |||
654 | if (oimtn != null) | ||
655 | oimtn(im); | ||
621 | } | 656 | } |
622 | 657 | ||
623 | public void SendGenericMessage(string method, List<string> message) | 658 | public void SendGenericMessage(string method, UUID invoice, List<string> message) |
624 | { | 659 | { |
625 | 660 | ||
626 | } | 661 | } |
627 | 662 | ||
628 | public void SendGenericMessage(string method, List<byte[]> message) | 663 | public void SendGenericMessage(string method, UUID invoice, List<byte[]> message) |
629 | { | 664 | { |
630 | 665 | ||
631 | } | 666 | } |
@@ -688,7 +723,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
688 | { | 723 | { |
689 | } | 724 | } |
690 | 725 | ||
691 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 726 | public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) |
692 | { | 727 | { |
693 | } | 728 | } |
694 | 729 | ||
@@ -860,11 +895,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
860 | { | 895 | { |
861 | } | 896 | } |
862 | 897 | ||
863 | public bool AddMoney(int debit) | ||
864 | { | ||
865 | return false; | ||
866 | } | ||
867 | |||
868 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) | 898 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) |
869 | { | 899 | { |
870 | } | 900 | } |
@@ -1227,12 +1257,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1227 | { | 1257 | { |
1228 | } | 1258 | } |
1229 | 1259 | ||
1230 | public void StopFlying(ISceneEntity presence) | 1260 | public void SendAgentTerseUpdate(ISceneEntity presence) |
1231 | { | 1261 | { |
1232 | } | 1262 | } |
1233 | 1263 | ||
1234 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | 1264 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) |
1235 | { | 1265 | { |
1236 | } | 1266 | } |
1267 | |||
1268 | public void SendPartPhysicsProprieties(ISceneEntity entity) | ||
1269 | { | ||
1270 | } | ||
1271 | |||
1237 | } | 1272 | } |
1238 | } | 1273 | } |