diff options
author | UbitUmarov | 2014-09-26 14:00:33 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-26 14:00:33 +0100 |
commit | cce31b66386270e70e833ffe4fcc2906176e31ad (patch) | |
tree | 58916a18015a3f9f362aabcd72a544fbf013d3c5 /OpenSim/Framework | |
parent | refuse to do a inventory link if provided asset type is not a link or (diff) | |
download | opensim-SC_OLD-cce31b66386270e70e833ffe4fcc2906176e31ad.zip opensim-SC_OLD-cce31b66386270e70e833ffe4fcc2906176e31ad.tar.gz opensim-SC_OLD-cce31b66386270e70e833ffe4fcc2906176e31ad.tar.bz2 opensim-SC_OLD-cce31b66386270e70e833ffe4fcc2906176e31ad.tar.xz |
add centerlized AnimationSet item permitions setting
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AnimationSet.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs index c5ab634..fefe093 100644 --- a/OpenSim/Framework/AnimationSet.cs +++ b/OpenSim/Framework/AnimationSet.cs | |||
@@ -33,10 +33,29 @@ namespace OpenSim.Framework | |||
33 | { | 33 | { |
34 | public delegate bool AnimationSetValidator(UUID animID); | 34 | public delegate bool AnimationSetValidator(UUID animID); |
35 | 35 | ||
36 | |||
36 | public class AnimationSet | 37 | public class AnimationSet |
37 | { | 38 | { |
38 | private readonly int m_maxAnimations = 255; | 39 | private readonly int m_maxAnimations = 255; |
39 | 40 | ||
41 | public const uint allowedPermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify); | ||
42 | |||
43 | public uint enforcePermitions(uint currentPerm) | ||
44 | { | ||
45 | return currentPerm & allowedPermitions; | ||
46 | } | ||
47 | |||
48 | public void enforceItemPermitions(ref InventoryItemBase it) | ||
49 | { | ||
50 | if (it == null) | ||
51 | return; | ||
52 | it.CurrentPermissions &= allowedPermitions; | ||
53 | it.NextPermissions &= allowedPermitions; | ||
54 | it.EveryOnePermissions &= allowedPermitions; | ||
55 | it.GroupPermissions &= allowedPermitions; | ||
56 | it.BasePermissions &= allowedPermitions; | ||
57 | } | ||
58 | |||
40 | public int AnimationCount { get; private set; } | 59 | public int AnimationCount { get; private set; } |
41 | private Dictionary<int, UUID> m_animations = new Dictionary<int, UUID>(); | 60 | private Dictionary<int, UUID> m_animations = new Dictionary<int, UUID>(); |
42 | 61 | ||