Determine Vec3 pos from minimap marker menu

User Tag List

Results 1 to 4 of 4
  1. #1
    bastiflew's Avatar Active Member
    Reputation
    41
    Join Date
    Aug 2012
    Posts
    98
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Determine Vec3 pos from minimap marker

    Hi everyone,

    I try to determine a vec3 position from a minimap marker.
    I just need to get a pos relative to my minimap position (so the center of the minimap)

    What I found so far :

    Code:
        [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Ansi, Size = 0x114)]
        public struct MinimapMarker
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x100)]
            public char[] markerNameRaw;                                //0x0
            public Vec2 Position;                                       //0x100
            public uint unk1;                                           //0x108
            public uint unk2;                                           //0x10C
            public uint unk3;                                           //0x110
        }
    and my method to fetch markers :

    Code:
            public static MinimapMarker[] GetMinimapMarkers()
            {
                var ui = GetUi(UiElementHash.MinimapMain);
                var count = D3Memory.ReadMemoryAsInt(ui.Ofs + 0x120AC);
                var markers = new MinimapMarker[count];
    
                for (uint i = 0; i < count; i++)
                {
                    var currentMarker = D3Memory.ReadMemory<MinimapMarker>(ui.Ofs + 0xCAC + (i * (uint)Marshal.SizeOf(typeof(MinimapMarker))));
                    markers[i] = currentMarker;
                }
    
                return markers;
            }
    note that UiElementHash.MinimapMain correspond to "Root.NormalLayer.minimap_dialog_backgroundScreen.minimap_dialog_pve.minimap_pve _main" UI.

    Hi have some weird Y coords for minimap center, for example :
    I teleport to a map, so I am on the center of the waypoint, and the waypoint marker is perfectly in the minimap center.

    But if I get UI center (without ratio transform) I get this :

    Code:
     WayPoint Position :
        x: 1665.60071
        y: 212.0
    minimapCenter (from UI)
    {X: 1665,601, Y: 230}
        x: 1665.60071
        y: 230.0
    X is perferctly the same, but Y not.

    If someone have a clue about this, it will help me a lot

    Thanks

    Determine Vec3 pos from minimap marker
  2. #2
    raler's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What resolution do you run diablo in? Would be helpful when trying to figure this out. Have you also tried comparing the minimap center to where your character is located on the minimap? I would assume that would always yield the same result.

    **Edit: I am seeing the same results as you are. No idea why =/ However, it does match up with the map perfectly: https://i.imgur.com/9WyuSKj.png

    Also, you would only be able to get the x and y world coordinates from a minimap marker, as they do not take z coords into account.
    Last edited by raler; 05-28-2014 at 08:33 PM.

  3. #3
    karnkore's Avatar Member
    Reputation
    7
    Join Date
    Sep 2012
    Posts
    130
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add 18.0 to your Y because the D3 code subtracts it.

    Code:
    void __thiscall MarkerSet(int this, int a2, int a3, int a4, char a5, int a6)
    {
      int v6; // edi@1
      signed int v7; // esi@1
      int v8; // esi@3
      int v9; // eax@3
    
      v6 = this;
      v7 = *(_DWORD *)(this + 73900);
      if ( v7 < 256 )
      {
        if ( sub_12E5730(a2) )
        {
          v8 = 276 * v7 + v6 + 3244;
          v9 = sub_12E5710(a2);
          Convert(v8, v9, 256);
          *(_BYTE *)(v8 + 255) = 0;
          *(float *)(v8 + 256) = *(float *)a3;
          *(float *)(v8 + 260) = *(float *)(a3 + 4);
          *(float *)(v8 + 260) = *(float *)(v8 + 260) - 18.0;// 18.0 is subtracted allways in minimap code
          *(_DWORD *)(v8 + 264) = a4;
          *(_BYTE *)(v8 + 268) = a5;
          *(_DWORD *)(v8 + 272) = a6;
          ++*(_DWORD *)(v6 + 73900);
        }
      }
    }

  4. #4
    bastiflew's Avatar Active Member
    Reputation
    41
    Join Date
    Aug 2012
    Posts
    98
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks karnkore, I just apply a 45° rotation, and it fits perfectly

Similar Threads

  1. Where to find the Vashj'ir .blp files from the minimap?
    By MrTravisL in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 06-09-2011, 06:04 AM
  2. [Showoff] High Res Minimap-based WorldMap from Alpha 0.5.3 Client
    By akspa420 in forum World of Warcraft Exploration
    Replies: 22
    Last Post: 11-07-2009, 04:36 PM
  3. Sending Anonymous Mail (From "Unknown")
    By Matt in forum WoW Scam Prevention
    Replies: 4
    Last Post: 09-17-2006, 04:21 AM
  4. Free Marks from Battle Grounds
    By Matt in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 06-19-2006, 11:21 AM
  5. Raid Griefing Exploit (kick anyone from any group)
    By Matt in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 04-28-2006, 09:26 AM
All times are GMT -5. The time now is 03:34 AM. 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