Coder Social home page Coder Social logo

Comments (5)

 avatar commented on May 29, 2024 1

I found the issue and have a temporary solution! The EnmityEntry structure has wrong offset as Name and ID changes places. You can go to this line in the code with the following assignment

ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityEntry.ID),
Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityEntry.Name),

and swap the offsets like this:

ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityEntry.Name),
Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityEntry.ID),

This yields correct results in my case but it will break once the API gets fixed.

from sharlayan.

 avatar commented on May 29, 2024

Just from your code I can't deduce any serious problems. There are basically two possible explanations I have in mind:

  • The offsets haven't been updated for Patch 3.5. I am not sure whether the others have adjusted the offsets yet since there were some minor changes which shift a few values around thus giving you completely unrelated results and unexpected behavior. @Icehunter will surely be able to tell us whether he updated the API yet.
  • An internal bug in the library. Assume the offsets are all up-to-date, it could be possible that the library is doing internally something wrong. I haven't used the enmity functions and haven't looked through the code yet, but here is an example of a similiar issue I had in my own project. There is structure which holds up to 344 units and doodads that are around the player. Although the structure is semi-sequential the entries at some spots are outdated, but not invalidated. I can definitely imagine something internally going wrong, especially combined with the change introduced with the new patch.

Anyways, let's wait on some feedback from @Icehunter. In the meantime I definitely suggest to debug the code and step into the library code to see where exactly the objects get corrupted or wrong data.

from sharlayan.

 avatar commented on May 29, 2024

For future reference here is how I noticed this:

I debugged the library and noticed that the assignment of the name happens right here. The resulting name is of course wrong, but I created a breakpoint right after the assignment and extended the function GetString right here with one line Debug.WriteLine(address.ToInt64().ToString("X"));. I used Cheat Engine to look into the memory and saw the following:

Memory

The name that was displayed is the marked code in red which is a unit id, but the name is way before the id - thus I used hardcoded offsets and then noticed the value having swapped positions and not being "just" off.

from sharlayan.

roxaskeyheart avatar roxaskeyheart commented on May 29, 2024

You sir, are amazing. That did the trick, thank you so much.

from sharlayan.

roxaskeyheart avatar roxaskeyheart commented on May 29, 2024

Sorry for being such a pain, but I was wondering if you knew how to properly use the Reader.GetPartyMembers() method? Everytime I try and call it, it returns that I only have 1 (myself) in my party when performing a count on Reader.GetPartyMembers()?.PartyEntities , despite having multiple people (and/or pets) in my party.

from sharlayan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.