aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authormingchen2008-05-06 18:29:58 +0000
committermingchen2008-05-06 18:29:58 +0000
commitd8e02d9e5c6776099f9b5a1904a678fa2cf34841 (patch)
tree5fe33c13787c89b72153f35d5c9b6b816fc823e5 /OpenSim
parentadded nhibernate examples (diff)
downloadopensim-SC-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.zip
opensim-SC-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.gz
opensim-SC-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.bz2
opensim-SC-d8e02d9e5c6776099f9b5a1904a678fa2cf34841.tar.xz
*LLClientView is now pushed the EstateSettings instead of pulling it from the scene...more to standards
*LandChannel no longer requires libsecondlife.Packets (it should have never needed it in the first place)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs57
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs122
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs72
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs13
6 files changed, 186 insertions, 89 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index c0ba636..0f45d9d 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -255,6 +255,52 @@ namespace OpenSim.Framework
255 public LLVector3 UserLocation; 255 public LLVector3 UserLocation;
256 public LLVector3 UserLookAt; 256 public LLVector3 UserLookAt;
257 } 257 }
258 public class RegionHandshakeArgs : EventArgs
259 {
260 public bool isEstateManager;
261 public float billableFactor;
262 public float terrainHeightRange0;
263 public float terrainHeightRange1;
264 public float terrainHeightRange2;
265 public float terrainHeightRange3;
266 public float terrainStartHeight0;
267 public float terrainStartHeight1;
268 public float terrainStartHeight2;
269 public float terrainStartHeight3;
270 public byte simAccess;
271 public float waterHeight;
272 public uint regionFlags;
273 public string regionName;
274 public LLUUID SimOwner;
275 public LLUUID terrainBase0;
276 public LLUUID terrainBase1;
277 public LLUUID terrainBase2;
278 public LLUUID terrainBase3;
279 public LLUUID terrainDetail0;
280 public LLUUID terrainDetail1;
281 public LLUUID terrainDetail2;
282 public LLUUID terrainDetail3;
283 }
284
285 public class RegionInfoForEstateMenuArgs : EventArgs
286 {
287 public float billableFactor;
288 public uint estateID;
289 public byte maxAgents;
290 public float objectBonusFactor;
291 public uint parentEstateID;
292 public int pricePerMeter;
293 public int redirectGridX;
294 public int redirectGridY;
295 public uint regionFlags;
296 public byte simAccess;
297 public float sunHour;
298 public float terrainLowerLimit;
299 public float terrainRaiseLimit;
300 public bool useEstateSun;
301 public float waterHeight;
302 public string simName;
303 }
258 public delegate void TextureRequest(Object sender, TextureRequestArgs e); 304 public delegate void TextureRequest(Object sender, TextureRequestArgs e);
259 305
260 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); 306 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
@@ -680,7 +726,7 @@ namespace OpenSim.Framework
680 void SendStartPingCheck(byte seq); 726 void SendStartPingCheck(byte seq);
681 void SendKillObject(ulong regionHandle, uint localID); 727 void SendKillObject(ulong regionHandle, uint localID);
682 void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId); 728 void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId);
683 void SendRegionHandshake(RegionInfo regionInfo); 729 void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
684 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible); 730 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible);
685 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible); 731 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible);
686 732
@@ -796,15 +842,16 @@ namespace OpenSim.Framework
796 void SendHealth(float health); 842 void SendHealth(float health);
797 843
798 844
799 void sendEstateManagersList(LLUUID invoice); 845 void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID);
800 void sendRegionInfoToEstateMenu(); 846 void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
801 void sendEstateCovenantInformation(); 847 void sendEstateCovenantInformation();
802 void sendDetailedEstateData(LLUUID invoice); 848 void sendDetailedEstateData(LLUUID invoice,string estateName, uint estateID);
803 849
804 void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity); 850 void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags);
805 void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID); 851 void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID);
806 void sendForceClientSelectObjects(List<uint> objectIDs); 852 void sendForceClientSelectObjects(List<uint> objectIDs);
807 void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount); 853 void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount);
854 void sendLandParcelOverlay(byte[] data, int sequence_id);
808 855
809 byte[] GetThrottlesPacked(float multiplier); 856 byte[] GetThrottlesPacked(float multiplier);
810 857
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) >
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index ebe0357..098175b 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -44,10 +44,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
44 44
45 #region Packet Data Responders 45 #region Packet Data Responders
46 46
47 private static void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) 47 private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice)
48 { 48 {
49 remote_client.sendDetailedEstateData(invoice); 49 remote_client.sendDetailedEstateData(invoice,m_scene.RegionInfo.EstateSettings.estateName,m_scene.RegionInfo.EstateSettings.estateID);
50 remote_client.sendEstateManagersList(invoice); 50 remote_client.sendEstateManagersList(invoice,m_scene.RegionInfo.EstateSettings.estateManagers,m_scene.RegionInfo.EstateSettings.estateID);
51 } 51 }
52 52
53 private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, 53 private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
208 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions) 208 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions)
209 { 209 {
210 m_scene.RegionInfo.EstateSettings.AddEstateManager(user); 210 m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
211 remote_client.sendEstateManagersList(invoice); 211 remote_client.sendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID);
212 } 212 }
213 else 213 else
214 { 214 {
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
222 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions) 222 if (remote_client.AgentId == m_scene.RegionInfo.MasterAvatarAssignedUUID || m_scene.Permissions.BypassPermissions)
223 { 223 {
224 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); 224 m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
225 remote_client.sendEstateManagersList(invoice); 225 remote_client.sendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.estateManagers, m_scene.RegionInfo.EstateSettings.estateID);
226 } 226 }
227 else 227 else
228 { 228 {
@@ -283,9 +283,28 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
283 } 283 }
284 } 284 }
285 285
286 private static void HandleRegionInfoRequest(IClientAPI remote_client) 286 private void HandleRegionInfoRequest(IClientAPI remote_client)
287 { 287 {
288 remote_client.sendRegionInfoToEstateMenu(); 288
289 RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
290 args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
291 args.estateID = m_scene.RegionInfo.EstateSettings.estateID;
292 args.maxAgents = m_scene.RegionInfo.EstateSettings.maxAgents;
293 args.objectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor;
294 args.parentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID;
295 args.pricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter;
296 args.redirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX;
297 args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
298 args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
299 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
300 args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour;
301 args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
302 args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
303 args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
304 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
305 args.simName = m_scene.RegionInfo.RegionName;
306
307 remote_client.sendRegionInfoToEstateMenu(args);
289 } 308 }
290 309
291 private static void HandleEstateCovenantRequest(IClientAPI remote_client) 310 private static void HandleEstateCovenantRequest(IClientAPI remote_client)
@@ -303,13 +322,48 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
303 322
304 for (int i = 0; i < avatars.Count; i++) 323 for (int i = 0; i < avatars.Count; i++)
305 { 324 {
306 avatars[i].ControllingClient.sendRegionInfoToEstateMenu(); 325 HandleRegionInfoRequest(avatars[i].ControllingClient); ;
307 } 326 }
308 } 327 }
309 328
310 public void sendRegionHandshake(IClientAPI remoteClient) 329 public void sendRegionHandshake(IClientAPI remoteClient)
311 { 330 {
312 remoteClient.SendRegionHandshake(m_scene.RegionInfo); 331 RegionHandshakeArgs args = new RegionHandshakeArgs();
332 bool estatemanager = false;
333 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers;
334 for (int i = 0; i < EstateManagers.Length; i++)
335 {
336 if (EstateManagers[i] == remoteClient.AgentId)
337 estatemanager = true;
338 }
339
340 args.isEstateManager = estatemanager;
341
342 args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor;
343 args.terrainHeightRange0 = m_scene.RegionInfo.EstateSettings.terrainHeightRange0;
344 args.terrainHeightRange1 = m_scene.RegionInfo.EstateSettings.terrainHeightRange1;
345 args.terrainHeightRange2 = m_scene.RegionInfo.EstateSettings.terrainHeightRange2;
346 args.terrainHeightRange3 = m_scene.RegionInfo.EstateSettings.terrainHeightRange3;
347 args.terrainStartHeight0 = m_scene.RegionInfo.EstateSettings.terrainStartHeight0;
348 args.terrainStartHeight1 = m_scene.RegionInfo.EstateSettings.terrainStartHeight1;
349 args.terrainStartHeight2 = m_scene.RegionInfo.EstateSettings.terrainStartHeight2;
350 args.terrainStartHeight3 = m_scene.RegionInfo.EstateSettings.terrainStartHeight3;
351 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
352 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
353
354 args.regionFlags = (uint)m_scene.RegionInfo.EstateSettings.regionFlags;
355 args.regionName = m_scene.RegionInfo.RegionName;
356 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
357 args.terrainBase0 = m_scene.RegionInfo.EstateSettings.terrainBase0;
358 args.terrainBase1 = m_scene.RegionInfo.EstateSettings.terrainBase1;
359 args.terrainBase2 = m_scene.RegionInfo.EstateSettings.terrainBase2;
360 args.terrainBase3 = m_scene.RegionInfo.EstateSettings.terrainBase3;
361 args.terrainDetail0 = m_scene.RegionInfo.EstateSettings.terrainDetail0;
362 args.terrainDetail1 = m_scene.RegionInfo.EstateSettings.terrainDetail1;
363 args.terrainDetail2 = m_scene.RegionInfo.EstateSettings.terrainDetail2;
364 args.terrainDetail3 = m_scene.RegionInfo.EstateSettings.terrainDetail3;
365
366 remoteClient.SendRegionHandshake(m_scene.RegionInfo,args);
313 } 367 }
314 368
315 public void sendRegionHandshakeToAll() 369 public void sendRegionHandshakeToAll()
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 02558a9..341412a 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math; 30using Axiom.Math;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Framework; 32using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
@@ -521,7 +520,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
521 byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 520 byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET];
522 int byteArrayCount = 0; 521 int byteArrayCount = 0;
523 int sequenceID = 0; 522 int sequenceID = 0;
524 ParcelOverlayPacket packet;
525 523
526 int y; 524 int y;
527 for (y = 0; y < 64; y++) 525 for (y = 0; y < 64; y++)
@@ -595,11 +593,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
595 byteArrayCount++; 593 byteArrayCount++;
596 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) 594 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
597 { 595 {
598 byteArrayCount = 0; 596 remote_client.sendLandParcelOverlay(byteArray, sequenceID);
599 packet = (ParcelOverlayPacket) PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); 597 byteArrayCount = 0;
600 packet.ParcelData.Data = byteArray;
601 packet.ParcelData.SequenceID = sequenceID;
602 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
603 sequenceID++; 598 sequenceID++;
604 byteArray = new byte[LAND_BLOCKS_PER_PACKET]; 599 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
605 } 600 }
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 88bc4e6..2d3359c 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
122 122
123 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 123 public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
124 { 124 {
125 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, m_scene.objectCapacity); 125 remote_client.sendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, m_scene.objectCapacity,(uint) m_scene.RegionInfo.EstateSettings.regionFlags);
126 } 126 }
127 127
128 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) 128 public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client)
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 4929675..25622d2 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -502,7 +502,7 @@ namespace OpenSim.Region.Examples.SimpleModule
502 { 502 {
503 } 503 }
504 504
505 public virtual void SendRegionHandshake(RegionInfo regionInfo) 505 public virtual void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
506 { 506 {
507 if (OnRegionHandShakeReply != null) 507 if (OnRegionHandShakeReply != null)
508 { 508 {
@@ -637,20 +637,20 @@ namespace OpenSim.Region.Examples.SimpleModule
637 { 637 {
638 } 638 }
639 639
640 public void sendEstateManagersList(LLUUID invoice) 640 public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID)
641 { 641 {
642 } 642 }
643 public void sendRegionInfoToEstateMenu() 643 public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
644 { 644 {
645 } 645 }
646 public void sendEstateCovenantInformation() 646 public void sendEstateCovenantInformation()
647 { 647 {
648 } 648 }
649 public void sendDetailedEstateData(LLUUID invoice) 649 public void sendDetailedEstateData(LLUUID invoice, string estateName, uint estateID)
650 { 650 {
651 } 651 }
652 652
653 public void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity) 653 public void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags)
654 { 654 {
655 } 655 }
656 public void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 656 public void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID)
@@ -662,5 +662,8 @@ namespace OpenSim.Region.Examples.SimpleModule
662 public void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) 662 public void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount)
663 { 663 {
664 } 664 }
665 public void sendLandParcelOverlay(byte[] data, int sequence_id)
666 {
667 }
665 } 668 }
666} 669}