[Classic] 1.13.5.35753 CGItem_C::Use menu

User Tag List

Results 1 to 3 of 3
  1. #1
    scimmy's Avatar Active Member
    Reputation
    52
    Join Date
    Jul 2020
    Posts
    54
    Thanks G/R
    1/33
    Trade Feedback
    0 (0%)
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    [Classic] 1.13.5.35753 CGItem_C::Use

    Was reversing some lua API garbage, as usual--I wanted to use my hearthstone in my bot, so here's some reversing info that I've done to accomplish this.

    Code:
    uint64_t CGItemUseOffset = 0x984660;
    How to use an item on yourself:

    Code:
    bool CGItemUse(WowItem* item) {
        WowGUID target_guid = { 0, 0 };
        WowGUID v22 = { 0, 0 };
        return reinterpret_cast<bool(__fastcall*)(WowItem* item_ptr, WowGUID* guid, bool unk1, WowGUID* unk2)>(baseAddress + CGItemUseOffset)(item, &target_guid, 0, &v22);
    }
    Too lazy to find this on the vtable...and too lazy to figure out what unk1 and unk2 here are. unk2 seems to be some out-parameter that's also 128-bit data.

    target_guid is obtained by the following simplified pseudocode:
    Code:
    v16 = (_BYTE *)lua_tolstring_7FF60DD9C630(v2, 2u, 0i64);
    sub_7FF60D871450(v16, 1i64, (__int64)&v20, 1, 0)
    Inside sub_7FF60D871450, it does some stuff to grab the GUID of what your "target" is. If your target is "player", which is yourself, v20 is just filled with a null WowGUID--hence the code WowGUID target_guid = { 0, 0 };

    If someone's interested in the bag garbage that I've also reversed, please let me know and I'll find some time to post it.

    [Classic] 1.13.5.35753 CGItem_C::Use
  2. Thanks Ashoran, Corthezz, maikel233 (3 members gave Thanks to scimmy for this useful post)
  3. #2
    ejt's Avatar Contributor
    Reputation
    209
    Join Date
    Mar 2008
    Posts
    166
    Thanks G/R
    3/111
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing its this one that I have:

    Code:
    DECLARE_FUNC(Item_UseItem, bool, __fastcall, (blizz::CGItem* _this, object_guid* target, bool skip_confirm, uint16_t* unk_2), detail::FunctionOffsets::Item_UseItem);
    3rd argument is a boolean whether to show the confirmation dialog box for example override enchantments on gear. Or so I think, never really went deep into these functions. Interesting that you found 4th argument to be a guid pointer, I found it to be 16-bit integer.

  4. #3
    scimmy's Avatar Active Member
    Reputation
    52
    Join Date
    Jul 2020
    Posts
    54
    Thanks G/R
    1/33
    Trade Feedback
    0 (0%)
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ejt View Post
    I'm guessing its this one that I have:

    Code:
    DECLARE_FUNC(Item_UseItem, bool, __fastcall, (blizz::CGItem* _this, object_guid* target, bool skip_confirm, uint16_t* unk_2), detail::FunctionOffsets::Item_UseItem);
    3rd argument is a boolean whether to show the confirmation dialog box for example override enchantments on gear. Or so I think, never really went deep into these functions. Interesting that you found 4th argument to be a guid pointer, I found it to be 16-bit integer.
    I'll look more into the 4th parameter. I remember seeing it as a int64, which then had an assignment to a 128-bit value in the function it was passed into, which made me believe it was a pointer to a GUID.

Similar Threads

  1. WoW Classic 1.13.2 (30550) ObjMgr
    By serioux1337 in forum WoW Memory Editing
    Replies: 4
    Last Post: 05-31-2019, 05:38 PM
  2. [Classic] - 1.13.2.30112 - (Beta)
    By Icesythe7 in forum WoW Memory Editing
    Replies: 0
    Last Post: 04-18-2019, 12:26 AM
  3. [Question] Simple bot for right clicking at xyz position Wow classic 1.13/Arctium
    By Andrehoejmark in forum WoW Bots Questions & Requests
    Replies: 2
    Last Post: 02-11-2019, 04:50 AM
  4. WoW Classic 1.13 Sandbox
    By raido in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 10-24-2018, 06:23 PM
  5. [Selling] Level 60 Hunter. Classic Rank 13 Warlord
    By Tschaenter in forum WoW-EU Account Buy Sell Trade
    Replies: 1
    Last Post: 11-04-2013, 03:21 PM
All times are GMT -5. The time now is 11:56 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