예제 #1
0
        public void MoveTo(Vector3 pos)
        {
            var moveTo = (DetourMoveTo.moveTo)Marshal.GetDelegateForFunctionPointer(new IntPtr(Memory.LOLBaseAddress + Offsets.MoveTo), typeof(DetourMoveTo.moveTo));

            using (var s = new StructWrapper <Vector3>(pos)){
                moveTo(BaseAddress, 2, s.Ptr, 0, 1, 0);
            }
        }
예제 #2
0
        public unsafe void PrintToChat(string text, uint type = 4)
        {
            try
            {
                using (var s = new StructWrapper <string>(text)){
                    var  chat     = (PrintChat)Marshal.GetDelegateForFunctionPointer(new IntPtr(Memory.LOLBaseAddress + Offsets.PrintChat), typeof(PrintChat));
                    uint printArg = Memory.Read <uint>((Memory.LOLBaseAddress + 0x2FC672C));

                    chat(printArg, s.Ptr, type);
                }
            } catch (Exception ex)
            {
                Frame.Log(ex.StackTrace);
            }
        }
예제 #3
0
        private unsafe void castSpellDetour(uint param1, uint param2, uint param3, uint param4, uint param5)
        {
            try
            {
                param1 = *(uint *)(*(uint *)(Memory.LOLBaseAddress + Offsets.LocalPlayer) + Offsets.Champion_SCI);
                uint spellSlot = *(uint *)(param1 + 0xC);

                Vector3 targetPos = Memory.ReadStruct <Vector3>(*(uint *)(Memory.LOLBaseAddress + Offsets.LocalPlayer) + Offsets.Position);

                Frame.Log("p1: " + param1.ToString("X") + " p2: " + param2.ToString("X") + " p3: " + param3.ToString("X") + " p4: " + param4.ToString("X") + " p5: " + param5.ToString("X") + " spellSlot: " + spellSlot);

                using (var s = new StructWrapper <Vector3>(targetPos)){
                    Memory.GetMagic.Detours["castSpell"].CallOriginal(param1, s.Ptr, s.Ptr, param4, param5);
                }
            }
            catch (Exception ex)
            {
                Frame.Log(ex.ToString());
            }
        }