aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-08-19 14:55:43 +0000
committerMW2007-08-19 14:55:43 +0000
commit3dffc3e3f647faa3e82126f5107ce13fbd610ffb (patch)
tree7ba2c5494218f34fdb42253615af625c32d9ccde /OpenSim
parentSqlite datastore should now save the textures and extraparams data (used by s... (diff)
downloadopensim-SC-3dffc3e3f647faa3e82126f5107ce13fbd610ffb.zip
opensim-SC-3dffc3e3f647faa3e82126f5107ce13fbd610ffb.tar.gz
opensim-SC-3dffc3e3f647faa3e82126f5107ce13fbd610ffb.tar.bz2
opensim-SC-3dffc3e3f647faa3e82126f5107ce13fbd610ffb.tar.xz
small clean up.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs3
-rw-r--r--OpenSim/Framework/General/NullClientAPI.cs2
-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
7 files changed, 44 insertions, 14 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 2cedea0..e78cfb7 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -44,6 +44,7 @@ namespace OpenSim.Framework.Interfaces
44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); 44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); 45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
46 public delegate void DisconnectUser(); 46 public delegate void DisconnectUser();
47 public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
47 48
48 public delegate void GenericCall(IClientAPI remoteClient); 49 public delegate void GenericCall(IClientAPI remoteClient);
49 public delegate void GenericCall2(); 50 public delegate void GenericCall2();
@@ -103,6 +104,7 @@ namespace OpenSim.Framework.Interfaces
103 event RequestMapBlocks OnRequestMapBlocks; 104 event RequestMapBlocks OnRequestMapBlocks;
104 event TeleportLocationRequest OnTeleportLocationRequest; 105 event TeleportLocationRequest OnTeleportLocationRequest;
105 event DisconnectUser OnDisconnectUser; 106 event DisconnectUser OnDisconnectUser;
107 event RequestAvatarProperties OnRequestAvatarProperties;
106 108
107 event GenericCall4 OnDeRezObject; 109 event GenericCall4 OnDeRezObject;
108 event GenericCall OnRegionHandShakeReply; 110 event GenericCall OnRegionHandShakeReply;
@@ -226,5 +228,6 @@ namespace OpenSim.Framework.Interfaces
226 bool AddMoney( int debit ); 228 bool AddMoney( int debit );
227 229
228 void SendViewerTime(int phase); 230 void SendViewerTime(int phase);
231 void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
229 } 232 }
230} 233}
diff --git a/OpenSim/Framework/General/NullClientAPI.cs b/OpenSim/Framework/General/NullClientAPI.cs
index e001549..ebb670d 100644
--- a/OpenSim/Framework/General/NullClientAPI.cs
+++ b/OpenSim/Framework/General/NullClientAPI.cs
@@ -22,6 +22,7 @@ namespace OpenSim.Framework
22 public event RequestMapBlocks OnRequestMapBlocks; 22 public event RequestMapBlocks OnRequestMapBlocks;
23 public event TeleportLocationRequest OnTeleportLocationRequest; 23 public event TeleportLocationRequest OnTeleportLocationRequest;
24 public event DisconnectUser OnDisconnectUser; 24 public event DisconnectUser OnDisconnectUser;
25 public event RequestAvatarProperties OnRequestAvatarProperties;
25 26
26 public event GenericCall4 OnDeRezObject; 27 public event GenericCall4 OnDeRezObject;
27 public event GenericCall OnRegionHandShakeReply; 28 public event GenericCall OnRegionHandShakeReply;
@@ -158,6 +159,7 @@ namespace OpenSim.Framework
158 } 159 }
159 160
160 public void SendViewerTime(int phase) { } 161 public void SendViewerTime(int phase) { }
162 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID) { }
161 } 163 }
162} 164}
163 165
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}