[1.12.1] can't call CTM ! menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Lywbringer's Avatar Member
    Reputation
    11
    Join Date
    Sep 2022
    Posts
    14
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [1.12.1] can't call CTM !

    This time I can't use CTM because of the struct XYZ (position), on Ghidra the instruction that is blocking me is:

    Code:
    _DAT_00c4d890 = *clickPos; //(006111d8)
    _DAT_00c4d894 = clickPos[1]; //(006111df)
    _DAT_00c4d898 = clickPos[2]; //(006111eb)
    it shows an error on acces memory.

    This is the function I am using:

    Code:
    void LocalPlayer::ClickToMove(ClickType clickType, unsigned long long interactGuid, Position position) {
        struct XYZ* xyz = new struct XYZ;
        xyz->X = position.X; xyz->Y = position.Y; xyz->Z = position.Z;
        unsigned long long* interactGuidPtr = 0;
        typedef void __fastcall func(uintptr_t, ClickType, unsigned long long*, XYZ*, float);
        func* function = (func*)CLICK_TO_MOVE_FUN_PTR;
        function(Pointer, clickType, interactGuidPtr, xyz, 2);
    }
    Code:
    const uintptr_t CLICK_TO_MOVE_FUN_PTR = 0x00611130;
    and this is the struct I am using:

    Code:
    struct XYZ {
        int X;
        int Y;
        int Z;
    };
    I tried a lot of things, first __thiscall doesn't work so I am using __fastcall instead, then I can't use [StructLayout(LayoutKind.Sequential)] like in C# for my struct but I read that it isn't necessary in C.

    I have been stuck on this for 2 days...

    EDIT: AGAIN I found the solution right after posting !

    The calling convention was indeed __thiscall and I need to pass:

    Code:
    typedef void (__thiscall* func)(uintptr_t, ClickType, unsigned long long*, float*, float);
    So this is the final function:

    Code:
    void LocalPlayer::ClickToMove(ClickType clickType, unsigned long long interactGuid, Position position) {
        float* xyz = new float[3];
        xyz[0] = position.X; xyz[1] = position.Y; xyz[2] = position.Z;
        unsigned long long* interactGuidPtr = &interactGuid;
        typedef void (__thiscall* func)(uintptr_t, ClickType, unsigned long long*, float*, float);
        func function = (func)CLICK_TO_MOVE_FUN_PTR;
        function(Pointer, clickType, interactGuidPtr, xyz, 2);
    }
    I don't even need a struct.
    Last edited by Lywbringer; 09-22-2022 at 04:42 AM.

    [1.12.1] can't call CTM !
  2. Thanks jimmys96, Corthezz (2 members gave Thanks to Lywbringer for this useful post)

Similar Threads

  1. Can't call export after re-injecting managed DLL, but why?
    By Viano in forum WoW Memory Editing
    Replies: 1
    Last Post: 08-18-2018, 03:42 PM
  2. [1.12] Trouble with ClntObjMgrObjectPtr calling convention
    By Saridormi in forum WoW Memory Editing
    Replies: 6
    Last Post: 06-24-2016, 05:57 AM
  3. [MaNGOS]WoW ver.1.12.1 Can't do preQ/access instances!
    By majjer in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-02-2010, 03:40 PM
  4. Can somebody give me a 1.12 version of WoW?
    By pro jumper in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 10-28-2007, 03:06 PM
  5. Possible to add music files that can be called up?
    By unklcod in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 10-22-2007, 08:27 PM
All times are GMT -5. The time now is 09:05 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search