Start using IPrimCounts populated by PrimCountModule instead of LandData counts populated by LandManagementModule.

In order to pass ILandObject into IClientAPI.SendLandProperties(), had to push ILandObject and IPrimCounts into OpenSim.Framework from OpenSim.Region.Framework.Interfaces, in order to avoid ci
Counts are showing odd behaviour at the moment, this will be addressed shortly.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-03-25 23:05:51 +00:00
parent 7f5019b0f2
commit 6ae04448f7
16 changed files with 89 additions and 154 deletions

View File

@@ -4272,8 +4272,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
public void SendLandProperties(
int sequence_id, bool snap_selection, int request_result, ILandObject lo,
float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
{
LandData landData = lo.LandData;
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
updateMessage.AABBMax = landData.AABBMax;
@@ -4281,15 +4285,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.Area = landData.Area;
updateMessage.AuctionID = landData.AuctionID;
updateMessage.AuthBuyerID = landData.AuthBuyerID;
updateMessage.Bitmap = landData.Bitmap;
updateMessage.Desc = landData.Description;
updateMessage.Category = landData.Category;
updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
updateMessage.ClaimPrice = landData.ClaimPrice;
updateMessage.GroupID = landData.GroupID;
updateMessage.GroupPrims = landData.GroupPrims;
updateMessage.GroupID = landData.GroupID;
updateMessage.IsGroupOwned = landData.IsGroupOwned;
updateMessage.LandingType = (LandingType) landData.LandingType;
updateMessage.LocalID = landData.LocalID;
@@ -4310,9 +4311,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.Name = landData.Name;
updateMessage.OtherCleanTime = landData.OtherCleanTime;
updateMessage.OtherCount = 0; //TODO: Unimplemented
updateMessage.OtherPrims = landData.OtherPrims;
updateMessage.OwnerID = landData.OwnerID;
updateMessage.OwnerPrims = landData.OwnerPrims;
updateMessage.OwnerID = landData.OwnerID;
updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
updateMessage.ParcelPrimBonus = simObjectBonusFactor;
updateMessage.PassHours = landData.PassHours;
@@ -4327,10 +4326,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.RentPrice = 0;
updateMessage.RequestResult = (ParcelResult) request_result;
updateMessage.SalePrice = landData.SalePrice;
updateMessage.SelectedPrims = landData.SelectedPrims;
updateMessage.SalePrice = landData.SalePrice;
updateMessage.SelfCount = 0; //TODO: Unimplemented
updateMessage.SequenceID = sequence_id;
if (landData.SimwideArea > 0)
{
int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus);
@@ -4340,12 +4339,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
updateMessage.SimWideMaxPrims = 0;
}
updateMessage.SimWideTotalPrims = landData.SimwidePrims;
updateMessage.SnapSelection = snap_selection;
updateMessage.SnapshotID = landData.SnapshotID;
updateMessage.Status = (ParcelStatus) landData.Status;
updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims +
landData.SelectedPrims;
updateMessage.UserLocation = landData.UserLocation;
updateMessage.UserLookAt = landData.UserLookAt;
@@ -4356,6 +4353,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updateMessage.MediaLoop = landData.MediaLoop;
updateMessage.ObscureMusic = landData.ObscureMusic;
updateMessage.ObscureMedia = landData.ObscureMedia;
IPrimCounts pc = lo.PrimCounts;
updateMessage.OwnerPrims = pc.Owner;
updateMessage.GroupPrims = pc.Group;
updateMessage.OtherPrims = pc.Others;
updateMessage.SimWideTotalPrims = pc.Simulator;
// FIXME: Need to do selected prims once this is reimplemented.
updateMessage.TotalPrims = pc.Owner + pc.Group + pc.Others;
// TODO: Need to transfer selected prims to new prim count structure.
updateMessage.SelectedPrims = landData.SelectedPrims;
try
{