From 28f549bd64eb423ae43a5c23c1da5094e6269150 Mon Sep 17 00:00:00 2001 From: Pixel Tomsen Date: Sat, 8 Oct 2011 07:38:04 +0200 Subject: [PATCH] osSetParcelDetails - PARCEL_DETAILS_CLAIMDATE this new flag set parcels claim date value 0 for this flag set current unixstamp http://opensimulator.org/mantis/view.php?id=5725 --- .../Shared/Api/Implementation/OSSL_Api.cs | 43 +++++++++++-------- .../Shared/Api/Runtime/LSL_Constants.cs | 4 ++ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2a7077bead..268a599b75 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1356,27 +1356,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string arg = rules.GetLSLStringItem(idx++); switch (code) { - case 0: - newLand.Name = arg; - break; + case ScriptBaseClass.PARCEL_DETAILS_NAME: + newLand.Name = arg; + break; - case 1: - newLand.Description = arg; - break; + case ScriptBaseClass.PARCEL_DETAILS_DESC: + newLand.Description = arg; + break; - case 2: - CheckThreatLevel(ThreatLevel.VeryHigh, functionName); - if (UUID.TryParse(arg , out uuid)) - newLand.OwnerID = uuid; - break; + case ScriptBaseClass.PARCEL_DETAILS_OWNER: + CheckThreatLevel(ThreatLevel.VeryHigh, functionName); + if (UUID.TryParse(arg, out uuid)) + newLand.OwnerID = uuid; + break; - case 3: - CheckThreatLevel(ThreatLevel.VeryHigh, functionName); - if (UUID.TryParse(arg , out uuid)) - newLand.GroupID = uuid; - break; - } - } + case ScriptBaseClass.PARCEL_DETAILS_GROUP: + CheckThreatLevel(ThreatLevel.VeryHigh, functionName); + if (UUID.TryParse(arg, out uuid)) + newLand.GroupID = uuid; + break; + + case ScriptBaseClass.PARCEL_DETAILS_CLAIMDATE: + CheckThreatLevel(ThreatLevel.VeryHigh, functionName); + newLand.ClaimDate = Convert.ToInt32(arg); + if (newLand.ClaimDate == 0) + newLand.ClaimDate = Util.UnixTimeSinceEpoch(); + break; + } + } World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index e82c2815a2..36c5f90bea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -510,6 +510,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PARCEL_DETAILS_GROUP = 3; public const int PARCEL_DETAILS_AREA = 4; public const int PARCEL_DETAILS_ID = 5; + public const int PARCEL_DETAILS_SEE_AVATARS = 6; // not implemented + + //osSetParcelDetails + public const int PARCEL_DETAILS_CLAIMDATE = 10; // constants for llSetClickAction public const int CLICK_ACTION_NONE = 0;