Cache collections instead of looking them up for every single file.

This commit is contained in:
Ottermandias 2022-11-18 19:53:06 +01:00
parent f676bd1889
commit 2fac923452
12 changed files with 194 additions and 28 deletions

View file

@ -162,10 +162,15 @@ public partial class ActorManager
((FFXIVClientStructs.FFXIV.Client.Game.Character.Character*)actor)->NameID);
}
case ObjectKind.EventNpc:
{
var dataId = actor->DataID;
// Special case for squadron that is also in the game functions, cf. E8 ?? ?? ?? ?? 89 87 ?? ?? ?? ?? 4C 89 BF
if (dataId == 0xf845d)
dataId = actor->GetNpcID();
return check
? CreateNpc(ObjectKind.EventNpc, actor->DataID, actor->ObjectIndex)
: CreateIndividualUnchecked(IdentifierType.Npc, ByteString.Empty, actor->ObjectIndex, ObjectKind.EventNpc,
actor->ObjectIndex);
? CreateNpc(ObjectKind.EventNpc, dataId, actor->ObjectIndex)
: CreateIndividualUnchecked(IdentifierType.Npc, ByteString.Empty, actor->ObjectIndex, ObjectKind.EventNpc, dataId);
}
case ObjectKind.MountType:
case ObjectKind.Companion:
case (ObjectKind)15: // TODO: CS Update