Reading Death Knight rune states from memory menu

User Tag List

Results 1 to 10 of 10
  1. #1
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading Death Knight rune states from memory

    So I was playing around with an idea with a death knight, but in order to do it I need to retrieve the rune states.

    Apoc posted where it is located in this thread:
    http://www.mmowned.com/forums/world-...nic-power.html

    there it says it should be at
    Code:
    Memory.ReadUInt(UnitDescriptor + (uint)GDescriptors.eUnitFields.UNIT_FIELD_POWER6);
    I'm reading at this address and not getting anything useful. I did search for this and found multiple threads, but they all have static addresses. Can anyone provide me with advice on reading runes at this address or if I'm looking in the wrong place altogether? Thanks.

    Reading Death Knight rune states from memory
  2. #2
    Mr.Jebus Christ's Avatar Banned
    Reputation
    117
    Join Date
    Mar 2007
    Posts
    351
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    UNIT_FIELD_POWER6 does not contain runes.

  3. #3
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Terrorblade View Post
    UNIT_FIELD_POWER6 does not contain runes.
    ah ok thanks. Just out of curiosity what is the unit field for?

    On Topic:

    any ideas where I should be looking in then?

  4. #4
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    PLAYER_RUNE_REGEN_1 = 0x519,
    Found in ~10s. Try F3 if you use Firefox.
    ps: I don't know if it's what you're looking for, but looks like.

  5. #5
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the best solution is always to look up a matching the function with ida if you can't find it in the dump thread, some things are quite easy to reverse...
    API GetRuneCooldown - WoWWiki - Your guide to the World of Warcraft
    so you most likely want the boolean value

    Code:
    signed int __usercall lua_GetRuneCooldown<eax>(int a1<esi>, int a2)
    {
      int v2; // ecx@2
      int v3; // esi@2
      __int64 v4; // qax@3
      void *v5; // ecx@3
      int v6; // edi@3
      int v7; // ebx@4
      double v8; // st7@4
      double v9; // st7@5
      float v10; // ST24_4@7
      int v12; // ST1C_4@10
      int v13; // [sp+Ch] [bp-10h]@2
    
      if ( !FrameScript__IsNumber(a2, 1) )
      {
        FrameScript_DisplayError(a2, "Usage: GetRuneCooldown(slot)", v12);
        return 0;
      }
      v13 = a1;
      v3 = (signed int)FrameScript_ToNumber(a2, 1) - 1;
      if ( (unsigned int)v3 > 7 )
      {
        FrameScript_DisplayError(a2, "Invalid slot", v13);
        return 0;
      }
      LODWORD(v4) = ClntObjMgrGetActivePlayer(v2);
      v6 = ClntObjMgrObjectPtr(v4, 16);
      if ( !v6 )
        return 0;
      v7 = sub_754FF0(v5, v3);
      v8 = *(float *)(*(_DWORD *)(v6 + 4104) + 4 * sub_754F90(v3, 0) + 4628);
      if ( v8 <= 0.009999999776482582 )
        v9 = 0.0;
      else
        v9 = 1.0 / v8;
      FrameScript_PushNumber(a2, (double)(unsigned int)v7 * 0.001);
      v10 = v9;
      FrameScript_PushNumber(a2, v10);
      FrameScript_pushboolean(a2, (unsigned int)v7 <= 0);
      return 3;
    }

    the interesting part:
    v7 = sub_754FF0(v5, v3);
    FrameScript_pushboolean(a2, (unsigned int)v7 <= 0);

    v5 is just a this pointer, uninteresting for us: void *v5; // ecx@3
    and v3 is the rune index -1, means runes have index 0-5: v3 = (signed int)FrameScript_ToNumber(a2, 1) - 1;

    Code:
    int __thiscall sub_754FF0(void *this, int a2)
    {
      int result; // eax@1
      __int64 v3; // qax@1
    
      LODWORD(v3) = ClntObjMgrGetActivePlayer(this);
      result = ClntObjMgrObjectPtr(v3, 16);
      if ( result )
        result = dword_C5427C[a2];
      return result;
    }
    a2 = v3

    that means if we want to know if a rune is ready we just have to do (if i didn't make a mistake :P):

    if (readUInt(0xC5427C+i*4) <=0) //where i is rune index 0-5
    rune on cooldown


    im pretty sure there will also be a descriptor field for it, but that's how the lua function does it

  6. #6
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    a2 = v3

    that means if we want to know if a rune is ready we just have to do (if i didn't make a mistake :P):

    if (readUInt(0xC5427C+i*4) <=0) //where i is rune index 0-5
    rune on cooldown


    im pretty sure there will also be a descriptor field for it, but that's how the lua function does it
    Thanks a bunch for the help. Maybe I'm doing it wrong or something but I'm reading from that address via:
    Code:
    Memory.ReadUInt((0x00C5427C) * 0x04);
    Assuming I'm reading the first rune at 0, I'm getting like crazy values like 218083889 and such lol. I'm not asking for offset handouts or anything, but just seeing if this is correct or not or if I'm making a mistake.

    ---------- Post added at 11:42 AM ---------- Previous post was at 10:57 AM ----------

    Originally Posted by eLaps View Post
    Code:
    PLAYER_RUNE_REGEN_1 = 0x519,
    Found in ~10s. Try F3 if you use Firefox.
    ps: I don't know if it's what you're looking for, but looks like.
    Thanks for the help. I'm not sure if that's it. Basically I'm looking for a place to check if "x" rune is on cooldown (blood unholy frost death). I'm not familiar with the offset you posted. I don't know if that's what it does or not.

  7. #7
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    readUInt(0xC5427C+i*4)
    is something different than
    ReadUInt((0x00C5427C) * 0x04);


    i think you should spend more time to understand what you are actually doing

  8. #8
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    readUInt(0xC5427C+i*4)
    is something different than
    ReadUInt((0x00C5427C) * 0x04);


    i think you should spend more time to understand what you are actually doing
    Try to have some consistency in your notations... don't start mixing them. Either put

    [[foo]+bar]

    or

    Read(Read(foo)+bar)
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  9. #9
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but it's only a single address you have to read from, no foo and bar :P

    Code:
    bool IsRuneReady(uint runeIndex)
    {
    	uint foo = 0xC5427C + runeIndex*4;
    	uint result = readUInt(foo);
    	return (result <= 0)
    }
    easy enough?
    Last edited by mnbvc; 06-09-2010 at 11:16 AM.

  10. #10
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    readUInt(0xC5427C+i*4)
    is something different than
    ReadUInt((0x00C5427C) * 0x04);


    i think you should spend more time to understand what you are actually doing


    oh gosh I feel so stupid. >.< Yea I got it now You are completely right. I was just failing in my code. My mistake.

Similar Threads

  1. Death Knights runes
    By kisjaksi in forum WoW Memory Editing
    Replies: 3
    Last Post: 08-19-2010, 04:51 AM
  2. Death Knight Runes
    By mordok in forum WoW Memory Editing
    Replies: 15
    Last Post: 01-07-2010, 03:30 PM
  3. Death Knight Talents -- Taken from WotLK Leak
    By ageeoop in forum World of Warcraft General
    Replies: 5
    Last Post: 06-27-2008, 12:00 AM
  4. Death Knight spell footage from the alpha!
    By Patchumz in forum World of Warcraft General
    Replies: 5
    Last Post: 05-23-2008, 04:44 PM
All times are GMT -5. The time now is 01:30 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