From d834996bbef445565ac17a3e1eb4fe9c491cad5b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 6 Oct 2008 08:19:18 +0000 Subject: Implement Parcel -> ForceOwnerToMe god mode packet --- .../Modules/World/Land/LandManagementModule.cs | 15 +++++++++++++++ OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 1 + 2 files changed, 16 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/World') diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index 77a31c7..253eec6 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs @@ -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)) diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 972491d..a236ccd 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -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; -- cgit v1.1