patch 1.08,all offset changed menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    boredevil's Avatar Active Member Authenticator enabled
    Reputation
    46
    Join Date
    Feb 2008
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    at 0x108 is a int16 maxIndex. it´s -1 if the container is empty.
    at 0x10C is a int32 numEntrys

    so if there are 3 entrys, maxIndex is 2.

    patch 1.08,all offset changed
  2. #17
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by boredevil View Post
    at 0x108 is a int16 maxIndex. it´s -1 if the container is empty.
    at 0x10C is a int32 numEntrys

    so if there are 3 entrys, maxIndex is 2.
    are you sure that maxIndex is int16?
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  3. #18
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is indeed Int16, explains a comment I found in my code (ignore it being named count)
    // NOTE: Count should be short?? Invalid count gives short.MaxValue (0x0000FFFF)

  4. #19
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by boredevil View Post
    at 0x108 is a int16 maxIndex. it´s -1 if the container is empty.
    at 0x10C is a int32 numEntrys

    so if there are 3 entrys, maxIndex is 2.
    are you sure that maxIndex is int16?

    for me:
    Code:
    int wtfIsThis1 = MR.ReadInt(addr_actors_container + 0x100 ); // =1024
    int wtfIsThis2 = MR.ReadInt(addr_actors_container + 0x104 ); // =1068
    int maxIndex = MR.ReadInt(addr_actors_container + 0x108 ); // =153
    int wtfIsThis3 = MR.ReadInt(addr_actors_container + 0x10C ); // =136
    and it seems the proper way to handle the for loop is:
    Code:
    for (int i = 0; i <= maxIndex; i++)
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  5. #20
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it goes to -1 you suddenly loop 65536 times! So make sure you handle it as Int16

  6. #21
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    If it goes to -1 you suddenly loop 65536 times! So make sure you handle it as Int16
    there is a range check around it ("if maxIndex > 0", you know)
    so, how can be that 0x10C give me a lot smaller number instead of maxIndex-1 ?
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  7. #22
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by KillerJohn View Post
    there is a range check around it ("if maxIndex > 0", you know)
    so, how can be that 0x10C give me a lot smaller number instead of maxIndex-1 ?
    If you treat maxIndex as Int32 (when it is Int16) then you'll always get positive values as 0x0000FFFF is nowhere near negative.
    I'm also enumerating using maxIndex, since I didn't understand why 0x10C wasn't maxIndex-1.

    Code:
    public IEnumerable<Actor> EnumerateActors()
    {
        var container = ObjectManager.Storage.Actors;
        int sizeOf = container.SizeOf;
        int current = Memory.Read<int>(container.List);
        for (int i = 0; i <= container.MaxIndex; i++)
        {
            yield return new Actor(Memory, current);
            current += sizeOf;
        }
    }
    Your wtfIsThis1 is the container limit and wtfIsThis2 is the item size.

  8. #23
    boredevil's Avatar Active Member Authenticator enabled
    Reputation
    46
    Join Date
    Feb 2008
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh yeah you are right john. numEntrys can be smaller. my guess is, that 0x10C is the count of entrys with valid guid.

  9. #24
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One is the highest index the other one is the count, not every actor is valid tho.
    Take a look at any of the funcs that iterate acd's or RActors.

  10. #25
    Dolphe's Avatar Contributor
    Reputation
    97
    Join Date
    Oct 2012
    Posts
    614
    Thanks G/R
    0/26
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have the new offset for 1.0.8a ?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 02-27-2018, 09:36 PM
  2. [Request] All model changing nerfs
    By XunTric in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 02-28-2009, 07:03 PM
  3. [Core Patch] Free for All Pvp
    By Gastricpenguin in forum WoW EMU General Releases
    Replies: 11
    Last Post: 02-11-2009, 08:23 PM
  4. [Model List] All Model changes of Gideon
    By Gawdlaw in forum World of Warcraft Model Editing
    Replies: 21
    Last Post: 05-14-2008, 06:31 AM
  5. Burning Crusade: All Races Changed Into Blood Elf/Draenei *READY TO USE*
    By SandLOL in forum World of Warcraft Model Editing
    Replies: 102
    Last Post: 12-02-2006, 05:58 PM
All times are GMT -5. The time now is 07:08 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