Files
abysmal-isle/Scripts/Services/Reports/Objects/Reports/ItemValue.cs
Unstable Kitsune b918192e4e Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
2023-11-28 23:20:26 -05:00

80 lines
1.8 KiB
C#

using System;
namespace Server.Engines.Reports
{
public class ItemValue : PersistableObject
{
#region Type Identification
public static readonly PersistableType ThisTypeID = new PersistableType("iv", new ConstructCallback(Construct));
private static PersistableObject Construct()
{
return new ItemValue();
}
public override PersistableType TypeID
{
get
{
return ThisTypeID;
}
}
#endregion
private string m_Value;
private string m_Format;
public string Value
{
get
{
return this.m_Value;
}
set
{
this.m_Value = value;
}
}
public string Format
{
get
{
return this.m_Format;
}
set
{
this.m_Format = value;
}
}
private ItemValue()
{
}
public ItemValue(string value)
: this(value, null)
{
}
public ItemValue(string value, string format)
{
this.m_Value = value;
this.m_Format = format;
}
public override void SerializeAttributes(PersistenceWriter op)
{
op.SetString("v", this.m_Value);
op.SetString("f", this.m_Format);
}
public override void DeserializeAttributes(PersistenceReader ip)
{
this.m_Value = ip.GetString("v");
this.m_Format = Utility.Intern(ip.GetString("f"));
if (this.m_Format == null)
Utility.Intern(ref this.m_Value);
}
}
}