-
Member
Originally Posted by
d2k2
what happen to the Actor structure :O. i was using it to detect if the player is moving. i can not find anything inside :S
NOTE: I sorta fixed it up a bit to make it easier to understand, I dont really refresh localPlayerData and localAcd in this routine but for clarity of where you can read the data I put it here.
Code:
public static void SetIsPlayerMoving()
{
try
{
var localPlayerData = Globals.Engine.DataSegment.ObjectManager.PlayerDataManager[Globals.Engine.DataSegment.ObjectManager.Player.LocalPlayerIndex];
var localAcd = Globals.Engine.DataSegment.ObjectManager.ACDManager.ActorCommonData[(short)localPlayerData.ACDID];
var curWorldPos = new Vector3D(localAcd.Position.X, localAcd.Position.Y, localAcd.Position.Z);
if (CurrentPlayer.LastWorldPos.X == 0 && CurrentPlayer.LastWorldPos.Y == 0 &&
CurrentPlayer.LastWorldPos.Z == 0) CurrentPlayer.LastWorldPos = curWorldPos;
if (curWorldPos.X != CurrentPlayer.LastWorldPos.X ||
curWorldPos.Y != CurrentPlayer.LastWorldPos.Y ||
curWorldPos.Z != CurrentPlayer.LastWorldPos.Z)
{
CurrentPlayer.IsMoving = true;
CurrentPlayer.StandStillStart = new DateTime();
CurrentPlayer.FirstStop = new DateTime();
}
else
{
if (CurrentPlayer.StandStillStart == new DateTime())
CurrentPlayer.StandStillStart = DateTime.Now;
if (CurrentPlayer.FirstStop == new DateTime())
CurrentPlayer.FirstStop = DateTime.Now;
CurrentPlayer.StopDuration = new TimeSpan(DateTime.Now.Ticks - CurrentPlayer.FirstStop.Ticks);
if (CurrentPlayer.StopDuration.TotalMilliseconds >= 1000)
{
CurrentPlayer.IsMoving = false;
CurrentPlayer.FirstStop = new DateTime();
}
}
CurrentPlayer.LastWorldPos = curWorldPos;
}
// ReSharper disable once EmptyGeneralCatchClause
catch (Exception)
{
}
}//
-
This is nuts cause there was an isMoving flag inside RActor. It has to be still there somewhere or mby in another field pointer from inside RActor struct
-
Active Member
@d3macro. thx.i know this code. its from the d3helper sourcecode.
@r3peat when i was inspecting the RActor with ReClass i could not find any changing bytes all. i noticed i am using enigmas TakeSnapshot function. but i update the object before reading. maybe something is broken there. i will test later without the Snapshot.
edit:
the problem was as i suspected, the snapshot. still could not figure out why (i am sure it was updated frequently). i just removed it and it works now.
Last edited by d2k2; 03-22-2018 at 11:13 AM.
-
Member
a little question "ACD.Position" is relative to what on the screen
-
Legendary
Originally Posted by
tiben20
a little question "ACD.Position" is relative to what on the screen
Nothing. It's a 3D coordinate for whatever world the server created.
-
Contributor
Hey, Engima
If I just need to get some information about the hero's(Sex, level, name, ect.) and BattleTag, do I just need to update the ScreenManager?
I have their old offsets
I want my tool to work again, and it needs the above information
Last edited by SeaDragon; 03-24-2018 at 06:30 AM.
-
Legendary
Originally Posted by
SeaDragon
Hey, Engima
If I just need to get some information about the hero's(Sex, level, name, ect.) and BattleTag, do I just need to update the ScreenManager?
I have their old offsets
I want my tool to work again, and it needs the above information
The ScreenManager Ptr is encrypted.
Here's a slow but working (on my machine) scanner.
Code:
var fn = mm.LocalHeap.FirstNode.Snapshot();
var scrmgr_block = mm.LocalHeap.SmallBlocks.Where(x => x.IsUsed).Where(x => x.Size == MemoryObject.AlignedSize(0x50, 0x20))
.Select(x => new { Block = x, Ptrs = x.Data.Cast<ulong>().ToArray(10) })
.Where(x => x.Ptrs.All(p => mm.Memory.Reader.IsValidAddress(p)))
.Where(x => !fn.Contains(x.Ptrs[0]))
.Where(x => fn.Contains(x.Ptrs[1]))
.Where(x => fn.Contains(x.Ptrs[2]))
.Where(x => fn.Contains(x.Ptrs[3]))
.Where(x => !fn.Contains(x.Ptrs[4]))
.Where(x => fn.Contains(x.Ptrs[5]))
.Where(x => !fn.Contains(x.Ptrs[6]))
//.Where(x => fn.Contains(x.Ptrs[7]))
.Where(x => fn.Contains(x.Ptrs[8]))
.Where(x => fn.Contains(x.Ptrs[9]))
.Select(x => new { x, blks = x.Ptrs.Select(p => mm.LocalHeap.GetBlock(p)).ToArray() })
//.Where(x => x.blks.All(blk => blk != null))
.FirstOrDefault();
var screenmgr = dump.Read<MemoryObject>(scrmgr_block.x.Block.Data.ValueAddress);
var x20 = screenmgr.Read<Ptr<MemoryObject>>(0x20).Dereference();
var x20_x138 = x20.Read<Ptr<MemoryObject>>(0x138).Dereference();
var x20_x138_x58 = x20_x138.Read<D3.MemoryModel.BattleNet.Map<D3.MemoryModel.BattleNet.Hero>>(0x58);
It's slow because the block size of ScreenManager is small, and there are many other blocks with that size. I presume you only need the struct pointed at from +0x20, so could scan for that one directly instead (should have a more distinct size).
-
Post Thanks / Like - 1 Thanks
SeaDragon (1 members gave Thanks to enigma32 for this useful post)
-
Member
I saw this was covered a long time ago... but does anyone know how to read a portal destination from the portal's ACD? I know there is also a PortalDestination ACD. None seem to match up with any of the SNOs with SNO type SNOType.Act. I'm basically iteration through every act and listing all act start overrides, resolved portal destinations and waypoints with the following code. None match up with the World SNO or Level Area SNO of the portal ACD (based on ActorSNO):
Code:
var worldSno = SceneDataCollector.GetWorldSnoId(MyPlayer.Instance._playerAcd.SWorldID);
var ss = SceneDataCollector.GetExactScene(MyPlayer.Instance._playerAcd.SSceneID, MyPlayer.Instance._playerAcd.SWorldID);
var acts = MemoryContext.Current.DataSegment.SNOGroupStorage[(int)SNOType.Act].
Cast<SNOGroupStorage<Enigma.D3.Assets.Act>>().
Dereference().
Container.Where(o => o != null && o.ID != -1 && o.SNOType == SNOType.Act && !o.PtrValue.IsInvalid).
Select(o => o.PtrValue.Cast<Enigma.D3.Assets.Act>().Dereference()).
ToList();
if (acts.Count > 0)
{
var portalWorldSno = SceneDataCollector.GetWorldSnoId(acd.SWorldID);
var portalScene = SceneDataCollector.GetExactScene(acd.SSceneID, acd.SWorldID);
Debug.WriteLine($"My WorldSno: {worldSno}/{MyPlayer.Instance._playerAcd.SWorldID}, SceneSno: {ss.SceneSNO}, LA: {ss.LevelAreaSNO}");
Debug.WriteLine($"Portal {acd.Name}, Actor SNO: {acd.ActorSNO}, world sno: {portalWorldSno}, sceneSno: {portalScene.SceneSNO}, portal LA: {portalScene.LevelAreaSNO}");
foreach (var a in acts)
{
var snoId = a.x0000_Header.x00_SnoId;
Debug.WriteLine($"ACT SNO: {snoId}");
var itm = a.x0FC0_ResolvedPortalDestination;
var id = a.x0FC0_ResolvedPortalDestination.x04;
Debug.WriteLine($" - ResolvedPortalDestination: LA_SNOW: {itm.x08_LevelAreaSNO} - WORLD_SNOW: {itm.x00_WorldsSNO} - {itm.x04}");
foreach (var item in a.x0FCC_ActStartLocOverrides.Where(o => o.x10_WorldsSNO != SNO.NONE))
{
Debug.WriteLine($" ActStartOverride -- World: {item.x10_WorldsSNO}, Destination: {item.x00_ResolvedPortalDestination.x08_LevelAreaSNO} - {item.x00_ResolvedPortalDestination.x00_WorldsSNO} - {item.x00_ResolvedPortalDestination.x04}");
}
foreach (var item in a.x0020_WaypointInfos.Where(o=>o.x04_WorldsSNO != SNO.NONE))
{
Debug.WriteLine($" --- Waypoint {item.x00}, World {item.x04_WorldsSNO}, LA {item.x08_LevelAreaSNO}, x0C {item.x0C}");
}
}
}
-
Member
Any chance you're planning to bring back 32 bit support? Or is it dead for good?
-
Member
Hey Enigma, I'm trying to update D3Helper to 64bit.
When referencing your libraries, it doesn't seem to be able to read anything from it. All the variables in Enigma.D3 are greyed out.
Do you have any idea of how to fix this?
Imgur: The magic of the Internet
EDIT: Has the structure changed so that PlayerData must be called through the static ACDManagerSymbols?
Last edited by RaspberryPhoenix; 04-08-2018 at 02:20 AM.
-
Post Thanks / Like - 1 Thanks
rvj (1 members gave Thanks to RaspberryPhoenix for this useful post)
-
Legendary
Originally Posted by
ZenDraL
Any chance you're planning to bring back 32 bit support? Or is it dead for good?
I'm not planning on it. Is there a good reason for doing so? Seems people were fine with my MapHack and THUD going 64-bit only.
Originally Posted by
RaspberryPhoenix
Hey Enigma, I'm trying to update D3Helper to 64bit.
When referencing your libraries, it doesn't seem to be able to read anything from it. All the variables in Enigma.D3 are greyed out.
Do you have any idea of how to fix this?
Imgur: The magic of the Internet
EDIT: Has the structure changed so that PlayerData must be called through the static ACDManagerSymbols?
D3Helper is using Enigma.D3.Memory from GitHub - Enigma32/Enigma.D3 at legacy which as the branch name suggest is outdated. In order to deal with patches easier, I cleaned up the structures and implemented the SymbolTable class to hold the various offsets and similar variables. Then I'd only have this to update when a new patch hit instead of updating every file where this info was used. Even better, I could focus on generating a SymbolTable automatically It also gave me the possibility to switch between 32-bit and 64-bit symbols, at runtime (cool feature, but overkill). This new API is implemented in Enigma.D3.MemoryModel GitHub - Enigma32/Enigma.D3. However... this is also out of date thanks to the obfuscation Blizzard put in the game.
My work in progress branch is https://github.com/Enigma32/Enigma.D3/tree/post-obfuscation-patchwork which adds Enigma.D3.MemoryModel.SymbolPatching to bypass some of their encrypted/obfuscated pointers. I've also had to disable a bunch of stuff like 32-bit support (or I'd have twice as much work). My goal with this branch was simply to get my MapHack running. I'm (slowly) working on bringing patching to the main branch and clean up everything that's not working anymore. I kinda want to see what changes Blizzard does in their next patch first.
tl;dr: You need to re-write D3Helper to use Enigma.D3.MemoryModel, either from the experimental branch GitHub - Enigma32/Enigma.D3 at post-obfuscation-patchwork (I imagine this is missing a bunch of stuff for D3Helper to work), or wait until this branch is merged into main.
-
Post Thanks / Like - 2 Thanks
-
Member
I use ROS-bot and if I want to attach anything to it, it has to be 32 bit. When I play manually 64 bit is fine. I know I'm not the only one who would welcome back 32 bit. But I understand if it's too much effort. Thanks for responding and letting me know.
-
Active Member
Everything you need to convert d3helper to 64bit is public on enigmas github and documented in this forum. just scroll back few pages.
3 things are currently missing in the "post-obfuscation-patchwork" branch to make d3helper 64bit running:
1) Offset for ApplicationLoopcount must be updated (i think its 0x216C2A4).
2) LevelArea cant be used anymore. it was used to detect if player is in a rift. But you can find another method to detect this.for example by reading UI controls (is progressbar visible?).
3) Loaldata.IsStartupGame can't be used anymore to detect if player is in a game. Have to find other solution for this (UI control checking for example).
After this is fixed. you have to use the new Symbolpatcher (see example in the maphack sourcecode)
but to get to this point you have to convert first from the old D3.Memory to "Memorymodel" to be able to use the 64bit features. This requires A LOT of work.
Some functions and offsets which were useful for UI reading have been removed in Memorymodel. you have to port them. see examples in enigmas maphack how to read UI controls or check the legacy branch. when you start working on it and research you will find the solutions either in the github branches or in this forum.
if you have specific questions, i am sure enigma or someone here will help.
Last edited by d2k2; 04-11-2018 at 06:56 AM.
-
Post Thanks / Like - 2 Thanks
-
Member
By any chance is it possible to add elite health bar feature and something to identify the real illusionist elite? Thanks
-
Member
I ask for help. I program on Delphi and Autoit. The C # programming language is not very familiar.
I'm writing a simple bot on Autoit.
Help me find my coordinates in 3D world.
Those, tell me the base address and the offset where are stored x, y and z coordinates.