ace/Source/ACE.Server/WorldObjects/Container_Properties.cs
gmriggs 528c9b3667
prevent ninja looting chests (#2935)
* prevent ninja looting chests

* comment typo

* factoring code some more, syncing chest messages up to other container messages

* remove unused line

* remove another unused line

* adding unlocker_window config option

* Update Source/ACE.Server/WorldObjects/Chest.cs

Co-Authored-By: Ty Conner <tyconner@itcproductions.com>

Co-authored-by: Ty Conner <tyconner@itcproductions.com>
2020-04-16 15:05:47 -04:00

32 lines
1.2 KiB
C#

using ACE.Entity.Enum.Properties;
namespace ACE.Server.WorldObjects
{
partial class Container
{
public uint Viewer
{
get => GetProperty(PropertyInstanceId.Viewer) ?? 0;
set { if (value == 0) RemoveProperty(PropertyInstanceId.Viewer); else SetProperty(PropertyInstanceId.Viewer, value); }
}
public uint? LastUnlocker
{
get => GetProperty(PropertyInstanceId.LastUnlocker);
set { if (!value.HasValue) RemoveProperty(PropertyInstanceId.LastUnlocker); else SetProperty(PropertyInstanceId.LastUnlocker, value.Value); }
}
public double? UseLockTimestamp
{
get => GetProperty(PropertyFloat.UseLockTimestamp);
set { if (!value.HasValue) RemoveProperty(PropertyFloat.UseLockTimestamp); else SetProperty(PropertyFloat.UseLockTimestamp, value.Value); }
}
public bool ResetMessagePending
{
get => GetProperty(PropertyBool.ResetMessagePending) ?? false;
set { if (!value) RemoveProperty(PropertyBool.ResetMessagePending); else SetProperty(PropertyBool.ResetMessagePending, value); }
}
}
}