Merge pull request #162 from Caraxi/dev

Add EventObj
This commit is contained in:
goaaats 2020-09-08 23:37:38 +02:00 committed by GitHub
commit 82a2b7d2c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}
}