muffin v7.5.5
This commit is contained in:
parent
a8f2c1df37
commit
6266f9e6b7
110 changed files with 14907 additions and 6073 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue