diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 2cedea038c..e78cfb7d10 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -44,6 +44,7 @@ namespace OpenSim.Framework.Interfaces
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
public delegate void DisconnectUser();
+ public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
public delegate void GenericCall(IClientAPI remoteClient);
public delegate void GenericCall2();
@@ -103,6 +104,7 @@ namespace OpenSim.Framework.Interfaces
event RequestMapBlocks OnRequestMapBlocks;
event TeleportLocationRequest OnTeleportLocationRequest;
event DisconnectUser OnDisconnectUser;
+ event RequestAvatarProperties OnRequestAvatarProperties;
event GenericCall4 OnDeRezObject;
event GenericCall OnRegionHandShakeReply;
@@ -226,5 +228,6 @@ namespace OpenSim.Framework.Interfaces
bool AddMoney( int debit );
void SendViewerTime(int phase);
+ void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
}
}
diff --git a/OpenSim/Framework/General/NullClientAPI.cs b/OpenSim/Framework/General/NullClientAPI.cs
index e001549a1e..ebb670d5e0 100644
--- a/OpenSim/Framework/General/NullClientAPI.cs
+++ b/OpenSim/Framework/General/NullClientAPI.cs
@@ -22,6 +22,7 @@ namespace OpenSim.Framework
public event RequestMapBlocks OnRequestMapBlocks;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event DisconnectUser OnDisconnectUser;
+ public event RequestAvatarProperties OnRequestAvatarProperties;
public event GenericCall4 OnDeRezObject;
public event GenericCall OnRegionHandShakeReply;
@@ -158,6 +159,7 @@ namespace OpenSim.Framework
}
public void SendViewerTime(int phase) { }
+ public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID) { }
}
}
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index c67ecb5810..beb83af73a 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -80,6 +80,7 @@ namespace OpenSim.Region.ClientStack
public event RequestMapBlocks OnRequestMapBlocks;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event DisconnectUser OnDisconnectUser;
+ public event RequestAvatarProperties OnRequestAvatarProperties;
public event CreateNewInventoryItem OnCreateNewInventoryItem;
public event CreateInventoryFolder OnCreateNewInventoryFolder;
@@ -735,7 +736,6 @@ namespace OpenSim.Region.ClientStack
int sunPhase = (phase + 2) / 2;
if ((sunPhase < 12) || (sunPhase > 36))
{
-
viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f);
//Console.WriteLine("sending night");
}
@@ -759,6 +759,22 @@ namespace OpenSim.Region.ClientStack
OutPacket(viewertime);
}
+ public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID)
+ {
+ AvatarPropertiesReplyPacket avatarReply = new AvatarPropertiesReplyPacket();
+ avatarReply.AgentData.AgentID = this.AgentID;
+ avatarReply.AgentData.AvatarID = avatarID;
+ avatarReply.PropertiesData.AboutText = Helpers.StringToField(aboutText);
+ avatarReply.PropertiesData.BornOn = Helpers.StringToField(bornOn);
+ avatarReply.PropertiesData.CharterMember = Helpers.StringToField(charterMember);
+ avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(flAbout);
+ avatarReply.PropertiesData.Flags = 0;
+ avatarReply.PropertiesData.FLImageID = flImageID;
+ avatarReply.PropertiesData.ImageID = imageID;
+ avatarReply.PropertiesData.ProfileURL = Helpers.StringToField(profileURL);
+ avatarReply.PropertiesData.PartnerID = partnerID;
+ OutPacket(avatarReply);
+ }
#endregion
#region Appearance/ Wearables Methods
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index e73b2e2b2a..a6cb28185b 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -97,19 +97,10 @@ namespace OpenSim.Region.ClientStack
#region Scene/Avatar
case PacketType.AvatarPropertiesRequest:
AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
- AvatarPropertiesReplyPacket avatarReply = new AvatarPropertiesReplyPacket();
- avatarReply.AgentData.AgentID = this.AgentID;
- avatarReply.AgentData.AvatarID = avatarProperties.AgentData.AvatarID;
- avatarReply.PropertiesData.AboutText = Helpers.StringToField( "OpenSim crash test dummy");
- avatarReply.PropertiesData.BornOn = Helpers.StringToField("Before now");
- avatarReply.PropertiesData.CharterMember = new byte[0];
- avatarReply.PropertiesData.FLAboutText = Helpers.StringToField("First life? What is one of those? OpenSim is my life!");
- avatarReply.PropertiesData.Flags = 0;
- avatarReply.PropertiesData.FLImageID = LLUUID.Zero;
- avatarReply.PropertiesData.ImageID = LLUUID.Zero;
- avatarReply.PropertiesData.ProfileURL = new byte[0];
- avatarReply.PropertiesData.PartnerID = new LLUUID("11111111-1111-0000-0000-000100bba000");
- OutPacket(avatarReply);
+ if (OnRequestAvatarProperties != null)
+ {
+ OnRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID);
+ }
break;
case PacketType.ChatFromViewer:
ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 6b8ddc6363..a35140d002 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -757,6 +757,20 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID)
+ {
+ string about = "OpenSim crash test dummy";
+ string bornOn = "Before now";
+ string flAbout = "First life? What is one of those? OpenSim is my life!";
+ LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000");
+ remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", partner);
+ }
+
///
///
///
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 85479a7684..7834230b94 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -711,6 +711,8 @@ namespace OpenSim.Region.Environment.Scenes
client.OnXferReceive += commsManager.TransactionsManager.HandleXfer;
// client.OnRequestXfer += RequestXfer;
+ client.OnRequestAvatarProperties += RequestAvatarProperty;
+
client.OnGrabObject += ProcessObjectGrab;
}
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index ccb4d11094..09b00651fc 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -35,6 +35,7 @@ namespace SimpleApp
public event RequestMapBlocks OnRequestMapBlocks;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event DisconnectUser OnDisconnectUser;
+ public event RequestAvatarProperties OnRequestAvatarProperties;
public event GenericCall4 OnDeRezObject;
public event GenericCall OnRegionHandShakeReply;
@@ -216,5 +217,6 @@ namespace SimpleApp
}
public void SendViewerTime(int phase) { }
+ public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID) { }
}
}