aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs18
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs2
5 files changed, 39 insertions, 14 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index c67ecb5..beb83af 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -80,6 +80,7 @@ namespace OpenSim.Region.ClientStack
80 public event RequestMapBlocks OnRequestMapBlocks; 80 public event RequestMapBlocks OnRequestMapBlocks;
81 public event TeleportLocationRequest OnTeleportLocationRequest; 81 public event TeleportLocationRequest OnTeleportLocationRequest;
82 public event DisconnectUser OnDisconnectUser; 82 public event DisconnectUser OnDisconnectUser;
83 public event RequestAvatarProperties OnRequestAvatarProperties;
83 84
84 public event CreateNewInventoryItem OnCreateNewInventoryItem; 85 public event CreateNewInventoryItem OnCreateNewInventoryItem;
85 public event CreateInventoryFolder OnCreateNewInventoryFolder; 86 public event CreateInventoryFolder OnCreateNewInventoryFolder;
@@ -735,7 +736,6 @@ namespace OpenSim.Region.ClientStack
735 int sunPhase = (phase + 2) / 2; 736 int sunPhase = (phase + 2) / 2;
736 if ((sunPhase < 12) || (sunPhase > 36)) 737 if ((sunPhase < 12) || (sunPhase > 36))
737 { 738 {
738
739 viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f); 739 viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f);
740 //Console.WriteLine("sending night"); 740 //Console.WriteLine("sending night");
741 } 741 }
@@ -759,6 +759,22 @@ namespace OpenSim.Region.ClientStack
759 OutPacket(viewertime); 759 OutPacket(viewertime);
760 } 760 }
761 761
762 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID)
763 {
764 AvatarPropertiesReplyPacket avatarReply = new AvatarPropertiesReplyPacket();
765 avatarReply.AgentData.AgentID = this.AgentID;
766 avatarReply.AgentData.AvatarID = avatarID;
767 avatarReply.PropertiesData.AboutText = Helpers.StringToField(aboutText);
768 avatarReply.PropertiesData.BornOn = Helpers.StringToField(bornOn);
769 avatarReply.PropertiesData.CharterMember = Helpers.StringToField(charterMember);
770 avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(flAbout);
771 avatarReply.PropertiesData.Flags = 0;
772 avatarReply.PropertiesData.FLImageID = flImageID;
773 avatarReply.PropertiesData.ImageID = imageID;
774 avatarReply.PropertiesData.ProfileURL = Helpers.StringToField(profileURL);
775 avatarReply.PropertiesData.PartnerID = partnerID;
776 OutPacket(avatarReply);
777 }
762 #endregion 778 #endregion
763 779
764 #region Appearance/ Wearables Methods 780 #region Appearance/ Wearables Methods
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index e73b2e2..a6cb281 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -97,19 +97,10 @@ namespace OpenSim.Region.ClientStack
97 #region Scene/Avatar 97 #region Scene/Avatar
98 case PacketType.AvatarPropertiesRequest: 98 case PacketType.AvatarPropertiesRequest:
99 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 99 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
100 AvatarPropertiesReplyPacket avatarReply = new AvatarPropertiesReplyPacket(); 100 if (OnRequestAvatarProperties != null)
101 avatarReply.AgentData.AgentID = this.AgentID; 101 {
102 avatarReply.AgentData.AvatarID = avatarProperties.AgentData.AvatarID; 102 OnRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID);
103 avatarReply.PropertiesData.AboutText = Helpers.StringToField( "OpenSim crash test dummy"); 103 }
104 avatarReply.PropertiesData.BornOn = Helpers.StringToField("Before now");
105 avatarReply.PropertiesData.CharterMember = new byte[0];
106 avatarReply.PropertiesData.FLAboutText = Helpers.StringToField("First life? What is one of those? OpenSim is my life!");
107 avatarReply.PropertiesData.Flags = 0;
108 avatarReply.PropertiesData.FLImageID = LLUUID.Zero;
109 avatarReply.PropertiesData.ImageID = LLUUID.Zero;
110 avatarReply.PropertiesData.ProfileURL = new byte[0];
111 avatarReply.PropertiesData.PartnerID = new LLUUID("11111111-1111-0000-0000-000100bba000");
112 OutPacket(avatarReply);
113 break; 104 break;
114 case PacketType.ChatFromViewer: 105 case PacketType.ChatFromViewer:
115 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; 106 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 6b8ddc6..a35140d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -761,6 +761,20 @@ namespace OpenSim.Region.Environment.Scenes
761 /// 761 ///
762 /// </summary> 762 /// </summary>
763 /// <param name="remoteClient"></param> 763 /// <param name="remoteClient"></param>
764 /// <param name="avatarID"></param>
765 public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID)
766 {
767 string about = "OpenSim crash test dummy";
768 string bornOn = "Before now";
769 string flAbout = "First life? What is one of those? OpenSim is my life!";
770 LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000");
771 remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", partner);
772 }
773
774 /// <summary>
775 ///
776 /// </summary>
777 /// <param name="remoteClient"></param>
764 /// <param name="xferID"></param> 778 /// <param name="xferID"></param>
765 /// <param name="fileName"></param> 779 /// <param name="fileName"></param>
766 public void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName) 780 public void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 85479a7..7834230 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -711,6 +711,8 @@ namespace OpenSim.Region.Environment.Scenes
711 client.OnXferReceive += commsManager.TransactionsManager.HandleXfer; 711 client.OnXferReceive += commsManager.TransactionsManager.HandleXfer;
712 // client.OnRequestXfer += RequestXfer; 712 // client.OnRequestXfer += RequestXfer;
713 713
714 client.OnRequestAvatarProperties += RequestAvatarProperty;
715
714 client.OnGrabObject += ProcessObjectGrab; 716 client.OnGrabObject += ProcessObjectGrab;
715 } 717 }
716 718
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index ccb4d11..09b0065 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -35,6 +35,7 @@ namespace SimpleApp
35 public event RequestMapBlocks OnRequestMapBlocks; 35 public event RequestMapBlocks OnRequestMapBlocks;
36 public event TeleportLocationRequest OnTeleportLocationRequest; 36 public event TeleportLocationRequest OnTeleportLocationRequest;
37 public event DisconnectUser OnDisconnectUser; 37 public event DisconnectUser OnDisconnectUser;
38 public event RequestAvatarProperties OnRequestAvatarProperties;
38 39
39 public event GenericCall4 OnDeRezObject; 40 public event GenericCall4 OnDeRezObject;
40 public event GenericCall OnRegionHandShakeReply; 41 public event GenericCall OnRegionHandShakeReply;
@@ -216,5 +217,6 @@ namespace SimpleApp
216 } 217 }
217 218
218 public void SendViewerTime(int phase) { } 219 public void SendViewerTime(int phase) { }
220 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID) { }
219 } 221 }
220} 222}