示例#1
0
 internal static void OnRightClickObject(IntPtr parPlayerPtr, int parAutoLoot)
 {
     if (OnRightClickObjectFunction == null)
     {
         OnRightClickObjectFunction = Memory.Reader.RegisterDelegate <OnRightClickObjectDelegate>((IntPtr)Constants.Offsets.Functions.OnRightClickObject);
     }
     OnRightClickObjectFunction(parPlayerPtr, parAutoLoot);
 }
 internal static void Apply()
 {
     if (_OnRightClickObjectHook == null)
     {
         byte[] old = Memory.Reader.ReadBytes((IntPtr)0x005F8660, 8);
         _OnRightClickObjectDelegate = Memory.Reader.RegisterDelegate <OnRightClickObjectDelegate>((IntPtr)0x005F8660);
         _OnRightClickObjectHook     = Memory.Reader.Detours.CreateAndApply(_OnRightClickObjectDelegate, new OnRightClickObjectDelegate(OnRightClickObjectHookFunc), "OnRightClickObjectHook");
         byte[] custom       = Memory.Reader.ReadBytes((IntPtr)0x005F8660, 8);
         Hack   autolootUnit = new Hack((IntPtr)0x005F8660, custom, old, "OnRightClickObject");
         AntiWarden.HookWardenMemScan.AddHack(autolootUnit);
     }
     _OnRightClickObjectHook.Apply();
 }
示例#3
0
        internal static void OnRightClickObject(IntPtr parPlayerPtr, int parAutoLoot)
        {
            if (!ObjectManager.Instance.IsIngame)
            {
                return;
            }
            if (OnRightClickObjectFunction == null)
            {
                OnRightClickObjectFunction =
                    Memory.Reader.RegisterDelegate <OnRightClickObjectDelegate>(funcs.OnRightClickObject);
            }

            MainThread.Instance.Invoke(() => OnRightClickObjectFunction(parPlayerPtr, parAutoLoot));
        }