[wotlkc][build:46902] NameCache offsets changed? menu

User Tag List

Results 1 to 1 of 1
  1. #1
    klumpen's Avatar Active Member
    Reputation
    18
    Join Date
    Apr 2007
    Posts
    69
    Thanks G/R
    31/12
    Trade Feedback
    2 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    [wotlkc][build:46902] NameCache offsets changed?

    Hello, it's been a while.

    My NameCache implementation broke down with the most recent build. It's been working 'fine' through builds 45506->46779.
    My best guess is the offsets to `len`(count) and `arr`(table/index/ykwim) changed.
    Symptoms include; `len` becomes ridiculously high, guid/address misses are way up and names are a garbled mess on the few hits I get. Eventually the loop runs out of bounds.
    I've yet to reinstall IDA and fire it up against the latest build.

    Code:
    pub const PLAYER_NAME_CACHE: usize = 0x2D60B10;  // see next line.
    pub const ACTUAL_PLAYER_NAME_CACHE: usize = 0x2D28A10;
    
    pub struct PlayerNameCache {
        pub base: Address,
        pub arr: Address,
        pub len: u64,
        len_addr: Address,
        proc: Memory,
    }
    
    impl PlayerNameCache {
        pub fn new(mut proc: Memory, gamebase: Address) -> Result<Self> {
            let base = proc.read_addr64(gamebase + PLAYER_NAME_CACHE)?;
            let arr = proc.read_addr64(gamebase + PLAYER_NAME_CACHE + 0x10)?;
            let len_addr = gamebase + PLAYER_NAME_CACHE + 0x8;
            let len: u64 = proc.read(len_addr)?;
    
            Ok(NameCache {
                base,
                arr,
                len,
                len_addr,
                proc,
            })
        }
    
        pub fn tick(&mut self, m: HashMap<GUID,String>) -> Result<()> {
            let len: u64 = self.proc.read(self.len_addr)?;
    
            if len != self.len {
                self.len = len
            }
    
            for n in 0..len {
                let off = 0x8 * n;
                let addr = self.proc.read_addr64(self.arr + off)?;
                if addr.is_null() {
                    continue;
                }
    
                let guid: GUID = self.proc.read(addr + 0x8)?;
                if guid.hi == 0 {
                    continue;
                }
    
                if !m.contains_key(&guid) {
                    let name = self.proc.read_char_array(addr + 0x19, 32)?;
                    m.insert(guid, name);
                }
            }
    
            Ok(())
        }
    }
    Edit: Fixed. Got IDA back in action and found PLAYER_NAME_CACHE to be at 0x2D28A10.

    Just need to sort out my tick method to issue the `next=0x0` reads I think, to reduce missed addresses & guids.
    Last edited by klumpen; 12-06-2022 at 03:36 PM.

    [wotlkc][build:46902] NameCache offsets changed?

Similar Threads

  1. Replies: 3
    Last Post: 02-27-2018, 09:36 PM
  2. patch 1.08,all offset changed
    By wineggdrop in forum Diablo 3 Memory Editing
    Replies: 24
    Last Post: 05-15-2013, 03:57 AM
  3. Offsets changing at cataclysm release?
    By Alisamix in forum WoW Memory Editing
    Replies: 3
    Last Post: 11-16-2010, 10:36 PM
  4. 3.2.2 Unit Faction offset changed?
    By Reconsider in forum WoW Memory Editing
    Replies: 2
    Last Post: 10-06-2009, 09:43 AM
  5. [World Building] Warsong Gulch Model Changes
    By [ Prototype ] in forum World of Warcraft Model Editing
    Replies: 34
    Last Post: 09-28-2007, 04:53 PM
All times are GMT -5. The time now is 08:31 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