/// <summary> /// Initializes a new instance of the <see cref="PlayerCharacter"/> class. /// This represents a player character. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public PlayerCharacter(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { var companyTagBytes = new byte[5]; Marshal.Copy(this.Address + ActorOffsets.CompanyTag, companyTagBytes, 0, companyTagBytes.Length); this.CompanyTag = Encoding.UTF8.GetString(companyTagBytes.TakeWhile(c => c != 0x0).ToArray()); }
/// <summary> /// Set up a new player character with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public PlayerCharacter(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base( address, actorStruct, dalamud) { // We need to read the FC tag here, since we can't read it in the struct due to alignment issues var fcTagBytes = new byte[5]; Marshal.Copy(this.Address + ActorOffsets.CompanyTag, fcTagBytes, 0, fcTagBytes.Length); CompanyTag = Encoding.UTF8.GetString(fcTagBytes.TakeWhile(x => x != 0x00).ToArray()); }
/// <summary> /// Initializes a new instance of the <see cref="Chara"/> class. /// This represents a non-static entity. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> protected Chara(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { }
/// <summary> /// Initialize a representation of a basic FFXIV actor. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public Actor(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) { this.actorStruct = actorStruct; this.dalamud = dalamud; this.Address = address; }
/// <summary> /// Set up a new Chara with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> public Chara(Structs.Actor actorStruct) : base(actorStruct) { }
/// <summary> /// Set up a new BattleNpc with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public BattleNpc(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { }
/// <summary> /// Initializes a new instance of the <see cref="EventObj"/> class. /// This represents an Event Object. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public EventObj(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { }
/// <summary> /// Set up a new player character with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> public PlayerCharacter(Structs.Actor actorStruct) : base(actorStruct) { }
/// <summary> /// Set up a new player character with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> /// <param name="dalamud">A dalamud reference needed to access game data in Resolvers.</param> /// <param name="address">The address of this actor in memory.</param> public PlayerCharacter(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { }
/// <summary> /// Initialize a representation of a basic FFXIV actor. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> public Actor(Structs.Actor actorStruct) { this.actorStruct = actorStruct; }
/// <summary> /// Set up a new NPC with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> public Npc(Structs.Actor actorStruct) : base(actorStruct) { }
/// <summary> /// Set up a new BattleNpc with the provided memory representation. /// </summary> /// <param name="actorStruct">The memory representation of the base actor.</param> public BattleNpc(Structs.Actor actorStruct) : base(actorStruct) { }