From 5c5a640ababeff6d833fec26b87a61ece6500f04 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 10 Oct 2008 02:06:34 +0000 Subject: A bit more estate fudging --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 ++----- .../Modules/World/Estate/EstateManagementModule.cs | 13 ++++++++++++- OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 2 +- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b1f4d7c..563d83b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2834,7 +2834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP this.OutPacket(einfopack, ThrottleOutPacketType.Task); } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) { EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); packet.MethodData.Invoice = invoice; @@ -2851,10 +2851,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP returnblock[0].Parameter = Utils.StringToBytes(estateName); // TODO: remove this cruft once MasterAvatar is fully deprecated // - if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) - returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateOwner.ToString()); - else - returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); + returnblock[1].Parameter = Utils.StringToBytes(estateOwner.ToString()); returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString()); returnblock[3].Parameter = Utils.StringToBytes(estateFlags.ToString()); diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 7a9dc72..e7e4659 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs @@ -52,8 +52,18 @@ namespace OpenSim.Region.Environment.Modules.World.Estate //SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant) uint sun = 0; + if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; + UUID estateOwner; + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) + estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; + else + estateOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; + + if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remote_client.AgentId)) + estateOwner = remote_client.AgentId; + remote_client.SendDetailedEstateData(invoice, m_scene.RegionInfo.EstateSettings.EstateName, m_scene.RegionInfo.EstateSettings.EstateID, @@ -61,7 +71,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate GetEstateFlags(), sun, m_scene.RegionInfo.RegionSettings.Covenant, - m_scene.RegionInfo.EstateSettings.AbuseEmail); + m_scene.RegionInfo.EstateSettings.AbuseEmail, + estateOwner); remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index b59b013..b438709 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -822,7 +822,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public void SendEstateCovenantInformation(UUID covenant) { } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) { } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 87478c7..46c6425 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -811,7 +811,7 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendEstateCovenantInformation(UUID covenant) { } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) { } -- cgit v1.1