mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using ACE.Database.Models.Shard;
|
|
using ACE.Database.Models.World;
|
|
using ACE.Entity;
|
|
using ACE.Entity.Enum.Properties;
|
|
|
|
namespace ACE.Server.WorldObjects
|
|
{
|
|
public class Key : WorldObject
|
|
{
|
|
/// <summary>
|
|
/// A new biota be created taking all of its values from weenie.
|
|
/// </summary>
|
|
public Key(Weenie weenie, ObjectGuid guid) : base(weenie, guid)
|
|
{
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Restore a WorldObject from the database.
|
|
/// </summary>
|
|
public Key(Biota biota) : base(biota)
|
|
{
|
|
SetEphemeralValues();
|
|
}
|
|
|
|
private void SetEphemeralValues()
|
|
{
|
|
// These shoudl come from the weenie. After confirmation, remove these
|
|
//KeyCode = AceObject.KeyCode ?? "";
|
|
//Structure = AceObject.Structure ?? AceObject.MaxStructure;
|
|
}
|
|
|
|
public string KeyCode
|
|
{
|
|
get => GetProperty(PropertyString.KeyCode);
|
|
set { if (value == null) RemoveProperty(PropertyString.KeyCode); else SetProperty(PropertyString.KeyCode, value); }
|
|
}
|
|
|
|
public override void HandleActionUseOnTarget(Player player, WorldObject target)
|
|
{
|
|
UnlockerHelper.UseUnlocker(player, this, target);
|
|
}
|
|
}
|
|
}
|