aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs122
1 files changed, 60 insertions, 62 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 58d9e90..85992b2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -822,42 +822,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
822 /// 822 ///
823 /// </summary> 823 /// </summary>
824 /// <param name="regionInfo"></param> 824 /// <param name="regionInfo"></param>
825 public void SendRegionHandshake(RegionInfo regionInfo) 825 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
826 { 826 {
827 RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); 827 RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
828 828
829 bool estatemanager = false; 829 handshake.RegionInfo.BillableFactor = args.billableFactor;
830 LLUUID[] EstateManagers = regionInfo.EstateSettings.estateManagers; 830 handshake.RegionInfo.IsEstateManager = args.isEstateManager;
831 for (int i = 0; i < EstateManagers.Length; i++) 831 handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0;
832 { 832 handshake.RegionInfo.TerrainHeightRange01 = args.terrainHeightRange1;
833 if (EstateManagers[i] == AgentId) 833 handshake.RegionInfo.TerrainHeightRange10 = args.terrainHeightRange2;
834 estatemanager = true; 834 handshake.RegionInfo.TerrainHeightRange11 = args.terrainHeightRange3;
835 } 835 handshake.RegionInfo.TerrainStartHeight00 = args.terrainStartHeight0;
836 836 handshake.RegionInfo.TerrainStartHeight01 = args.terrainStartHeight1;
837 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; 837 handshake.RegionInfo.TerrainStartHeight10 = args.terrainStartHeight2;
838 handshake.RegionInfo.IsEstateManager = estatemanager; 838 handshake.RegionInfo.TerrainStartHeight11 = args.terrainStartHeight3;
839 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.EstateSettings.terrainHeightRange0; 839 handshake.RegionInfo.SimAccess = args.simAccess;
840 handshake.RegionInfo.TerrainHeightRange01 = regionInfo.EstateSettings.terrainHeightRange1; 840 handshake.RegionInfo.WaterHeight = args.waterHeight;
841 handshake.RegionInfo.TerrainHeightRange10 = regionInfo.EstateSettings.terrainHeightRange2; 841
842 handshake.RegionInfo.TerrainHeightRange11 = regionInfo.EstateSettings.terrainHeightRange3; 842 handshake.RegionInfo.RegionFlags = args.regionFlags;
843 handshake.RegionInfo.TerrainStartHeight00 = regionInfo.EstateSettings.terrainStartHeight0; 843 handshake.RegionInfo.SimName = Helpers.StringToField(args.regionName);
844 handshake.RegionInfo.TerrainStartHeight01 = regionInfo.EstateSettings.terrainStartHeight1; 844 handshake.RegionInfo.SimOwner = args.SimOwner;
845 handshake.RegionInfo.TerrainStartHeight10 = regionInfo.EstateSettings.terrainStartHeight2; 845 handshake.RegionInfo.TerrainBase0 = args.terrainBase0;
846 handshake.RegionInfo.TerrainStartHeight11 = regionInfo.EstateSettings.terrainStartHeight3; 846 handshake.RegionInfo.TerrainBase1 = args.terrainBase1;
847 handshake.RegionInfo.SimAccess = (byte)regionInfo.EstateSettings.simAccess; 847 handshake.RegionInfo.TerrainBase2 = args.terrainBase2;
848 handshake.RegionInfo.WaterHeight = regionInfo.EstateSettings.waterHeight; 848 handshake.RegionInfo.TerrainBase3 = args.terrainBase3;
849 849 handshake.RegionInfo.TerrainDetail0 = args.terrainDetail0;
850 handshake.RegionInfo.RegionFlags = (uint)regionInfo.EstateSettings.regionFlags; 850 handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1;
851 handshake.RegionInfo.SimName = Helpers.StringToField(regionInfo.RegionName); 851 handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2;
852 handshake.RegionInfo.SimOwner = regionInfo.MasterAvatarAssignedUUID; 852 handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3;
853 handshake.RegionInfo.TerrainBase0 = regionInfo.EstateSettings.terrainBase0;
854 handshake.RegionInfo.TerrainBase1 = regionInfo.EstateSettings.terrainBase1;
855 handshake.RegionInfo.TerrainBase2 = regionInfo.EstateSettings.terrainBase2;
856 handshake.RegionInfo.TerrainBase3 = regionInfo.EstateSettings.terrainBase3;
857 handshake.RegionInfo.TerrainDetail0 = regionInfo.EstateSettings.terrainDetail0;
858 handshake.RegionInfo.TerrainDetail1 = regionInfo.EstateSettings.terrainDetail1;
859 handshake.RegionInfo.TerrainDetail2 = regionInfo.EstateSettings.terrainDetail2;
860 handshake.RegionInfo.TerrainDetail3 = regionInfo.EstateSettings.terrainDetail3;
861 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? 853 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
862 854
863 OutPacket(handshake, ThrottleOutPacketType.Task); 855 OutPacket(handshake, ThrottleOutPacketType.Task);
@@ -2179,7 +2171,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2179 return false; 2171 return false;
2180 } 2172 }
2181 2173
2182 public void sendEstateManagersList(LLUUID invoice) 2174 public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID)
2183 { 2175 {
2184 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2176 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2185 packet.AgentData.TransactionID = LLUUID.Random(); 2177 packet.AgentData.TransactionID = LLUUID.Random();
@@ -2188,8 +2180,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2188 packet.MethodData.Invoice = invoice; 2180 packet.MethodData.Invoice = invoice;
2189 packet.MethodData.Method = Helpers.StringToField("setaccess"); 2181 packet.MethodData.Method = Helpers.StringToField("setaccess");
2190 2182
2191 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers;
2192
2193 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; 2183 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length];
2194 2184
2195 for (int i = 0; i < (6 + EstateManagers.Length); i++) 2185 for (int i = 0; i < (6 + EstateManagers.Length); i++)
@@ -2198,7 +2188,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2198 } 2188 }
2199 int j = 0; 2189 int j = 0;
2200 2190
2201 returnblock[j].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); j++; 2191 returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++;
2202 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; 2192 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++;
2203 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2193 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
2204 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2194 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
@@ -2213,29 +2203,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2213 this.OutPacket(packet, ThrottleOutPacketType.Task); 2203 this.OutPacket(packet, ThrottleOutPacketType.Task);
2214 } 2204 }
2215 2205
2216 public void sendRegionInfoToEstateMenu() 2206 public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
2217 { 2207 {
2218 RegionInfoPacket rinfopack = new RegionInfoPacket(); 2208 RegionInfoPacket rinfopack = new RegionInfoPacket();
2219 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); 2209 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
2220 rinfopack.AgentData.AgentID = this.AgentId; 2210 rinfopack.AgentData.AgentID = this.AgentId;
2221 rinfopack.AgentData.SessionID = this.SessionId; 2211 rinfopack.AgentData.SessionID = this.SessionId;
2222 rinfoblk.BillableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; 2212 rinfoblk.BillableFactor =args.billableFactor;
2223 rinfoblk.EstateID = m_scene.RegionInfo.EstateSettings.estateID; 2213 rinfoblk.EstateID = args.estateID;
2224 rinfoblk.MaxAgents = m_scene.RegionInfo.EstateSettings.maxAgents; 2214 rinfoblk.MaxAgents = args.maxAgents;
2225 rinfoblk.ObjectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor; 2215 rinfoblk.ObjectBonusFactor =args.objectBonusFactor;
2226 rinfoblk.ParentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID; 2216 rinfoblk.ParentEstateID = args.parentEstateID;
2227 rinfoblk.PricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter; 2217 rinfoblk.PricePerMeter = args.pricePerMeter;
2228 rinfoblk.RedirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX; 2218 rinfoblk.RedirectGridX = args.redirectGridX;
2229 rinfoblk.RedirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY; 2219 rinfoblk.RedirectGridY = args.redirectGridY;
2230 rinfoblk.RegionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags); 2220 rinfoblk.RegionFlags = args.regionFlags;
2231 rinfoblk.SimAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess; 2221 rinfoblk.SimAccess = args.simAccess;
2232 rinfoblk.SunHour = m_scene.RegionInfo.EstateSettings.sunHour; 2222 rinfoblk.SunHour = args.sunHour;
2233 rinfoblk.TerrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit; 2223 rinfoblk.TerrainLowerLimit = args.terrainLowerLimit;
2234 rinfoblk.TerrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit; 2224 rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit;
2235 rinfoblk.UseEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun; 2225 rinfoblk.UseEstateSun = args.useEstateSun;
2236 rinfoblk.WaterHeight = m_scene.RegionInfo.EstateSettings.waterHeight; 2226 rinfoblk.WaterHeight = args.waterHeight;
2237 rinfoblk.SimName = Helpers.StringToField(m_scene.RegionInfo.RegionName); 2227 rinfoblk.SimName = Helpers.StringToField(args.simName);
2238 2228
2229
2239 rinfopack.RegionInfo = rinfoblk; 2230 rinfopack.RegionInfo = rinfoblk;
2240 2231
2241 this.OutPacket(rinfopack, ThrottleOutPacketType.Task); 2232 this.OutPacket(rinfopack, ThrottleOutPacketType.Task);
@@ -2254,7 +2245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2254 this.OutPacket(einfopack, ThrottleOutPacketType.Task); 2245 this.OutPacket(einfopack, ThrottleOutPacketType.Task);
2255 } 2246 }
2256 2247
2257 public void sendDetailedEstateData(LLUUID invoice) 2248 public void sendDetailedEstateData(LLUUID invoice, string estateName, uint estateID)
2258 { 2249 {
2259 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2250 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2260 packet.MethodData.Invoice = invoice; 2251 packet.MethodData.Invoice = invoice;
@@ -2268,9 +2259,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2268 } 2259 }
2269 2260
2270 //Sending Estate Settings 2261 //Sending Estate Settings
2271 returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateName); 2262 returnblock[0].Parameter = Helpers.StringToField(estateName);
2272 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); 2263 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString());
2273 returnblock[2].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); 2264 returnblock[2].Parameter = Helpers.StringToField(estateID.ToString());
2274 2265
2275 // TODO: Resolve Magic numbers here 2266 // TODO: Resolve Magic numbers here
2276 returnblock[3].Parameter = Helpers.StringToField("269516800"); 2267 returnblock[3].Parameter = Helpers.StringToField("269516800");
@@ -2289,8 +2280,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2289 #endregion 2280 #endregion
2290 2281
2291 #region Land Data Sending Methods 2282 #region Land Data Sending Methods
2292 2283 public void sendLandParcelOverlay(byte[] data, int sequence_id)
2293 public void sendLandProperties(IClientAPI remote_client,int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity) 2284 {
2285
2286 ParcelOverlayPacket packet;
2287 packet = (ParcelOverlayPacket)PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
2288 packet.ParcelData.Data = data;
2289 packet.ParcelData.SequenceID = sequence_id;
2290 this.OutPacket(packet, ThrottleOutPacketType.Task);
2291 }
2292 public void sendLandProperties(IClientAPI remote_client,int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags)
2294 { 2293 {
2295 ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties); 2294 ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ParcelProperties);
2296 // TODO: don't create new blocks if recycling an old packet 2295 // TODO: don't create new blocks if recycling an old packet
@@ -2334,12 +2333,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2334 updatePacket.ParcelData.OwnerID = landData.ownerID; 2333 updatePacket.ParcelData.OwnerID = landData.ownerID;
2335 updatePacket.ParcelData.OwnerPrims = landData.ownerPrims; 2334 updatePacket.ParcelData.OwnerPrims = landData.ownerPrims;
2336 updatePacket.ParcelData.ParcelFlags = landData.landFlags; 2335 updatePacket.ParcelData.ParcelFlags = landData.landFlags;
2337 updatePacket.ParcelData.ParcelPrimBonus = m_scene.RegionInfo.EstateSettings.objectBonusFactor; 2336 updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor;
2338 updatePacket.ParcelData.PassHours = landData.passHours; 2337 updatePacket.ParcelData.PassHours = landData.passHours;
2339 updatePacket.ParcelData.PassPrice = landData.passPrice; 2338 updatePacket.ParcelData.PassPrice = landData.passPrice;
2340 updatePacket.ParcelData.PublicCount = 0; //unemplemented 2339 updatePacket.ParcelData.PublicCount = 0; //unemplemented
2341 2340
2342 uint regionFlags = (uint) m_scene.RegionInfo.EstateSettings.regionFlags;
2343 updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint) Simulator.RegionFlags.DenyAnonymous) > 2341 updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint) Simulator.RegionFlags.DenyAnonymous) >
2344 0); 2342 0);
2345 updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint) Simulator.RegionFlags.DenyIdentified) > 2343 updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint) Simulator.RegionFlags.DenyIdentified) >