let NPCs have profile
parent
44588ce45e
commit
240ab951b5
|
@ -320,13 +320,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
UUID targetID;
|
UUID targetID;
|
||||||
UUID.TryParse(args[0], out targetID);
|
UUID.TryParse(args[0], out targetID);
|
||||||
|
|
||||||
// Can't handle NPC yet...
|
|
||||||
ScenePresence p = FindPresence(targetID);
|
|
||||||
|
|
||||||
if (null != p)
|
ScenePresence p = FindPresence(targetID);
|
||||||
|
if (p != null && p.isNPC)
|
||||||
{
|
{
|
||||||
if (p.PresenceType == PresenceType.Npc)
|
remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), new Dictionary<UUID, string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string serverURI = string.Empty;
|
string serverURI = string.Empty;
|
||||||
|
@ -575,10 +574,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
// Can't handle NPC yet...
|
// Can't handle NPC yet...
|
||||||
ScenePresence p = FindPresence(targetId);
|
ScenePresence p = FindPresence(targetId);
|
||||||
|
|
||||||
if (null != p)
|
if (p != null && p.isNPC)
|
||||||
{
|
{
|
||||||
if (p.PresenceType == PresenceType.Npc)
|
remoteClient.SendAvatarPicksReply(new UUID(args[0]), new Dictionary<UUID, string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string serverURI = string.Empty;
|
string serverURI = string.Empty;
|
||||||
|
@ -860,6 +859,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
/// </param>
|
/// </param>
|
||||||
public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes)
|
public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes)
|
||||||
{
|
{
|
||||||
|
ScenePresence p = FindPresence(queryTargetID);
|
||||||
|
if (p != null && p.isNPC)
|
||||||
|
{
|
||||||
|
remoteClient.SendAgentAlertMessage(
|
||||||
|
"Notes for NPCs not avaiable", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UserProfileNotes note = new UserProfileNotes();
|
UserProfileNotes note = new UserProfileNotes();
|
||||||
|
|
||||||
note.UserId = remoteClient.AgentId;
|
note.UserId = remoteClient.AgentId;
|
||||||
|
@ -1000,10 +1007,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
// Can't handle NPC yet...
|
// Can't handle NPC yet...
|
||||||
ScenePresence p = FindPresence(avatarID);
|
ScenePresence p = FindPresence(avatarID);
|
||||||
|
|
||||||
if (null != p)
|
if (p != null && p.isNPC)
|
||||||
{
|
{
|
||||||
if (p.PresenceType == PresenceType.Npc)
|
remoteClient.SendAvatarProperties(avatarID, "im a happy NPC", "5/25/1977" ,
|
||||||
return;
|
Utils.StringToBytes("NPC"), "NPCs have no life", 0,
|
||||||
|
UUID.Zero, UUID.Zero, "", UUID.Zero);
|
||||||
|
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
|
||||||
|
0, "Getting into trouble", "Droidspeak");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string serverURI = string.Empty;
|
string serverURI = string.Empty;
|
||||||
|
|
Loading…
Reference in New Issue