*Added support to change most of a parcel's settings and flags (from the about land box)
*Added the rest of the member variables relating to parcels in the ParcelData classzircon^2
parent
fa50dce1b6
commit
a12a495c22
|
@ -26,10 +26,20 @@ namespace OpenSim.Framework.Types
|
|||
public int salePrice = 0; //Unemeplemented. Parcels price.
|
||||
public libsecondlife.Parcel.ParcelStatus parcelStatus = libsecondlife.Parcel.ParcelStatus.None;
|
||||
public libsecondlife.Parcel.ParcelFlags parcelFlags = libsecondlife.Parcel.ParcelFlags.None;
|
||||
|
||||
public byte landingType = 0;
|
||||
public byte mediaAutoScale = 0;
|
||||
public LLUUID mediaID = LLUUID.Zero;
|
||||
public int localID = 0;
|
||||
public LLUUID globalID = new LLUUID();
|
||||
|
||||
public string mediaURL = "";
|
||||
public string musicURL = "";
|
||||
public float passHours = 0;
|
||||
public int passPrice = 0;
|
||||
public LLUUID snapshotID = LLUUID.Zero;
|
||||
public LLVector3 userLocation = new LLVector3();
|
||||
public LLVector3 userLookAt = new LLVector3();
|
||||
|
||||
public ParcelData()
|
||||
{
|
||||
globalID = LLUUID.Random();
|
||||
|
@ -52,13 +62,23 @@ namespace OpenSim.Framework.Types
|
|||
parcelData.groupPrims = this.groupPrims;
|
||||
parcelData.isGroupOwned = this.isGroupOwned;
|
||||
parcelData.localID = this.localID;
|
||||
parcelData.landingType = this.landingType;
|
||||
parcelData.mediaAutoScale = this.mediaAutoScale;
|
||||
parcelData.mediaID = this.mediaID;
|
||||
parcelData.mediaURL = this.mediaURL;
|
||||
parcelData.musicURL = this.musicURL;
|
||||
parcelData.ownerID = this.ownerID;
|
||||
parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
|
||||
parcelData.parcelDesc = this.parcelDesc;
|
||||
parcelData.parcelFlags = this.parcelFlags;
|
||||
parcelData.parcelName = this.parcelName;
|
||||
parcelData.parcelStatus = this.parcelStatus;
|
||||
parcelData.passHours = this.passHours;
|
||||
parcelData.passPrice = this.passPrice;
|
||||
parcelData.salePrice = this.salePrice;
|
||||
parcelData.snapshotID = this.snapshotID;
|
||||
parcelData.userLocation = this.userLocation;
|
||||
parcelData.userLookAt = this.userLookAt;
|
||||
|
||||
return parcelData;
|
||||
|
||||
|
|
41
OpenSim.sln
41
OpenSim.sln
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
# Visual C# Express 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim\OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}"
|
||||
|
@ -41,45 +41,6 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).8 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).9 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).10 = ({632E1BFD-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).11 = ({E88EF749-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).12 = ({8E81D43C-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).11 = ({8E81D43C-0000-0000-0000-000000000000})
|
||||
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
|
||||
({8ACA2445-0000-0000-0000-000000000000}).4 = ({8E81D43C-0000-0000-0000-000000000000})
|
||||
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
|
||||
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
|
|
|
@ -83,9 +83,11 @@ namespace OpenSim
|
|||
public event UpdatePrimRotation OnUpdatePrimRotation;
|
||||
public event UpdatePrimVector OnUpdatePrimScale;
|
||||
public event StatusChange OnChildAgentStatus;
|
||||
|
||||
public event ParcelPropertiesRequest OnParcelPropertiesRequest;
|
||||
public event ParcelDivideRequest OnParcelDivideRequest;
|
||||
public event ParcelJoinRequest OnParcelJoinRequest;
|
||||
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
|
||||
|
||||
protected override void ProcessInPacket(Packet Pack)
|
||||
{
|
||||
|
@ -482,6 +484,10 @@ namespace OpenSim
|
|||
ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack;
|
||||
OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this);
|
||||
break;
|
||||
case PacketType.ParcelPropertiesUpdate:
|
||||
ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack;
|
||||
OnParcelPropertiesUpdateRequest(updatePacket, this);
|
||||
break;
|
||||
#endregion
|
||||
|
||||
#region unimplemented handlers
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace OpenSim.RegionServer.world
|
|||
public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client);
|
||||
public delegate void ParcelDivideRequest(int west, int south, int east, int north, ClientView remote_client);
|
||||
public delegate void ParcelJoinRequest(int west, int south, int east, int north, ClientView remote_client);
|
||||
public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client);
|
||||
|
||||
#region ParcelManager Class
|
||||
/// <summary>
|
||||
|
@ -526,13 +527,13 @@ namespace OpenSim.RegionServer.world
|
|||
updatePacket.ParcelData.GroupID = parcelData.groupID;
|
||||
updatePacket.ParcelData.GroupPrims = parcelData.groupPrims;
|
||||
updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned;
|
||||
updatePacket.ParcelData.LandingType = (byte)0; //unemplemented
|
||||
updatePacket.ParcelData.LandingType = (byte)parcelData.landingType;
|
||||
updatePacket.ParcelData.LocalID = parcelData.localID;
|
||||
updatePacket.ParcelData.MaxPrims = 1000; //unemplemented
|
||||
updatePacket.ParcelData.MediaAutoScale = (byte)0; //unemplemented
|
||||
updatePacket.ParcelData.MediaID = LLUUID.Zero; //unemplemented
|
||||
updatePacket.ParcelData.MediaURL = Helpers.StringToField(""); //unemplemented
|
||||
updatePacket.ParcelData.MusicURL = Helpers.StringToField(""); //unemplemented
|
||||
updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale;
|
||||
updatePacket.ParcelData.MediaID = parcelData.mediaID;
|
||||
updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL);
|
||||
updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL);
|
||||
updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName);
|
||||
updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
|
||||
updatePacket.ParcelData.OtherCount = 0; //unemplemented
|
||||
|
@ -541,8 +542,8 @@ namespace OpenSim.RegionServer.world
|
|||
updatePacket.ParcelData.OwnerPrims = 0; //unemplemented
|
||||
updatePacket.ParcelData.ParcelFlags = (uint)parcelData.parcelFlags; //unemplemented
|
||||
updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented
|
||||
updatePacket.ParcelData.PassHours = (float)0.0; //unemplemented
|
||||
updatePacket.ParcelData.PassPrice = 0; //unemeplemented
|
||||
updatePacket.ParcelData.PassHours = parcelData.passHours;
|
||||
updatePacket.ParcelData.PassPrice = parcelData.passPrice;
|
||||
updatePacket.ParcelData.PublicCount = 0; //unemplemented
|
||||
updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented
|
||||
updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented
|
||||
|
@ -556,15 +557,41 @@ namespace OpenSim.RegionServer.world
|
|||
updatePacket.ParcelData.SequenceID = sequence_id;
|
||||
updatePacket.ParcelData.SimWideMaxPrims = 15000; //unemplemented
|
||||
updatePacket.ParcelData.SimWideTotalPrims = 0; //unemplemented
|
||||
updatePacket.ParcelData.SnapSelection = snap_selection; //Bleh - not important yet
|
||||
updatePacket.ParcelData.SnapshotID = LLUUID.Zero; //Unemplemented
|
||||
updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus; //??
|
||||
updatePacket.ParcelData.SnapSelection = snap_selection;
|
||||
updatePacket.ParcelData.SnapshotID = parcelData.snapshotID;
|
||||
updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus;
|
||||
updatePacket.ParcelData.TotalPrims = 0; //unemplemented
|
||||
updatePacket.ParcelData.UserLocation = LLVector3.Zero; //unemplemented
|
||||
updatePacket.ParcelData.UserLookAt = LLVector3.Zero; //unemeplemented
|
||||
updatePacket.ParcelData.UserLocation = parcelData.userLocation;
|
||||
updatePacket.ParcelData.UserLookAt = parcelData.userLookAt;
|
||||
|
||||
remote_client.OutPacket((Packet)updatePacket);
|
||||
}
|
||||
|
||||
public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
|
||||
{
|
||||
if (remote_client.AgentID == parcelData.ownerID)
|
||||
{
|
||||
//Needs later group support
|
||||
Console.WriteLine("Request for update - parcel #" + parcelData.localID);
|
||||
parcelData.authBuyerID = packet.ParcelData.AuthBuyerID;
|
||||
parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category;
|
||||
parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc);
|
||||
parcelData.groupID = packet.ParcelData.GroupID;
|
||||
parcelData.landingType = packet.ParcelData.LandingType;
|
||||
parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale;
|
||||
parcelData.mediaID = packet.ParcelData.MediaID;
|
||||
parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL);
|
||||
parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL);
|
||||
parcelData.parcelName = libsecondlife.Helpers.FieldToUTF8String(packet.ParcelData.Name);
|
||||
parcelData.parcelFlags = (libsecondlife.Parcel.ParcelFlags)packet.ParcelData.ParcelFlags;
|
||||
parcelData.passHours = packet.ParcelData.PassHours;
|
||||
parcelData.passPrice = packet.ParcelData.PassPrice;
|
||||
parcelData.salePrice = packet.ParcelData.SalePrice;
|
||||
parcelData.snapshotID = packet.ParcelData.SnapshotID;
|
||||
parcelData.userLocation = packet.ParcelData.UserLocation;
|
||||
parcelData.userLookAt = packet.ParcelData.UserLookAt;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -365,6 +365,13 @@ namespace OpenSim.world
|
|||
{
|
||||
parcelManager.join(west, south, east, north, remote_client.AgentID);
|
||||
}
|
||||
void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
|
||||
{
|
||||
if (parcelManager.parcelList.ContainsKey(packet.ParcelData.LocalID))
|
||||
{
|
||||
parcelManager.parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/*
|
||||
|
|
|
@ -618,6 +618,7 @@ namespace OpenSim.world
|
|||
agentClient.OnParcelPropertiesRequest += new OpenSim.RegionServer.world.ParcelPropertiesRequest(ParcelPropertiesRequest);
|
||||
agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.world.ParcelDivideRequest(ParcelDivideRequest);
|
||||
agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.world.ParcelJoinRequest(ParcelJoinRequest);
|
||||
agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.world.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest);
|
||||
Avatar newAvatar = null;
|
||||
try
|
||||
{
|
||||
|
@ -669,6 +670,8 @@ namespace OpenSim.world
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
public override void RemoveViewerAgent(ClientView agentClient)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -179,14 +179,24 @@ namespace OpenSim.Storage.LocalStorageDb4o
|
|||
updateParcel.groupID = parcel.groupID;
|
||||
updateParcel.groupPrims = parcel.groupPrims;
|
||||
updateParcel.isGroupOwned = parcel.isGroupOwned;
|
||||
updateParcel.landingType = parcel.landingType;
|
||||
updateParcel.mediaAutoScale = parcel.mediaAutoScale;
|
||||
updateParcel.mediaID = parcel.mediaID;
|
||||
updateParcel.mediaURL = parcel.mediaURL;
|
||||
updateParcel.musicURL = parcel.musicURL;
|
||||
updateParcel.localID = parcel.localID;
|
||||
updateParcel.ownerID = parcel.ownerID;
|
||||
updateParcel.passHours = parcel.passHours;
|
||||
updateParcel.passPrice = parcel.passPrice;
|
||||
updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone();
|
||||
updateParcel.parcelDesc = parcel.parcelDesc;
|
||||
updateParcel.parcelFlags = parcel.parcelFlags;
|
||||
updateParcel.parcelName = parcel.parcelName;
|
||||
updateParcel.parcelStatus = parcel.parcelStatus;
|
||||
updateParcel.salePrice = parcel.salePrice;
|
||||
updateParcel.snapshotID = parcel.snapshotID;
|
||||
updateParcel.userLocation = parcel.userLocation;
|
||||
updateParcel.userLookAt = parcel.userLookAt;
|
||||
|
||||
db.Set(updateParcel);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue