From 090159defc731fca252b2b3520364712760f0f4e Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 23 Jul 2008 15:50:32 +0000 Subject: refactored LandData to use properties, and cleaned up the naming on the properties a bit to be more consistant with other objects (having things like .Name .Description, etc). --- .../Currency/SampleMoney/SampleMoneyModule.cs | 2 +- .../Voice/AsterixVoice/AsteriskVoiceModule.cs | 2 +- .../Avatar/Voice/SIPVoice/SIPVoiceModule.cs | 2 +- .../Environment/Modules/World/Land/LandChannel.cs | 4 +- .../Modules/World/Land/LandManagementModule.cs | 80 ++++++------- .../Environment/Modules/World/Land/LandObject.cs | 132 ++++++++++----------- .../Modules/World/Permissions/PermissionsModule.cs | 12 +- OpenSim/Region/Environment/Scenes/Scene.cs | 18 +-- 8 files changed, 126 insertions(+), 126 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index 57524a9..0d22ab9 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney else { ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); - if ((obj.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) + if ((obj.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) { avatar.Invulnerable = false; } diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs index 80936f6..1f41a92 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs @@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); LLSDParcelVoiceInfoResponse parcelVoiceInfo = - new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds); + new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds); string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs index 865894e..c6852f7 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs @@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice LandData land = m_scene.GetLandData(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); LLSDParcelVoiceInfoResponse parcelVoiceInfo = - new LLSDParcelVoiceInfoResponse(regionName, land.localID, creds); + new LLSDParcelVoiceInfoResponse(regionName, land.LocalID, creds); string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); m_log.DebugFormat("[VOICE][PARCELVOICE]: {0}", r); diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index b83de23..d519d4d 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs @@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land return m_landManagementModule.GetLandObject(x_float, y_float); } ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); - obj.landData.landName = "NO LAND"; + obj.landData.Name = "NO LAND"; return obj; } @@ -101,7 +101,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land return m_landManagementModule.GetLandObject(x, y); } ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); - obj.landData.landName = "NO LAND"; + obj.landData.Name = "NO LAND"; return obj; } diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index b2456a2..ca03035 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs @@ -162,8 +162,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); - fullSimParcel.landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; - fullSimParcel.landData.claimDate = Util.UnixTimeSinceEpoch(); + fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; + fullSimParcel.landData.ClaimDate = Util.UnixTimeSinceEpoch(); AddLandObject(fullSimParcel); } @@ -279,18 +279,18 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (!avatar.IsChildAgent) { over.sendLandUpdateToClient(avatar.ControllingClient); - m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID, + m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, m_scene.RegionInfo.RegionID); } } - if (avatar.currentParcelUUID != over.landData.globalID) + if (avatar.currentParcelUUID != over.landData.GlobalID) { if (!avatar.IsChildAgent) { over.sendLandUpdateToClient(avatar.ControllingClient); - avatar.currentParcelUUID = over.landData.globalID; - m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.localID, + avatar.currentParcelUUID = over.landData.GlobalID; + m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.landData.LocalID, m_scene.RegionInfo.RegionID); } } @@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) { - handleAvatarChangingParcel(clientAvatar, parcel.landData.localID, m_scene.RegionInfo.RegionID); + handleAvatarChangingParcel(clientAvatar, parcel.landData.LocalID, m_scene.RegionInfo.RegionID); //They are going below the safety line! if (!parcel.isBannedFromLand(clientAvatar.UUID)) { @@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (landList.ContainsKey(landLocalID)) { - if (agentID == landList[landLocalID].landData.ownerID) + if (agentID == landList[landLocalID].landData.OwnerID) { landList[landLocalID].updateAccessList(flags, entries, remote_client); } @@ -388,7 +388,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public ILandObject AddLandObject(ILandObject new_land) { lastLandLocalID++; - new_land.landData.localID = lastLandLocalID; + new_land.landData.LocalID = lastLandLocalID; landList.Add(lastLandLocalID, new_land.Copy()); @@ -430,7 +430,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - m_scene.EventManager.TriggerLandObjectRemoved(landList[local_id].landData.globalID); + m_scene.EventManager.TriggerLandObjectRemoved(landList[local_id].landData.GlobalID); landList.Remove(local_id); } @@ -445,13 +445,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (landBitmapSlave[x, y]) { - landIDList[x, y] = master.landData.localID; + landIDList[x, y] = master.landData.LocalID; } } } - removeLandObject(slave.landData.localID); - UpdateLandObject(master.landData.localID, master.landData); + removeLandObject(slave.landData.LocalID); + UpdateLandObject(master.landData.LocalID, master.landData); } public ILandObject GetLandObject(int parcelLocalID) @@ -550,15 +550,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land Dictionary> landOwnersAndParcels = new Dictionary>(); foreach (LandObject p in landList.Values) { - if (!landOwnersAndParcels.ContainsKey(p.landData.ownerID)) + if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) { List tempList = new List(); tempList.Add(p); - landOwnersAndParcels.Add(p.landData.ownerID, tempList); + landOwnersAndParcels.Add(p.landData.OwnerID, tempList); } else { - landOwnersAndParcels[p.landData.ownerID].Add(p); + landOwnersAndParcels[p.landData.OwnerID].Add(p); } } @@ -568,15 +568,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land int simPrims = 0; foreach (LandObject p in landOwnersAndParcels[owner]) { - simArea += p.landData.area; - simPrims += p.landData.ownerPrims + p.landData.otherPrims + p.landData.groupPrims + - p.landData.selectedPrims; + simArea += p.landData.Area; + simPrims += p.landData.OwnerPrims + p.landData.OtherPrims + p.landData.GroupPrims + + p.landData.SelectedPrims; } foreach (LandObject p in landOwnersAndParcels[owner]) { - p.landData.simwideArea = simArea; - p.landData.simwidePrims = simPrims; + p.landData.SimwideArea = simArea; + p.landData.SimwidePrims = simPrims; } } } @@ -658,13 +658,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) ILandObject newLand = startLandObject.Copy(); - newLand.landData.landName = "Subdivision of " + newLand.landData.landName; - newLand.landData.globalID = LLUUID.Random(); + newLand.landData.Name = "Subdivision of " + newLand.landData.Name; + newLand.landData.GlobalID = LLUUID.Random(); newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); //Now, lets set the subdivision area of the original to false - int startLandObjectIndex = startLandObject.landData.localID; + int startLandObjectIndex = startLandObject.landData.LocalID; landList[startLandObjectIndex].setLandBitmap( newLand.modifyLandBitmapSquare(startLandObject.getLandBitmap(), start_x, start_y, end_x, end_y, false)); landList[startLandObjectIndex].forceUpdateLandInfo(); @@ -673,7 +673,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land //Now add the new land object ILandObject result = AddLandObject(newLand); - UpdateLandObject(startLandObject.landData.localID, startLandObject.landData); + UpdateLandObject(startLandObject.landData.LocalID, startLandObject.landData); result.sendLandUpdateToAvatarsOverMe(); @@ -726,14 +726,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land } foreach (ILandObject p in selectedLandObjects) { - if (p.landData.ownerID != masterLandObject.landData.ownerID) + if (p.landData.OwnerID != masterLandObject.landData.OwnerID) { return; } } foreach (ILandObject slaveLandObject in selectedLandObjects) { - landList[masterLandObject.landData.localID].setLandBitmap( + landList[masterLandObject.landData.LocalID].setLandBitmap( slaveLandObject.mergeLandBitmaps(masterLandObject.getLandBitmap(), slaveLandObject.getLandBitmap())); performFinalLandJoin(masterLandObject, slaveLandObject); } @@ -775,19 +775,19 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (currentParcelBlock != null) { - if (currentParcelBlock.landData.ownerID == remote_client.AgentId) + if (currentParcelBlock.landData.OwnerID == remote_client.AgentId) { //Owner Flag tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); } - else if (currentParcelBlock.landData.salePrice > 0 && - (currentParcelBlock.landData.authBuyerID == LLUUID.Zero || - currentParcelBlock.landData.authBuyerID == remote_client.AgentId)) + else if (currentParcelBlock.landData.SalePrice > 0 && + (currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero || + currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) { //Sale Flag tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); } - else if (currentParcelBlock.landData.ownerID == LLUUID.Zero) + else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero) { //Public Flag tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); @@ -931,7 +931,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) { - landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; + landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; m_scene.Broadcast(SendParcelOverlay); landList[local_id].sendLandUpdateToClient(remote_client); } @@ -945,8 +945,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) { - landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; - landList[local_id].landData.claimDate = Util.UnixTimeSinceEpoch(); + landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; + landList[local_id].landData.ClaimDate = Util.UnixTimeSinceEpoch(); m_scene.Broadcast(SendParcelOverlay); landList[local_id].sendLandUpdateToClient(remote_client); } @@ -992,11 +992,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land } if (lob != null) { - LLUUID AuthorizedID = lob.landData.authBuyerID; - int saleprice = lob.landData.salePrice; - LLUUID pOwnerID = lob.landData.ownerID; + LLUUID AuthorizedID = lob.landData.AuthBuyerID; + int saleprice = lob.landData.SalePrice; + LLUUID pOwnerID = lob.landData.OwnerID; - bool landforsale = ((lob.landData.landFlags & + bool landforsale = ((lob.landData.Flags & (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) { @@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void IncomingLandObjectFromStorage(LandData data) { - ILandObject new_land = new LandObject(data.ownerID, data.isGroupOwned, m_scene); + ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); new_land.landData = data.Copy(); new_land.setLandBitmapFromByteArray(); AddLandObject(new_land); diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 02d74e5..8abfcf8 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -77,8 +77,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) { m_scene = scene; - landData.ownerID = owner_id; - landData.isGroupOwned = is_group_owned; + landData.OwnerID = owner_id; + landData.IsGroupOwned = is_group_owned; } #endregion @@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public ILandObject Copy() { - ILandObject newLand = new LandObject(landData.ownerID, landData.isGroupOwned, m_scene); + ILandObject newLand = new LandObject(landData.OwnerID, landData.IsGroupOwned, m_scene); //Place all new variables here! newLand.landBitmap = (bool[,]) (landBitmap.Clone()); @@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { //Normal Calculations return Convert.ToInt32( - Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * + Math.Round((Convert.ToDecimal(landData.Area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; } } @@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); if (estateModule != null) regionFlags = estateModule.GetRegionFlags(); - if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) + if ((landData.Flags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; - if (landData.ownerID == remote_client.AgentId) + if (landData.OwnerID == remote_client.AgentId) regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; remote_client.SendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, @@ -183,31 +183,31 @@ namespace OpenSim.Region.Environment.Modules.World.Land //Needs later group support LandData newData = landData.Copy(); - if (args.AuthBuyerID != newData.authBuyerID || args.SalePrice != newData.salePrice) + if (args.AuthBuyerID != newData.AuthBuyerID || args.SalePrice != newData.SalePrice) { if (m_scene.ExternalChecks.ExternalChecksCanSellParcel(remote_client.AgentId, this)) { - newData.authBuyerID = args.AuthBuyerID; - newData.salePrice = args.SalePrice; + newData.AuthBuyerID = args.AuthBuyerID; + newData.SalePrice = args.SalePrice; } } - newData.category = args.Category; - newData.landDesc = args.Desc; - newData.groupID = args.GroupID; - newData.landingType = args.LandingType; - newData.mediaAutoScale = args.MediaAutoScale; - newData.mediaID = args.MediaID; - newData.mediaURL = args.MediaURL; - newData.musicURL = args.MusicURL; - newData.landName = args.Name; - newData.landFlags = args.ParcelFlags; - newData.passHours = args.PassHours; - newData.passPrice = args.PassPrice; - newData.snapshotID = args.SnapshotID; - newData.userLocation = args.UserLocation; - newData.userLookAt = args.UserLookAt; - - m_scene.LandChannel.UpdateLandObject(landData.localID, newData); + newData.Category = args.Category; + newData.Description = args.Desc; + newData.GroupID = args.GroupID; + newData.LandingType = args.LandingType; + newData.MediaAutoScale = args.MediaAutoScale; + newData.MediaID = args.MediaID; + newData.MediaURL = args.MediaURL; + newData.MusicURL = args.MusicURL; + newData.Name = args.Name; + newData.Flags = args.ParcelFlags; + newData.PassHours = args.PassHours; + newData.PassPrice = args.PassPrice; + newData.SnapshotID = args.SnapshotID; + newData.UserLocation = args.UserLocation; + newData.UserLookAt = args.UserLookAt; + + m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); sendLandUpdateToAvatarsOverMe(); } @@ -216,16 +216,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) { LandData newData = landData.Copy(); - newData.ownerID = avatarID; - newData.groupID = groupID; - newData.isGroupOwned = groupOwned; + newData.OwnerID = avatarID; + newData.GroupID = groupID; + newData.IsGroupOwned = groupOwned; //newData.auctionID = AuctionID; - newData.claimDate = Util.UnixTimeSinceEpoch(); - newData.claimPrice = claimprice; - newData.salePrice = 0; - newData.authBuyerID = LLUUID.Zero; - newData.landFlags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); - m_scene.LandChannel.UpdateLandObject(landData.localID, newData); + newData.ClaimDate = Util.UnixTimeSinceEpoch(); + newData.ClaimPrice = claimprice; + newData.SalePrice = 0; + newData.AuthBuyerID = LLUUID.Zero; + newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); + m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); sendLandUpdateToAvatarsOverMe(); } @@ -245,13 +245,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land public bool isBannedFromLand(LLUUID avatar) { - if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseBanList) > 0) + if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = avatar; entry.Flags = ParcelManager.AccessList.Ban; entry.Time = new DateTime(); - if (landData.parcelAccessList.Contains(entry)) + if (landData.ParcelAccessList.Contains(entry)) { //They are banned, so lets send them a notice about this parcel return true; @@ -262,13 +262,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land public bool isRestrictedFromLand(LLUUID avatar) { - if ((landData.landFlags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) + if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = avatar; entry.Flags = ParcelManager.AccessList.Access; entry.Time = new DateTime(); - if (!landData.parcelAccessList.Contains(entry)) + if (!landData.ParcelAccessList.Contains(entry)) { //They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel return true; @@ -302,9 +302,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (over != null) { - if (over.landData.localID == landData.localID) + if (over.landData.LocalID == landData.LocalID) { - if (((over.landData.landFlags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) + if (((over.landData.Flags & (uint)Parcel.ParcelFlags.AllowDamage) != 0) && m_scene.RegionInfo.RegionSettings.AllowDamage) avatars[i].Invulnerable = false; else avatars[i].Invulnerable = true; @@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public List createAccessListArrayByFlag(ParcelManager.AccessList flag) { List list = new List(); - foreach (ParcelManager.ParcelAccessEntry entry in landData.parcelAccessList) + foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) { if (entry.Flags == flag) { @@ -344,13 +344,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) { List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); - remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.localID); + remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); } if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) { List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); - remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.localID); + remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); } } @@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } List toRemove = new List(); - foreach (ParcelManager.ParcelAccessEntry entry in newData.parcelAccessList) + foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) { if (entry.Flags == (ParcelManager.AccessList) flags) { @@ -374,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land foreach (ParcelManager.ParcelAccessEntry entry in toRemove) { - newData.parcelAccessList.Remove(entry); + newData.ParcelAccessList.Remove(entry); } foreach (ParcelManager.ParcelAccessEntry entry in entries) { @@ -383,13 +383,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land temp.Time = new DateTime(); //Pointless? Yes. temp.Flags = (ParcelManager.AccessList) flags; - if (!newData.parcelAccessList.Contains(temp)) + if (!newData.ParcelAccessList.Contains(temp)) { - newData.parcelAccessList.Add(temp); + newData.ParcelAccessList.Add(temp); } } - m_scene.LandChannel.UpdateLandObject(landData.localID, newData); + m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); } #endregion @@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void updateLandBitmapByteArray() { - landData.landBitmapByteArray = convertLandBitmapToBytes(); + landData.Bitmap = convertLandBitmapToBytes(); } /// @@ -459,7 +459,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land landData.AABBMax = new LLVector3((float) (max_x * 4), (float) (max_y * 4), (float) m_scene.Heightmap[tx, ty]); - landData.area = tempArea; + landData.Area = tempArea; } #endregion @@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land int x = 0, y = 0, i = 0, bitNum = 0; for (i = 0; i < 512; i++) { - tempByte = landData.landBitmapByteArray[i]; + tempByte = landData.Bitmap[i]; for (bitNum = 0; bitNum < 8; bitNum++) { bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte) 1); @@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (obj.LocalId > 0) { - if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID) + if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.OwnerID) { resultLocalIDs.Add(obj.LocalId); } @@ -798,10 +798,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void resetLandPrimCounts() { - landData.groupPrims = 0; - landData.ownerPrims = 0; - landData.otherPrims = 0; - landData.selectedPrims = 0; + landData.GroupPrims = 0; + landData.OwnerPrims = 0; + landData.OtherPrims = 0; + landData.SelectedPrims = 0; lock (primsOverMe) @@ -816,17 +816,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (obj.IsSelected) { - landData.selectedPrims += prim_count; + landData.SelectedPrims += prim_count; } else { - if (prim_owner == landData.ownerID) + if (prim_owner == landData.OwnerID) { - landData.ownerPrims += prim_count; + landData.OwnerPrims += prim_count; } else { - landData.otherPrims += prim_count; + landData.OtherPrims += prim_count; } } @@ -843,17 +843,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land LLUUID prim_owner = obj.OwnerID; int prim_count = obj.PrimCount; - if (prim_owner == landData.ownerID) + if (prim_owner == landData.OwnerID) { - landData.ownerPrims -= prim_count; + landData.OwnerPrims -= prim_count; } - else if (prim_owner == landData.groupID) + else if (prim_owner == landData.GroupID) { - landData.groupPrims -= prim_count; + landData.GroupPrims -= prim_count; } else { - landData.otherPrims -= prim_count; + landData.OtherPrims -= prim_count; } primsOverMe.Remove(obj); diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index b0d9a26..23db484 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions // Users should be able to edit what is over their land. ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); - if (parcel != null && parcel.landData.ownerID == user) + if (parcel != null && parcel.landData.OwnerID == user) return objectOwnerMask; // Admin objects should not be editable by the above @@ -423,7 +423,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions // Users should be able to edit what is over their land. ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); - if ((parcel != null) && (parcel.landData.ownerID == currentUser)) + if ((parcel != null) && (parcel.landData.OwnerID == currentUser)) { permission = true; } @@ -492,12 +492,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { bool permission = false; - if (parcel.landData.ownerID == user) + if (parcel.landData.OwnerID == user) { permission = true; } - if (parcel.landData.isGroupOwned) + if (parcel.landData.IsGroupOwned) { // TODO: Need to do some extra checks here. Requires group code. } @@ -723,7 +723,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) + if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) { return true; } @@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); if (land == null) return false; - if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) == + if ((land.landData.Flags & ((int)Parcel.ParcelFlags.CreateObjects)) == (int)Parcel.ParcelFlags.CreateObjects) permission = true; diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7ff5024..98149f5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2444,9 +2444,9 @@ namespace OpenSim.Region.Environment.Scenes ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); if (land != null) { - if (land.landData.landingType == (byte)1 && land.landData.userLocation != LLVector3.Zero) + if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != LLVector3.Zero) { - agent.startpos = land.landData.userLocation; + agent.startpos = land.landData.UserLocation; } } } @@ -3311,7 +3311,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - return land.landData.ownerID; + return land.landData.OwnerID; } } @@ -3329,7 +3329,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - land.landData.musicURL = url; + land.landData.MusicURL = url; return; } } @@ -3345,7 +3345,7 @@ namespace OpenSim.Region.Environment.Scenes else { - land.landData.mediaURL = url; + land.landData.MediaURL = url; return; } } @@ -3394,13 +3394,13 @@ namespace OpenSim.Region.Environment.Scenes { if (parcel != null) { - if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) + if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) { return true; } - else if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0) + else if ((parcel.landData.Flags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0) { - if (part.OwnerID == parcel.landData.ownerID || (parcel.landData.isGroupOwned && part.GroupID == parcel.landData.groupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID)) + if (part.OwnerID == parcel.landData.OwnerID || (parcel.landData.IsGroupOwned && part.GroupID == parcel.landData.GroupID) || ExternalChecks.ExternalChecksCanBeGodLike(part.OwnerID)) { return true; } @@ -3411,7 +3411,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - if (part.OwnerID == parcel.landData.ownerID) + if (part.OwnerID == parcel.landData.OwnerID) { return true; } -- cgit v1.1