muffin v7.4.15
This commit is contained in:
parent
9bf3dbdf69
commit
0b1b2d38c7
14 changed files with 1215 additions and 1057 deletions
|
|
@ -121,7 +121,7 @@ internal sealed class GameFunctions
|
|||
return false;
|
||||
}
|
||||
|
||||
public IGameObject? FindObjectByDataId(uint dataId, Dalamud.Game.ClientState.Objects.Enums.ObjectKind? kind = null)
|
||||
public IGameObject? FindObjectByDataId(uint dataId, Dalamud.Game.ClientState.Objects.Enums.ObjectKind? kind = null, bool warnIfMissing = true)
|
||||
{
|
||||
foreach (IGameObject item in _objectTable)
|
||||
{
|
||||
|
|
@ -132,7 +132,10 @@ internal sealed class GameFunctions
|
|||
return item;
|
||||
}
|
||||
}
|
||||
_logger.LogWarning("Could not find GameObject with dataId {DataId}", dataId);
|
||||
if (warnIfMissing)
|
||||
{
|
||||
_logger.LogWarning("Could not find GameObject with dataId {DataId}", dataId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -581,6 +584,25 @@ internal sealed class GameFunctions
|
|||
return ptr->CurrentFate->FateId;
|
||||
}
|
||||
|
||||
public unsafe bool IsFateStillActive(ushort fateId)
|
||||
{
|
||||
if (fateId == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
FateContext* fateById = ptr->GetFateById(fateId);
|
||||
if (fateById == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return fateById->State == FateState.Running;
|
||||
}
|
||||
|
||||
public uint GetItemLevel(uint itemId)
|
||||
{
|
||||
return (_dataManager.GetExcelSheet<Item>()?.GetRowOrDefault(itemId))?.LevelItem.RowId ?? 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue