1
0
Fork 0
forked from aly/qstbak

muffin v7.5.5

This commit is contained in:
alydev 2026-08-17 20:25:32 +10:00
parent a8f2c1df37
commit 6266f9e6b7
110 changed files with 14907 additions and 6073 deletions

View file

@ -123,13 +123,17 @@ internal sealed class GameFunctions
public IGameObject? FindObjectByDataId(uint dataId, Dalamud.Game.ClientState.Objects.Enums.ObjectKind? kind = null, bool warnIfMissing = true)
{
foreach (IGameObject item in _objectTable)
for (int i = 0; i < _objectTable.Length; i++)
{
Dalamud.Game.ClientState.Objects.Enums.ObjectKind objectKind = item.ObjectKind;
bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Pc || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.HousingEventObject) ? true : false);
if (!flag && (item == null || item.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || item.IsTargetable) && item.BaseId == dataId && (!kind.HasValue || kind.Value == item.ObjectKind))
IGameObject gameObject = _objectTable[i];
if (gameObject != null)
{
return item;
Dalamud.Game.ClientState.Objects.Enums.ObjectKind objectKind = gameObject.ObjectKind;
bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Pc || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.HousingEventObject) ? true : false);
if (!flag && (gameObject == null || gameObject.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || gameObject.IsTargetable) && gameObject.BaseId == dataId && (!kind.HasValue || kind.Value == gameObject.ObjectKind))
{
return gameObject;
}
}
}
if (warnIfMissing)