internal static void UseItemAtPos(IntPtr ptr, Location parPos) { if (CastAtPosFunction == null) { CastAtPosFunction = Memory.Reader.RegisterDelegate <CastAtPosDelegate>(funcs.CastAtPos); } if (!ObjectManager.Instance.IsIngame) { return; } MainThread.Instance.Invoke(() => { Memory.Reader.Write((IntPtr)0xCECAC0, 64); UseItem(ptr); var pos = parPos.ToStruct; CastAtPosFunction(ref pos); }); }
internal static void CastAtPos(string parSpell, Location parPos, int parRank = -1) { if (CastAtPosFunction == null) { CastAtPosFunction = Memory.Reader.RegisterDelegate <CastAtPosDelegate>(funcs.CastAtPos); } if (!ObjectManager.Instance.IsIngame) { return; } MainThread.Instance.Invoke(() => { Memory.Reader.Write((IntPtr)0xCECAC0, 0); Spell.Instance.Cast(parSpell, parRank); var pos = parPos.ToStruct; CastAtPosFunction(ref pos); }); }