using System;
using System.Diagnostics;
using LavishScriptAPI;
using MRBot.IsxEq2.Helpers;
namespace MRBot.IsxEq2.CharacterActor
{
///
/// This DataType includes all of the data available to ISXEQ2 that is related to group members.
///
public class GroupMember : LavishScriptObject
{
#region Constructor
///
/// Constructor
///
/// LS Object
public GroupMember(LavishScriptObject copy) : base(copy) { }
#endregion
#region Members
///
/// Arcane Affliction counter. A value of -1 indicates that the affliction is incurable.
///
public int Arcane
{
get
{
Trace.WriteLine(String.Format("GroupMember:Arcane"));
return this.GetIntFromLSO("Arcane");
}
}
private string _class;
///
/// Class
///
public string Class
{
get
{
Trace.WriteLine(String.Format("GroupMember:Class"));
return _class ?? (_class = this.GetStringFromLSO("Class"));
}
}
///
/// Cursed Counter. A value of -1 indicates that the affliction is incurable.
///
public int Cursed
{
get
{
Trace.WriteLine(String.Format("GroupMember:Cursed"));
return this.GetIntFromLSO("Cursed");
}
}
///
/// Cache of EffectiveLevel
///
private int? _effectiveLevel;
///
/// Effective Level (mentored or chrono)
///
public int EffectiveLevel
{
get
{
Trace.WriteLine(String.Format("GroupMember:EffectiveLevel"));
if(!_effectiveLevel.HasValue)
_effectiveLevel = this.GetIntFromLSO("EffectiveLevel");
return _effectiveLevel.Value;
}
}
///
/// Elemental Affliction Counter. A value of -1 indicates that the affliction is incurable.
///
public int Elemental
{
get
{
Trace.WriteLine(String.Format("GroupMember:Elemental"));
return this.GetIntFromLSO("Elemental");
}
}
///
/// Hit Points
///
public int HitPoints
{
get
{
Trace.WriteLine(String.Format("GroupMember:HitPoints"));
return this.GetIntFromLSO("HitPoints");
}
}
///
/// Cache of ID
///
private int? _iD;
///
/// ID
///
public int ID
{
get
{
Trace.WriteLine(String.Format("GroupMember:ID"));
if(!_iD.HasValue)
_iD = this.GetIntFromLSO("ID");
return _iD.Value;
}
}
///
/// Returns true if actor is afflicted by arcane, noxious, etc.
///
public bool IsAfflicted
{
get
{
Trace.WriteLine(String.Format("GroupMember:IsAfflicted"));
return this.GetBoolFromLSO("IsAfflicted");
}
}
///
/// Cache of Level
///
private int? _level;
///
/// Level
///
public int Level
{
get
{
Trace.WriteLine(String.Format("GroupMember:Level"));
if(!_level.HasValue)
_level = this.GetIntFromLSO("Level");
return _level.Value;
}
}
///
/// Max Hit Points
///
public int MaxHitPoints
{
get
{
Trace.WriteLine(String.Format("GroupMember:MaxHitPoints"));
return this.GetIntFromLSO("MaxHitPoints");
}
}
///
/// Max Power
///
public int MaxPower
{
get
{
Trace.WriteLine(String.Format("GroupMember:MaxPower"));
return this.GetIntFromLSO("MaxPower");
}
}
///
/// Cache of Name
///
private string _name;
///
/// Name
///
public string Name
{
get
{
Trace.WriteLine(String.Format("GroupMember:Name"));
return _name ?? (_name = this.GetStringFromLSO("Name"));
}
}
///
/// Noxious Affliction Counter. A value of -1 indicates that the affliction is incurable.
///
public int Noxious
{
get
{
Trace.WriteLine(String.Format("GroupMember:Noxious"));
return this.GetIntFromLSO("Noxious");
}
}
///
/// Cache of PetID
///
private int? _petID;
///
/// ID of the members pet, if any. A value of -1 indicates that there is no pet.
///
public int PetID
{
get
{
Trace.WriteLine(String.Format("GroupMember:PetID"));
if(!_petID.HasValue)
_petID = this.GetIntFromLSO("PetID");
return _petID.Value;
}
}
///
/// Power
///
public int Power
{
get
{
Trace.WriteLine(String.Format("GroupMember:Power"));
return this.GetIntFromLSO("Power");
}
}
///
/// Cache of Race
///
private string _race;
///
/// Race
///
public string Race
{
get
{
Trace.WriteLine(String.Format("GroupMember:Race"));
return _race ?? (_race = this.GetStringFromLSO("Race"));
}
}
///
/// If in a raid, the group number 1-4. Otherwise NULL.
///
public int RaidGroupNum
{
get
{
Trace.WriteLine(String.Format("GroupMember:RaidGroupNum"));
return GetMember("RaidGroupNum");
}
}
/// TODO: Test GroupMember.RaidRole
///
/// Raid Role Assigned
///
public int RaidRole
{
get
{
Trace.WriteLine(String.Format("GroupMember:RaidRole"));
return this.GetIntFromLSO("RaidRole");
}
}
///
/// Accesses the Actor class of the GroupMember
///
public Actor ToActor
{
get
{
Trace.WriteLine(String.Format("GroupMember:ToActor"));
return new Actor(this.GetMember("ToActor"));
}
}
///
/// Trauma Affliction Counter. A value of -1 indicates that the affliction is incurable.
///
public int Trauma
{
get
{
Trace.WriteLine(String.Format("GroupMember:Trauma"));
return this.GetIntFromLSO("Trauma");
}
}
///
/// Current Zone name
///
public string ZoneName
{
get
{
Trace.WriteLine(String.Format("GroupMember:ZoneName"));
return this.GetStringFromLSO("ZoneName");
}
}
#endregion
}
}