mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
commit
82a2b7d2c8
2 changed files with 22 additions and 0 deletions
|
|
@ -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)
|
||||
};
|
||||
}
|
||||
|
|
|
|||
21
Dalamud/Game/ClientState/Actors/Types/NonPlayer/EventObj.cs
Normal file
21
Dalamud/Game/ClientState/Actors/Types/NonPlayer/EventObj.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue