diff options
author | UbitUmarov | 2016-12-06 16:15:57 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-06 16:15:57 +0000 |
commit | 240ab951b52aa87434cc02736a4ef84d95470082 (patch) | |
tree | 616126d72a2e50a7758e4b638537d4f964744270 | |
parent | jenkins likes null httplisteners (diff) | |
download | opensim-SC-240ab951b52aa87434cc02736a4ef84d95470082.zip opensim-SC-240ab951b52aa87434cc02736a4ef84d95470082.tar.gz opensim-SC-240ab951b52aa87434cc02736a4ef84d95470082.tar.bz2 opensim-SC-240ab951b52aa87434cc02736a4ef84d95470082.tar.xz |
let NPCs have profile
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 61835f9..47914cc 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -320,13 +320,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
320 | UUID targetID; | 320 | UUID targetID; |
321 | UUID.TryParse(args[0], out targetID); | 321 | UUID.TryParse(args[0], out targetID); |
322 | 322 | ||
323 | // Can't handle NPC yet... | ||
324 | ScenePresence p = FindPresence(targetID); | ||
325 | 323 | ||
326 | if (null != p) | 324 | ScenePresence p = FindPresence(targetID); |
325 | if (p != null && p.isNPC) | ||
327 | { | 326 | { |
328 | if (p.PresenceType == PresenceType.Npc) | 327 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), new Dictionary<UUID, string>()); |
329 | return; | 328 | return; |
330 | } | 329 | } |
331 | 330 | ||
332 | string serverURI = string.Empty; | 331 | string serverURI = string.Empty; |
@@ -575,10 +574,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
575 | // Can't handle NPC yet... | 574 | // Can't handle NPC yet... |
576 | ScenePresence p = FindPresence(targetId); | 575 | ScenePresence p = FindPresence(targetId); |
577 | 576 | ||
578 | if (null != p) | 577 | if (p != null && p.isNPC) |
579 | { | 578 | { |
580 | if (p.PresenceType == PresenceType.Npc) | 579 | remoteClient.SendAvatarPicksReply(new UUID(args[0]), new Dictionary<UUID, string>()); |
581 | return; | 580 | return; |
582 | } | 581 | } |
583 | 582 | ||
584 | string serverURI = string.Empty; | 583 | string serverURI = string.Empty; |
@@ -860,6 +859,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
860 | /// </param> | 859 | /// </param> |
861 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) | 860 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) |
862 | { | 861 | { |
862 | ScenePresence p = FindPresence(queryTargetID); | ||
863 | if (p != null && p.isNPC) | ||
864 | { | ||
865 | remoteClient.SendAgentAlertMessage( | ||
866 | "Notes for NPCs not avaiable", false); | ||
867 | return; | ||
868 | } | ||
869 | |||
863 | UserProfileNotes note = new UserProfileNotes(); | 870 | UserProfileNotes note = new UserProfileNotes(); |
864 | 871 | ||
865 | note.UserId = remoteClient.AgentId; | 872 | note.UserId = remoteClient.AgentId; |
@@ -1000,10 +1007,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1000 | // Can't handle NPC yet... | 1007 | // Can't handle NPC yet... |
1001 | ScenePresence p = FindPresence(avatarID); | 1008 | ScenePresence p = FindPresence(avatarID); |
1002 | 1009 | ||
1003 | if (null != p) | 1010 | if (p != null && p.isNPC) |
1004 | { | 1011 | { |
1005 | if (p.PresenceType == PresenceType.Npc) | 1012 | remoteClient.SendAvatarProperties(avatarID, "im a happy NPC", "5/25/1977" , |
1006 | return; | 1013 | Utils.StringToBytes("NPC"), "NPCs have no life", 0, |
1014 | UUID.Zero, UUID.Zero, "", UUID.Zero); | ||
1015 | remoteClient.SendAvatarInterestsReply(avatarID, 0, "", | ||
1016 | 0, "Getting into trouble", "Droidspeak"); | ||
1017 | return; | ||
1007 | } | 1018 | } |
1008 | 1019 | ||
1009 | string serverURI = string.Empty; | 1020 | string serverURI = string.Empty; |