Add EventObj

¯\_(ツ)_/¯
This commit is contained in:
Caraxi 2020-08-29 14:42:35 +09:30
parent 6d8df89ca6
commit 7913108434
2 changed files with 22 additions and 0 deletions

View file

@ -92,6 +92,7 @@ namespace Dalamud.Game.ClientState.Actors {
return actorStruct.ObjectKind switch {
ObjectKind.Player => new PlayerCharacter(offset, actorStruct, this.dalamud),
ObjectKind.BattleNpc => new BattleNpc(offset, actorStruct, this.dalamud),
ObjectKind.EventObj => new EventObj(offset, actorStruct, this.dalamud),
_ => new Actor(offset, actorStruct, this.dalamud)
};
}

View file

@ -0,0 +1,21 @@
using System;
namespace Dalamud.Game.ClientState.Actors.Types.NonPlayer {
/// <summary>
/// This class represents an EventObj.
/// </summary>
public class EventObj : Actor {
/// <summary>
/// Set up a new EventObj 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 EventObj(IntPtr address, Structs.Actor actorStruct, Dalamud dalamud) : base(address, actorStruct, dalamud) { }
/// <summary>
/// The data ID of the NPC linking to their respective game data.
/// </summary>
public int DataId => this.actorStruct.DataId;
}
}