diff options
author | UbitUmarov | 2018-09-30 05:11:34 +0100 |
---|---|---|
committer | UbitUmarov | 2018-09-30 05:11:34 +0100 |
commit | 0f1bc23039cd5a4390b474d685ef052e3e258ffb (patch) | |
tree | 4bd0613f750a3b37c51fab44bea0946658532b26 /OpenSim/Region/CoreModules/World/Land | |
parent | Implementation-and-design-of-ClientOnParcelGodMark (diff) | |
download | opensim-SC-0f1bc23039cd5a4390b474d685ef052e3e258ffb.zip opensim-SC-0f1bc23039cd5a4390b474d685ef052e3e258ffb.tar.gz opensim-SC-0f1bc23039cd5a4390b474d685ef052e3e258ffb.tar.bz2 opensim-SC-0f1bc23039cd5a4390b474d685ef052e3e258ffb.tar.xz |
a few changes to last patch
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index a7f708a..3c6f695 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -2139,59 +2139,60 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2139 | 2139 | ||
2140 | public void ClientOnParcelGodMark(IClientAPI client, UUID god, int landID) | 2140 | public void ClientOnParcelGodMark(IClientAPI client, UUID god, int landID) |
2141 | { | 2141 | { |
2142 | ILandObject land = null; | ||
2143 | List<ILandObject> Land = ((Scene)client.Scene).LandChannel.AllParcels(); | ||
2144 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out ScenePresence sp); | 2142 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out ScenePresence sp); |
2145 | |||
2146 | if (sp == null) | 2143 | if (sp == null) |
2147 | return; | 2144 | return; |
2148 | if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) | 2145 | if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) |
2149 | return; | 2146 | return; |
2150 | |||
2151 | if (!sp.IsGod) | 2147 | if (!sp.IsGod) |
2152 | { | 2148 | { |
2153 | client.SendAlertMessage("Request denied. You're not priviliged."); | 2149 | client.SendAlertMessage("Request denied. You're not priviliged."); |
2154 | return; | 2150 | return; |
2155 | } | 2151 | } |
2156 | if (!sp.IsViewerUIGod) | 2152 | |
2153 | ILandObject land = null; | ||
2154 | List<ILandObject> Lands = ((Scene)client.Scene).LandChannel.AllParcels(); | ||
2155 | foreach (ILandObject landObject in Lands) | ||
2157 | { | 2156 | { |
2158 | client.SendAlertMessage("Please activate God Mode."); | 2157 | if (landObject.LandData.LocalID == landID) |
2159 | return; | 2158 | { |
2159 | land = landObject; | ||
2160 | break; | ||
2161 | } | ||
2160 | } | 2162 | } |
2163 | if (land == null) | ||
2164 | return; | ||
2161 | 2165 | ||
2162 | bool GodParcelOwner = false; | 2166 | bool validParcelOwner = false; |
2163 | if (m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, DefaultGodParcelOwner) != null) | 2167 | if (DefaultGodParcelOwner != UUID.Zero && m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, DefaultGodParcelOwner) != null) |
2164 | GodParcelOwner = true; | 2168 | validParcelOwner = true; |
2165 | 2169 | ||
2166 | bool GodParcelGroup = false; | 2170 | bool validParcelGroup = false; |
2167 | if (m_groupManager != null) | 2171 | if (m_groupManager != null) |
2168 | { | 2172 | { |
2169 | if (DefaultGodParcelGroup != UUID.Zero && m_groupManager.GetGroupRecord(DefaultGodParcelGroup) != null) | 2173 | if (DefaultGodParcelGroup != UUID.Zero && m_groupManager.GetGroupRecord(DefaultGodParcelGroup) != null) |
2170 | GodParcelGroup = true; | 2174 | validParcelGroup = true; |
2171 | } | 2175 | } |
2172 | 2176 | ||
2173 | if (!GodParcelOwner && !GodParcelGroup) | 2177 | if (!validParcelOwner && !validParcelGroup) |
2174 | { | 2178 | { |
2175 | client.SendAlertMessage("Please check ini files.\n[LandManagement] config section."); | 2179 | client.SendAlertMessage("Please check ini files.\n[LandManagement] config section."); |
2176 | return; | 2180 | return; |
2177 | } | 2181 | } |
2178 | 2182 | ||
2179 | foreach (ILandObject landObject in Land) | 2183 | land.LandData.AnyAVSounds = true; |
2180 | { | 2184 | land.LandData.SeeAVs = true; |
2181 | if (landObject.LandData.LocalID == landID) | 2185 | land.LandData.GroupAVSounds = true; |
2182 | land = landObject; | ||
2183 | } | ||
2184 | if (land == null) | ||
2185 | return; | ||
2186 | |||
2187 | land.LandData.AnyAVSounds = false; | ||
2188 | land.LandData.AuthBuyerID = UUID.Zero; | 2186 | land.LandData.AuthBuyerID = UUID.Zero; |
2189 | land.LandData.Category = ParcelCategory.Linden; | 2187 | land.LandData.Category = ParcelCategory.None; |
2190 | land.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); | 2188 | land.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); |
2191 | land.LandData.Description = String.Empty; | 2189 | land.LandData.Description = String.Empty; |
2192 | land.LandData.Dwell = 0; | 2190 | land.LandData.Dwell = 0; |
2193 | land.LandData.Flags = (uint)ParcelFlags.None; | 2191 | land.LandData.Flags = (uint)ParcelFlags.AllowFly | (uint)ParcelFlags.AllowLandmark | |
2194 | land.LandData.GroupAVSounds = false; | 2192 | (uint)ParcelFlags.AllowAPrimitiveEntry | |
2193 | (uint)ParcelFlags.AllowDeedToGroup | | ||
2194 | (uint)ParcelFlags.CreateObjects | (uint)ParcelFlags.AllowOtherScripts | | ||
2195 | (uint)ParcelFlags.AllowVoiceChat; | ||
2195 | land.LandData.LandingType = (byte)LandingType.Direct; | 2196 | land.LandData.LandingType = (byte)LandingType.Direct; |
2196 | land.LandData.LastDwellTimeMS = Util.GetTimeStampMS(); | 2197 | land.LandData.LastDwellTimeMS = Util.GetTimeStampMS(); |
2197 | land.LandData.MediaAutoScale = 0; | 2198 | land.LandData.MediaAutoScale = 0; |
@@ -2210,11 +2211,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2210 | land.LandData.PassHours = 0; | 2211 | land.LandData.PassHours = 0; |
2211 | land.LandData.PassPrice = 0; | 2212 | land.LandData.PassPrice = 0; |
2212 | land.LandData.SalePrice = 0; | 2213 | land.LandData.SalePrice = 0; |
2213 | land.LandData.SeeAVs = false; | ||
2214 | land.LandData.SnapshotID = UUID.Zero; | 2214 | land.LandData.SnapshotID = UUID.Zero; |
2215 | land.LandData.Status = ParcelStatus.Leased; | 2215 | land.LandData.Status = ParcelStatus.Leased; |
2216 | 2216 | ||
2217 | if (GodParcelOwner) | 2217 | if (validParcelOwner) |
2218 | { | 2218 | { |
2219 | land.LandData.OwnerID = DefaultGodParcelOwner; | 2219 | land.LandData.OwnerID = DefaultGodParcelOwner; |
2220 | land.LandData.IsGroupOwned = false; | 2220 | land.LandData.IsGroupOwned = false; |
@@ -2225,7 +2225,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2225 | land.LandData.IsGroupOwned = true; | 2225 | land.LandData.IsGroupOwned = true; |
2226 | } | 2226 | } |
2227 | 2227 | ||
2228 | if (GodParcelGroup) | 2228 | if (validParcelGroup) |
2229 | land.LandData.GroupID = DefaultGodParcelGroup; | 2229 | land.LandData.GroupID = DefaultGodParcelGroup; |
2230 | else | 2230 | else |
2231 | land.LandData.GroupID = UUID.Zero; | 2231 | land.LandData.GroupID = UUID.Zero; |