mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:27:22 +01:00
use index from gameobject to set set temp mods
This commit is contained in:
parent
814b24ebd8
commit
9a049c0d01
6 changed files with 23 additions and 73 deletions
|
|
@ -92,18 +92,6 @@ public class DalamudUtilService : IHostedService
|
|||
return (IntPtr)mgr->LookupBuddyByOwnerObject((BattleChara*)playerPointer);
|
||||
}
|
||||
|
||||
public int? GetIndexFromObjectTableByName(string characterName)
|
||||
{
|
||||
for (int i = 0; i < _objectTable.Length; i++)
|
||||
{
|
||||
if (_objectTable[i] == null) continue;
|
||||
if (_objectTable[i]!.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player) continue;
|
||||
if (string.Equals(_objectTable[i]!.Name.ToString(), characterName, StringComparison.Ordinal)) return i;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public unsafe IntPtr GetMinion(IntPtr? playerPointer = null)
|
||||
{
|
||||
playerPointer ??= PlayerPointer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue