-
Member
can't understand how it works , include not working .
-
Legendary
Originally Posted by
ZenDraL
Hey Enigma, I've been using the changes from you map hack to modify my application. Was wondering if you would be able to include a fix for the attribute cache or maybe some hints on how to get it working? Thanks.
It's probably having a hard time getting the AttributeDescriptors. Not in the public source yet (present in MapHack):
Code:
DataSegment.cs
public AttributeDescriptor[] AttributeDescriptors
=> Memory.Reader.Read<AttributeDescriptor>(MemoryContext.Current.ImageBase + SymbolTable.Current.DataSegment.AttributeDescriptors, SymbolTable.Current.DataSegment.AttributeDescriptorsCount);
SymbolTable.X64.cs
DataSegment.AttributeDescriptors = 0x00000000021dfd50;
DataSegment.AttributeDescriptorsCount = 0x000005bb;
Hope it helps.
-
Post Thanks / Like - 1 Thanks
ZenDraL (1 members gave Thanks to enigma32 for this useful post)
-
Member
-
Member
Do they do RPM/WPM/other handle checks? I've never messed around with anything Blizzard so I figured I'd play around with your library to get my feet wet. I usually just gut the RPM/WPM templates and replace them with calls to my own kernel framework, but before I do I wanted to see if I even need to for D3.
-
Legendary
Originally Posted by
Skeetss
Do they do RPM/WPM/other handle checks? I've never messed around with anything Blizzard so I figured I'd play around with your library to get my feet wet. I usually just gut the RPM/WPM templates and replace them with calls to my own kernel framework, but before I do I wanted to see if I even need to for D3.
No idea. I'm guessing no.
New branch available
GitHub - Enigma32/Enigma.D3 at post-obfuscation-patchwork
I do not recommend anyone to use it, it's a mess and I will not provide support!
But at least it's there for whatever it's worth.
-
Post Thanks / Like - 3 Thanks
-
Member
Thanks for this!!
Not sure how much trouble it would be to restore SNOFiles and HotkeyPreferences but I would be really happy to see these come back if possible.
-
Member
Thank you for posting the updated code enigma!
I second SNOFiles and HotKeyPreferences. I have an application that was using ApplicationModel, but I can find most things using DataSegment.ObjectManager.
-
Member
I ended up reverse engineering your map hack. You're a genius, I just have to say. I'm not sure how you figured out what you did as quickly as you did. BTW, the reason that attributes don't seem to work consistently is that I don't think you can index fast attribute groups directly (by groupId) anymore. I'm having to go through all the FastAttribGroups to find the one with the correct ID. (Please note this may make it work by having some strange side effect just by enumerating through via the allocator.
FastAttribGroup fastAttribGroup = null;
foreach (var grp in (Container<FastAttribGroup>)ctx.DataSegment.ObjectManager.FastAttrib.FastAttribG roups)
{
if (grp != null && grp.ID == groupId)
{
fastAttribGroup = grp;
break;
}
}
I bet I can cache this lookup, but fixing the lookup-by-groupId let me read all the attributes again properly.
Your original (new) code tries a lookup directly by groupId (as an indexer), which seems to return the wrong group (is this an intentional change on Blizz's part I wonder?)
FastAttribGroup fastAttribGroup = ((Container<FastAttribGroup>)ctx.DataSegment.ObjectManager.FastAttrib.FastAttrib Groups)[groupId];
I'd love to work with you and help you with this project in any way I can. I can't do what you've done with figuring out the obfuscation, but I have everything working as it was before (minus a few things that were nice but sometimes flakey, like LevelAreaName). I have it so every class can go through any dynamic rift or grift and complete it fairly well (i.e. Mapping algorithms), dodge danger using the appropriate class-specific skills, use teleport/dashing strike/bloodrush for navigation or to escape danger, inventory tracking, basic utility macros like starpact timing and auto-creation and tracking number of rathma mages, projectile motion projections and basic dodging algorithms, auto-locust and haunt - a pretty broad range. I'd be happy to show you what I've built based on your hard work. If I ever make a dime from it (not super likely and not in the cards), some of that money would certainly head your way!
Unfortunately I never tried to compete with TurboHud so my features do not overlap at all with theirs - and they did an awesome job at what they did... there was no way I needed to rebuild or mimick any of his/their hard work.
Anyway, props and many thanks to you.
-
Active Member
when and/or how often i have to use the Symbolpatcher? i hope the Symbolpatcher will be seperated from the maphack project in future.
-
Member
Originally Posted by
d2k2
when and/or how often i have to use the Symbolpatcher? i hope the Symbolpatcher will be seperated from the maphack project in future.
It gets called in Enigma.D3.Bootloader::App->CreateMemoryContext when the worker thread is spawned.
-
Legendary
Originally Posted by
d2k2
when and/or how often i have to use the Symbolpatcher? i hope the Symbolpatcher will be seperated from the maphack project in future.
Once per D3 process. But it might yield incorrect result when ran during D3 initialization. I have no good way of knowing when it's done, so I just hope for exception rather than finding a bad address, then retry
Yea, I intend to extract it.
-
Post Thanks / Like - 1 Thanks
d2k2 (1 members gave Thanks to enigma32 for this useful post)
-
Active Member
Thx a lot for your Updates Enigma.
Maybe the SymbolPatcher should be executed by the framework internally after creating the MemoryContext Instance. But i guess we need it aswell as public function just in case (probably to update LevelArea offset everytime a new game is created?)
I hope the remaining offsets (Hotkeys, Applicationloopcount, SnoFiles, LevelArea ,..) in Symboltable.DataSegment can be updated aswell? I need them :>
-
Active Member
Maybe you can update some offsets in SymbolTable (also need add ImageBase Reference in DataSegment Class)
DataSegment.HotkeyPreferences = 0x1EF8730;
DataSegment.ApplicationLoopCount = 0x216C2A4;
DataSegment.SNOFiles = 0x2168690;
------------------------------------
since this patch the LevelArea is crypted aswell. i used it to detect if the Player is inside a Rift (LootRun) or Grift (TieredLootRun)
For Example when player was in Rift or Grift Level 1, MemoryContext.Current.DataSegment.LevelArea.LevelAreaSNO was returning this value:
SnoLevelArea.X1_LR_Level_01 // 288482
Now i can not Use LevelArea anymore. I was trying to use this:
var current_LevelAreaSNO = MemoryContext.Current.DataSegment.ObjectManager.Scenes.FirstOrDefault(x => x.SSceneID == LocalACD.SSceneID).LevelAreaSNO;
but the result is different. it returns me the name of the LevelArea instead the SNO with Number of Level the player is inside.
Anyone has an idea how to detect that the player is in a rift? maybe by checking for specific UI controls elements as "dirty" solution?
Last edited by d2k2; 03-15-2018 at 07:19 PM.
-
Post Thanks / Like - 1 Thanks
ZenDraL (1 members gave Thanks to d2k2 for this useful post)
-
Member
You are in a rift if WorldSNO is one of these 288454, 288685, 288687, 288798, 288800, 288802, 288804, 288810, 288814, 288816
You can use attribute InTieredLootRunLevel to tell if you are in a GR and InTieredChallengeRift to tell if you are in a challenge rift.
Edit in case anyone comes back to look for this:
You can lookup the WorldSNO from Worlds using the SWorldID on the local player's ACD.
Last edited by ZenDraL; 03-16-2018 at 06:00 PM.
-
Post Thanks / Like - 1 Thanks
d2k2 (1 members gave Thanks to ZenDraL for this useful post)
-
Active Member
Originally Posted by
ZenDraL
You are in a rift if WorldSNO is one of these 288454, 288685, 288687, 288798, 288800, 288802, 288804, 288810, 288814, 288816
You can use attribute InTieredLootRunLevel to tell if you are in a GR and InTieredChallengeRift to tell if you are in a challenge rift.
How you read the WorldSNO? Over Localdata.WorldSNO or ObjectManager.Worlds ? I will test it later if both work same. I had some trouble with the Localdata (after i updated the address. its not yet uptodate in the framework ) yesterday, maybe the structure changed?
Thx a lot for your suggestion. I will keep them in mind. I will try to use first less parts of the framework (no Localdata, no LevelArea), so i dont depend on them. I will try to detect it over the UIManager:
Code:
//get Greater Rift Level/Tier
A_Collection.Environment.Areas.GreaterRift_Tier = (int) A_Collection.Me.HeroGlobals.LocalACD.GetAttributeValue(AttributeId.InTieredLootRunLevel) + 1;
//Detect if in Rift
//this Method does not need access to LocalData or LevelArea. Only UIManager needed
A_Collection.Me.HeroStates.isInRift = T_D3UI.UIElement.isVisible("Root.NormalLayer.eventtext_bkgrnd.eventtext_region.stackpanel.rift_wrapper");
//Detect if in Greater Rift
A_Collection.Me.HeroStates.isInGreaterRift = A_Collection.Me.HeroStates.isInRift && A_Collection.Environment.Areas.GreaterRift_Tier > 0;
Last edited by d2k2; 03-16-2018 at 07:26 AM.