-
Active Member
Originally Posted by
Reghero
I'm trying to fix the descriptor dump for classic with this. So far I've got it correctly looping the functions using the pattern:
40 53 48 83 EC ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ?
Mapping to MirrorInitializeStaticDescriptors
But I'm having issues getting it to actually retrieve the correct number of descriptors for each function. For example:
enum CGContainerData
{
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerData_ = CGItemDataEnd + 0, // size 0 flags: MIRROR_NONE
CGContainerDataEnd = CGItemDataEnd + 0
};
When IDA shows it as two.
You don't really know the total count of the descriptors for each object type. Just keep iterating until you reach the last known descriptor.
GitHub - notscimmy/wow_descriptor_dumper
-
Post Thanks / Like - 1 Thanks
Reghero (1 members gave Thanks to scimmy for this useful post)
-
Established Member
2.5.4.42873, the descriptor disappeared...
-
-
Post Thanks / Like - 1 Thanks
sendeos23 (1 members gave Thanks to Razzue for this useful post)
-
Member
Originally Posted by
Razzue
Yup, tbc classic object manager and unit/item/object layouts now match retails!
You can start finding most relevant info(stats etc) at UnitBase + 0xD000 and onwards. Though there's also lost of fields a lot lower than that. Have fun
Razzue sama, some offsets get by your Wow-Dumper‘s seems not correct in TBC 4.5.4.42873。
I got this from the Dumper:
Code:
public class Object_Manager
{
public const int Zone_ID = 0x300905F;
public const int Names = 0x2A15D10;
public const int Base = 0x2B98900;
public const int Cooldown = 0x2B346B0;
}
But,it not works. maybe the "Base" Pattern is changed?
Pattern = "48 8B 1D ?? ?? ?? ?? 48 85 DB 74 ?? 80 3D ?? ?? ?? ?? ?? 74 ?? 48 8D 0D ?? ?? ?? ??"
Or maybe the object manager Descriptor stuct changed?
-
Contributor
Avid Ailurophile
Originally Posted by
yezack
Razzue sama, some offsets get by your Wow-Dumper‘s seems not correct in TBC 4.5.4.42873。
I got this from the Dumper:
Code:
public class Object_Manager
{
public const int Zone_ID = 0x300905F;
public const int Names = 0x2A15D10;
public const int Base = 0x2B98900;
public const int Cooldown = 0x2B346B0;
}
But,it not works. maybe the "Base" Pattern is changed?
Pattern = "48 8B 1D ?? ?? ?? ?? 48 85 DB 74 ?? 80 3D ?? ?? ?? ?? ?? 74 ?? 48 8D 0D ?? ?? ?? ??"
Or maybe the object manager Descriptor stuct changed?
Offsets are fine, the way the object manager is accessed has changed.
[Game + Offset] +0x8] => Active object array
for(var I = 0; I < (int)[Game+Offset]; I++)
var entry => Array + I * 0x8;
Entry GUID => Entry + 0x8
Object pointer => Entry + 0x18
Manager type => Object Pointer + 0x10
Should be enough to get you started.
Keep in mind some pointers in Entry+0x0 will NOT be empty, those are also manager entries.
Will post some code when I get home.
There are NO more descriptor fields as they used to be.
Last edited by Razzue; 03-24-2022 at 04:39 AM.
-
Member
Originally Posted by
Razzue
Offsets are fine, the way the object manager is accessed has changed.
[Game + Offset] +0x8] => Active object array
for(var I = 0; I < (int)[Game+Offset]; I++)
var entry => Array + I * 0x8;
Entry GUID => Entry + 0x8
Object pointer => Entry + 0x18
Manager type => Object Pointer + 0x10
Should be enough to get you started.
Keep in mind some pointers in Entry+0x0 will NOT be empty, those are also manager entries.
Will post some code when I get home.
There are NO more descriptor fields as they used to be.
thans i got it, [Game+Offset] is object.count, [[Game + Offset] +0x8] is object.list
-
-
Member
Originally Posted by
Razzue
Game + offset => Max count**
Game + offset + 0x10 or something close is active object count
i make some code , i guess Object pointer is point of object struct(i named it cur_obj).
then i read these:
[cur_obj+ WOW_OFFSETS.Object.Guid, 16],
[cur_obj+ WOW_OFFSETS.Object.Descriptor, 8]
but they seems incorrect.
it seems offset of object struct also changed(i guess)
-
-
Post Thanks / Like - 2 Thanks
-
Member
Originally Posted by
Razzue
For the paste monkeys
Code:
public const int Array = 0x8;
public const int ObjGuid = 0x8;
public const int EntGuid = 0x18;
public const int ObjType = 0x10;
internal static bool TryUpdate()
{
try
{
lock (CacheLock)
{
var count = Reader.Read<uint>(Reader.Read<IntPtr>(Client.Base + Offsets.ObjectManager.Base));
var array = Reader.Read<IntPtr>(Reader.Read<IntPtr>(Client.Base + Offsets.ObjectManager.Base) + Offsets.ObjectManager.Array);
if (count == 0 || IntPtr.Zero == array)
throw new MemoryException("Could not get object manager array.");
if (null == Entries) Entries = new Dictionary<GUID, CacheEntry>();
var entrycount = Entries.Count;
for (var i = 0; i < count; i++)
{
var ptr = Reader.Read<IntPtr>(array + (i * 0x8));
if (ptr == IntPtr.Zero) continue;
while (ptr != IntPtr.Zero)
{
var entry = Reader.Read<IntPtr>(ptr + 0x18);
var guid = Reader.Read<GUID>(ptr + Offsets.ObjectManager.ObjGuid);
if (!guid.IsEmpty())
{
if (Entries.ContainsKey(guid))
Entries[guid].Updated = true;
else Entries.Add(guid, new CacheEntry { Base = entry, Updated = true });
}
ptr = Reader.Read<IntPtr>(ptr + 0x0);
}
}
var keys = Entries.Keys.ToList();
foreach (var key in keys)
{
if (Entries[key].Updated)
Entries[key].Updated = false;
else Entries.Remove(key);
}
return null != Entries && Entries.Count > 0;
}
}
catch (MemoryException) { return false; }
}
ObjectName => [[Entry + 0x148] + 0xE0]
UnitName => [[Entry + 0x3A0] + 0xF8] // Npc only
UnitPosition => [[Entry + 0xF0] + 0x20] // Entry + 0x148 works just as well
UnitHealth => [Entry + 0xD4E8]
UnitHealthMax => [Entry + 0xD4E8]
UnitPower1to7 => [Entry + 0xD7B8] to [Entry + 0xD7D0]
UnitPower1to7Max => [Entry + 0xD7D4] to [Entry + 0xD7E8]
if (Entries.ContainsKey(guid))
Entries[guid].Updated = true;
else Entries.Add(guid, new CacheEntry { Base = entry, Updated = true });
Entries[key].updated is always true. i can't understand
it likes ((entries) in chains)in a list, but some entries will overwrite the olds
Last edited by yezack; 03-24-2022 at 11:36 AM.
-
-
Active Member
ObjPosition => [Entry + 0x108] or + 0x180
Last edited by Tirthankara; 03-24-2022 at 01:49 PM.
-
Post Thanks / Like - 1 Thanks
Buntstift (1 members gave Thanks to Tirthankara for this useful post)