mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Further Identification stuff.
This commit is contained in:
parent
878f69fd91
commit
68a725d51d
4 changed files with 69 additions and 5 deletions
|
|
@ -194,6 +194,16 @@ public partial class ActorManager
|
|||
public unsafe ActorIdentifier FromObject(GameObject? actor)
|
||||
=> FromObject((FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)(actor?.Address ?? IntPtr.Zero));
|
||||
|
||||
public ActorIdentifier CreateIndividual(IdentifierType type, ByteString name, ushort homeWorld, ObjectKind kind, uint dataId)
|
||||
=> type switch
|
||||
{
|
||||
IdentifierType.Player => CreatePlayer(name, homeWorld),
|
||||
IdentifierType.Owned => CreateOwned(name, homeWorld, kind, dataId),
|
||||
IdentifierType.Special => CreateSpecial((SpecialActor)homeWorld),
|
||||
IdentifierType.Npc => CreateNpc(kind, dataId, homeWorld),
|
||||
_ => ActorIdentifier.Invalid,
|
||||
};
|
||||
|
||||
public ActorIdentifier CreatePlayer(ByteString name, ushort homeWorld)
|
||||
{
|
||||
if (!VerifyWorld(homeWorld) || !VerifyPlayerName(name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue