Help: GetFactionReaction menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help: GetFactionReaction

    I need someone who's better at deciphering ASM than I am. I've come as far as I can go, tonight, and am starting to get a headache with all of this reverse-engineering. Kynox, anyone, help me out!

    Okay, so I've been working on how to determine how an enemy reacts to me (aggressive, neutral, friendly, etc.) and have started, but not finished, reverse-engineering the class method CUnit->GetUnitReaction(CUnit unit) (thanks to Kynox for the address, supplied in his InProcess Object Dumper). Here is what I've found:
    CUnit->GetUnitReaction grabs the faction for unit1--faction is held at [[unit1+0x120]+0x74]--(the class object from which the method has been called) and the base address for unit2 (the unit against which unit1 is being compared) and passes them as arguments to a subroutine I've affectionately named GetFactionReaction(DWORD unit1faction, DWORD unit2).

    GetFactionReaction then gleans unit2's faction using the same method as above and gets two addresses representing the two factions in a list (linked-list?) held in memory. It then passes these two addresses to another subroutine (hereafter known as CompareFactionHash, for lack of a better name) and THIS is the part that I have trouble following. CompareFactionHash is 0x005C8900.

    Here's the relevant ASM for GetFactionReaction:
    NoMorePasting.com

    And CompareFactionHash (WARNING: this is a long text-bomb, which is why I'm having such trouble with it).
    NoMorePasting.com

    Thanks to whomever attempts to help. I'm really in the dark as to how it compares the two factions and gets how one reacts to the other.




    Note: If you are debugging and you want to see what faction is what, convert your faction to decimal and go to http://www.thottbot.com/f#### where #### is the number of your faction. For instance, http://www.thottbot.com/f6 is the Tauren faction.

    Help: GetFactionReaction
  2. #2
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, I dealt with the headache of deciphering what was going on:
    NoMorePasting.com

    And my C# equivalent:
    NoMorePasting.com

    Full GetUnitReaction code (C#):
    NoMorePasting.com

    Have fun. Have updated my modification journal, as well. See the thread here.

  3. #3
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i note in your code:

    int factionIndex = Memory.ReadInt(hProcess, 0x93E80C);
    int factionPointer = Memory.ReadInt(hProcess, 0x93E81;
    int totalFactions = Memory.ReadInt(hProcess, 0x93E80;


    (unit1 + 0x120)) + 0x74));

    where do i get the address for unit1 and unit2 ? what is this value in terms of the objects in WOW? is this the base address of a WOW object?

    does unit1/unit2 fit into this listing anywhere?

    TWoWObject = record
    DontCare1: Integer;//0x00
    DontCare2: Integer;//0x04
    DontCare3: Integer;//0x08 pointer to compl. struct i.e. eObjectFields
    DontCare4: Integer;//0x0C end of compl. struct
    DontCare5: Integer;//0x10
    ObjectType: Integer; //0x14 == OBJECT TYPE LIST!
    DontCare7: Integer;//0x18
    DontCare8: Integer;//0x1C
    DontCare9: Integer;//0x20
    DontCare10: Integer;//0x24 ptr to item-struct?
    PtrCheck: Integer;//0x28 PtrCheck == NextPtr while NextPtr --> WoWObject
    DontCare12: Integer;//0x2C
    GUID: Int64; //0x30 GUID
    DontCare13: Integer;//0x38 end of each item-struct element (ptr to the next)?
    NextPtr: Integer; //0x3C
    end;

    thanks for your sharing and for your thorough method of posting-

  4. #4
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, unit1 and unit2 is just the base address of the two units.

  5. #5
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply. i'll take a look at this in a bit.

    my bot is fully working now. it kills/ skins/ loots/ mines, has custom combat scripts.

    i need to work out how to ressurect, etc. next.

    the reason i was asking about this is because my way of doing this is 98% perfect, but not always. so if i could work out the correct way to get the neutral/friendly/hostile thing my bot would not make some unintended errors in some places.

    if you need any help about anything, pm me or ask for it in the forums. i have alot going on but i check here fairly regularly.

    thanks for the code posting-

Similar Threads

  1. HELP: Gold Scam Exploit
    By GoldDragon in forum World of Warcraft General
    Replies: 11
    Last Post: 01-23-2007, 07:26 PM
  2. Banner Ad Redesign help
    By Matt in forum Community Chat
    Replies: 57
    Last Post: 07-08-2006, 08:40 PM
  3. Help WoW Fish-Bot
    By Eliteplague in forum World of Warcraft General
    Replies: 1
    Last Post: 05-07-2006, 08:36 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 11:07 AM. 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