Implement Parcel -> ForceOwnerToMe god mode packet

0.6.0-stable
Melanie Thielker 2008-10-06 08:19:18 +00:00
parent 03a41e5f8b
commit d834996bbe
5 changed files with 30 additions and 0 deletions

View File

@ -167,6 +167,7 @@ namespace OpenSim.Framework
public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
public delegate void ParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client);
public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, UUID[] agent_ids, UUID[] selected_ids, IClientAPI remote_client);
@ -486,6 +487,7 @@ namespace OpenSim.Framework
event ParcelSelectObjects OnParcelSelectObjects;
event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
event ParcelAbandonRequest OnParcelAbandonRequest;
event ParcelGodForceOwner OnParcelGodForceOwner;
event ParcelReclaim OnParcelReclaim;
event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
event RegionInfoRequest OnRegionInfoRequest;

View File

@ -211,6 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private ParcelSelectObjects handlerParcelSelectObjects = null; //OnParcelSelectObjects;
private ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = null; //OnParcelObjectOwnerRequest;
private ParcelAbandonRequest handlerParcelAbandonRequest = null;
private ParcelGodForceOwner handlerParcelGodForceOwner = null;
private ParcelReclaim handlerParcelReclaim = null;
private ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest = null;
private RegionInfoRequest handlerRegionInfoRequest = null; //OnRegionInfoRequest;
@ -938,6 +939,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
public event ParcelAbandonRequest OnParcelAbandonRequest;
public event ParcelGodForceOwner OnParcelGodForceOwner;
public event ParcelReclaim OnParcelReclaim;
public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
public event RegionInfoRequest OnRegionInfoRequest;
@ -5678,6 +5680,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this);
}
break;
case PacketType.ParcelGodForceOwner:
ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack;
handlerParcelGodForceOwner = OnParcelGodForceOwner;
if (handlerParcelGodForceOwner != null)
{
handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this);
}
break;
case PacketType.ParcelRelease:
ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack;

View File

@ -103,6 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
client.OnParcelAccessListRequest += new ParcelAccessListRequest(handleParcelAccessRequest);
client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(handleParcelAccessUpdateRequest);
client.OnParcelAbandonRequest += new ParcelAbandonRequest(handleParcelAbandonRequest);
client.OnParcelGodForceOwner += new ParcelGodForceOwner(handleParcelGodForceOwner);
client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim);
client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo);
if (m_scene.Entities.ContainsKey(client.AgentId))
@ -912,6 +913,20 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
}
public void handleParcelGodForceOwner(int local_id, UUID ownerID, IClientAPI remote_client)
{
if (landList.ContainsKey(local_id))
{
if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remote_client.AgentId))
{
landList[local_id].landData.OwnerID = ownerID;
m_scene.Broadcast(SendParcelOverlay);
landList[local_id].sendLandUpdateToClient(remote_client);
}
}
}
public void handleParcelAbandonRequest(int local_id, IClientAPI remote_client)
{
if (landList.ContainsKey(local_id))

View File

@ -258,6 +258,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
public event ParcelJoinRequest OnParcelJoinRequest;
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
public event ParcelAbandonRequest OnParcelAbandonRequest;
public event ParcelGodForceOwner OnParcelGodForceOwner;
public event ParcelReclaim OnParcelReclaim;
public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
public event ParcelAccessListRequest OnParcelAccessListRequest;

View File

@ -153,6 +153,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event ParcelJoinRequest OnParcelJoinRequest;
public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
public event ParcelAbandonRequest OnParcelAbandonRequest;
public event ParcelGodForceOwner OnParcelGodForceOwner;
public event ParcelReclaim OnParcelReclaim;
public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
public event ParcelAccessListRequest OnParcelAccessListRequest;