using System;
using System.Diagnostics;
using LavishScriptAPI;
using MRBot.IsxEq2.Helpers;
namespace MRBot.IsxEq2.Utility
{
///
/// This DataType includes all of the data available to ISXEQ2 that is related to the current zone.
///
public class Zone : LavishScriptObject
{
#region Constructor
///
/// Constructor
///
/// LS Object
public Zone(LavishScriptObject copy) : base(copy) { }
///
/// Constructor - Constructs a Zone object based on the LavishScript object Zone
///
public Zone() : base(LavishScript.Objects.GetObject("Zone")) { }
#endregion
#region Members
///
/// Cache of ID
///
private int? _iD;
///
/// The ID of the zone
///
public int ID
{
get
{
Trace.WriteLine(String.Format("Zone:ID"));
if(!_iD.HasValue)
_iD = this.GetIntFromLSO("ID");
return _iD.Value;
}
}
///
/// Cache of Name
///
private string _name;
///
/// The name of the zone
///
public string Name
{
get
{
Trace.WriteLine(String.Format("Zone:Name"));
return _name ?? (_name = this.GetStringFromLSO("Name"));
}
}
///
/// Cache of ShortName
///
private string _shortName;
///
/// The short name of the zone
///
public string ShortName
{
get
{
Trace.WriteLine(String.Format("Zone:ShortName"));
return _shortName ?? (_shortName = this.GetStringFromLSO("ShortName"));
}
}
#endregion
}
}