Further Identification stuff.

This commit is contained in:
Ottermandias 2022-11-04 16:10:29 +01:00
parent 878f69fd91
commit 68a725d51d
4 changed files with 69 additions and 5 deletions

View file

@ -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))