#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
46
Scripts/Engines/Reports/Objects/Charts/ChartItem.cs
Normal file
46
Scripts/Engines/Reports/Objects/Charts/ChartItem.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Reports
|
||||
{
|
||||
public class ChartItem : PersistableObject
|
||||
{
|
||||
#region Type Identification
|
||||
public static readonly PersistableType ThisTypeID = new PersistableType( "ci", new ConstructCallback( Construct ) );
|
||||
|
||||
private static PersistableObject Construct()
|
||||
{
|
||||
return new ChartItem();
|
||||
}
|
||||
|
||||
public override PersistableType TypeID{ get{ return ThisTypeID; } }
|
||||
#endregion
|
||||
|
||||
private string m_Name;
|
||||
private int m_Value;
|
||||
|
||||
public string Name{ get{ return m_Name; } set{ m_Name = value; } }
|
||||
public int Value{ get{ return m_Value; } set{ m_Value = value; } }
|
||||
|
||||
private ChartItem()
|
||||
{
|
||||
}
|
||||
|
||||
public ChartItem( string name, int value )
|
||||
{
|
||||
m_Name = name;
|
||||
m_Value = value;
|
||||
}
|
||||
|
||||
public override void SerializeAttributes( PersistanceWriter op )
|
||||
{
|
||||
op.SetString( "n", m_Name );
|
||||
op.SetInt32( "v", m_Value );
|
||||
}
|
||||
|
||||
public override void DeserializeAttributes( PersistanceReader ip )
|
||||
{
|
||||
m_Name = Utility.Intern( ip.GetString( "n" ) );
|
||||
m_Value = ip.GetInt32( "v" );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue