Understanding localized strings (how to read them OOP) menu

Shout-Out

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Main

    Well how do I access this OOP? B/c it seems like what you're referring to would only matter if I'm doing injection. Since I'd have to check the stack pointer to determine where the structure actually is.

    All I can do now is jump to the spell struct row as follows:

    Code:
    	UInt32 spellDbc = 0xD2E300;
    	int spellID = 15616;
    	UInt32 minIndex = [memory readInt:spellDbc + 0x10 withSize:sizeof(UInt32)];
    	UInt32 maxIndex = [memory readInt:spellDbc + 0xC withSize:sizeof(UInt32)];
    	
    	if ( spellID >= minIndex && spellID <= maxIndex ){
    		
    		UInt32 spellRow = [memory readInt:spellDbc + 0x20 withSize:sizeof(UInt32)] + ( 4 * (spellID - minIndex) );
    		UInt32 spellStruct = [memory readInt:spellRow withSize:sizeof(UInt32)];
    		NSLog(@"Spell Row: 0x%X  Spell struct: 0x%X", spellRow, spellStruct);
    		
    		// we don't have a pointer to a struct /cry
    		if ( spellStruct == 0 ){
    			return;
    		}
    		
    		// now I have a pointer to the spell struct, how do I now get to the name/description etc..?
    	}
    But then I get there, and I don't know how to actually access to the name/description. I will always land on the correct spell ID (which is part of the struct here):
    Spell.dbc - wiki.nibbits.com

    so I know I'm landing on the struct, but I don't understand where I need to start "unpacking" data - or even how to do this?

    Edit: And don't worry, I WILL clean it up once I actually have working code So you won't see +0xC and +0x10 everywhere
    https://tanaris4.com

    Understanding localized strings (how to read them OOP)
  2. #17
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    @Main

    Well how do I access this OOP? B/c it seems like what you're referring to would only matter if I'm doing injection. Since I'd have to check the stack pointer to determine where the structure actually is.

    All I can do now is jump to the spell struct row as follows:

    Code:
        UInt32 spellDbc = 0xD2E300;
        int spellID = 15616;
        UInt32 minIndex = [memory readInt:spellDbc + 0x10 withSize:sizeof(UInt32)];
        UInt32 maxIndex = [memory readInt:spellDbc + 0xC withSize:sizeof(UInt32)];
        
        if ( spellID >= minIndex && spellID <= maxIndex ){
            
            UInt32 spellRow = [memory readInt:spellDbc + 0x20 withSize:sizeof(UInt32)] + ( 4 * (spellID - minIndex) );
            UInt32 spellStruct = [memory readInt:spellRow withSize:sizeof(UInt32)];
            NSLog(@"Spell Row: 0x%X  Spell struct: 0x%X", spellRow, spellStruct);
            
            // we don't have a pointer to a struct /cry
            if ( spellStruct == 0 ){
                return;
            }
            
            // now I have a pointer to the spell struct, how do I now get to the name/description etc..?
        }
    But then I get there, and I don't know how to actually access to the name/description. I will always land on the correct spell ID (which is part of the struct here):
    Spell.dbc - wiki.nibbits.com

    so I know I'm landing on the struct, but I don't understand where I need to start "unpacking" data - or even how to do this?

    Edit: And don't worry, I WILL clean it up once I actually have working code So you won't see +0xC and +0x10 everywhere
    You do that by replicating WoW. Do it like WoW does it.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #18
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    @Main

    Well how do I access this OOP? B/c it seems like what you're referring to would only matter if I'm doing injection. Since I'd have to check the stack pointer to determine where the structure actually is.

    All I can do now is jump to the spell struct row as follows:

    Code:
        UInt32 spellDbc = 0xD2E300;
        int spellID = 15616;
        UInt32 minIndex = [memory readInt:spellDbc + 0x10 withSize:sizeof(UInt32)];
        UInt32 maxIndex = [memory readInt:spellDbc + 0xC withSize:sizeof(UInt32)];
        
        if ( spellID >= minIndex && spellID <= maxIndex ){
            
            UInt32 spellRow = [memory readInt:spellDbc + 0x20 withSize:sizeof(UInt32)] + ( 4 * (spellID - minIndex) );
            UInt32 spellStruct = [memory readInt:spellRow withSize:sizeof(UInt32)];
            NSLog(@"Spell Row: 0x%X  Spell struct: 0x%X", spellRow, spellStruct);
            
            // we don't have a pointer to a struct /cry
            if ( spellStruct == 0 ){
                return;
            }
            
            // now I have a pointer to the spell struct, how do I now get to the name/description etc..?
        }
    But then I get there, and I don't know how to actually access to the name/description. I will always land on the correct spell ID (which is part of the struct here):
    Spell.dbc - wiki.nibbits.com

    so I know I'm landing on the struct, but I don't understand where I need to start "unpacking" data - or even how to do this?

    Edit: And don't worry, I WILL clean it up once I actually have working code So you won't see +0xC and +0x10 everywhere
    See my thread about OOP DBC reading. I included the unpacking func they use, and also documented what should be passed to it.

    (Hint: Check the GetLocalizedRow func in DbTable)

  4. #19
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, thanks Apoc, re-wrote your Unpacking function:
    Code:
    		Byte byteBuffer[0x5000];
    		
    		byteBuffer[0] = [memory readInt:spellStruct withSize:sizeof(Byte)];
    		int currentAddress = 1;
    		int i = 0;
    		int size = 0x2C0;
    		
    		for ( i = spellStruct + 1; currentAddress < size; ++i ){
    			
    			byteBuffer[currentAddress++] = [memory readInt:i withSize:sizeof(Byte)];
    			
    			Byte atI = [memory readInt:i withSize:sizeof(Byte)];
    			Byte prevI = [memory readInt:i - 1 withSize:sizeof(Byte)];
    			
    			if ( atI == prevI ){
    				
    				int j;
    				for ( j = [memory readInt:i + 1 withSize:sizeof(Byte)]; j != 0; byteBuffer[currentAddress++] = [memory readInt:i withSize:sizeof(Byte)] ){
    					j--;
    				}
    				i += 2;
    				if ( currentAddress < size ){
    					byteBuffer[currentAddress++] = [memory readInt:i withSize:sizeof(Byte)];
    				}
    			}
    		}
    Now to verify it's always working for me Looks like the name is at 0x88, which seems a bit strange. Thanks!
    https://tanaris4.com

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [QUESTION] Aggroing more mobs than wanted/ How to make them yellow?
    By Romis in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-01-2008, 06:44 AM
  2. How to read .M2 informations ?
    By 0megear in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 01-08-2008, 07:40 AM
  3. Zul'Aman items + how to add them
    By riath in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 12-05-2007, 09:03 AM
  4. Replies: 5
    Last Post: 05-04-2007, 10:16 AM
  5. Hunter Pets how to use them to gank lowbies
    By Demonicmaster in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 12-21-2006, 04:35 PM
All times are GMT -5. The time now is 10:48 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search