mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Remove "Dwell" support from core and replace it with calls to methods
on IDwellModule
This commit is contained in:
@@ -2687,6 +2687,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
|
||||
{
|
||||
float dwell = 0.0f;
|
||||
IDwellModule dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
|
||||
if (dwellModule != null)
|
||||
dwell = dwellModule.GetDwell(land.GlobalID);
|
||||
ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply);
|
||||
reply.AgentData.AgentID = m_agentId;
|
||||
reply.Data.ParcelID = parcelID;
|
||||
@@ -2711,7 +2715,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
reply.Data.GlobalZ = pos.Z;
|
||||
reply.Data.SimName = Utils.StringToBytes(info.RegionName);
|
||||
reply.Data.SnapshotID = land.SnapshotID;
|
||||
reply.Data.Dwell = land.Dwell;
|
||||
reply.Data.Dwell = dwell;
|
||||
reply.Data.SalePrice = land.SalePrice;
|
||||
reply.Data.AuctionID = (int)land.AuctionID;
|
||||
|
||||
|
||||
@@ -171,7 +171,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
client.OnParcelGodForceOwner += ClientOnParcelGodForceOwner;
|
||||
client.OnParcelReclaim += ClientOnParcelReclaim;
|
||||
client.OnParcelInfoRequest += ClientOnParcelInfoRequest;
|
||||
// client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
|
||||
client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup;
|
||||
client.OnPreAgentUpdate += ClientOnPreAgentUpdate;
|
||||
|
||||
@@ -1512,18 +1511,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
|
||||
#endregion
|
||||
|
||||
private void ClientOnParcelDwellRequest(int localID, IClientAPI remoteClient)
|
||||
{
|
||||
ILandObject selectedParcel = null;
|
||||
lock (m_landList)
|
||||
{
|
||||
if (!m_landList.TryGetValue(localID, out selectedParcel))
|
||||
return;
|
||||
}
|
||||
|
||||
remoteClient.SendParcelDwellReply(localID, selectedParcel.LandData.GlobalID, selectedParcel.LandData.Dwell);
|
||||
}
|
||||
|
||||
private void ClientOnParcelInfoRequest(IClientAPI remoteClient, UUID parcelID)
|
||||
{
|
||||
if (parcelID == UUID.Zero)
|
||||
|
||||
@@ -123,6 +123,8 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||
ILandChannel landChannel = m_scene.LandChannel;
|
||||
List<ILandObject> parcels = landChannel.AllParcels();
|
||||
|
||||
IDwellModule dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
|
||||
|
||||
XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "parceldata", "");
|
||||
if (parcels != null)
|
||||
{
|
||||
@@ -208,7 +210,10 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||
xmlparcel.AppendChild(infouuid);
|
||||
|
||||
XmlNode dwell = nodeFactory.CreateNode(XmlNodeType.Element, "dwell", "");
|
||||
dwell.InnerText = parcel.Dwell.ToString();
|
||||
if (dwellModule != null)
|
||||
dwell.InnerText = dwellModule.GetDwell(parcel.GlobalID).ToString();
|
||||
else
|
||||
dwell.InnerText = "0";
|
||||
xmlparcel.AppendChild(dwell);
|
||||
|
||||
//TODO: figure how to figure out teleport system landData.landingType
|
||||
|
||||
Reference in New Issue
Block a user