How to translate coordinate into mapcoords? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    demonguy's Avatar Member
    Reputation
    2
    Join Date
    Feb 2012
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to translate coordinate into mapcoords?

    i get units' postion through UnitX UnitY UnitZ descriptors, but how to translate it into mapcoords which match the return value of "/run print(GetPlayerMapPosition(unit))" ?
    Instead of figuring out algorithm by myself, i decided to use CGWorldFrame::TranslateToMapCoords and so far i've work out about it except the first argument

    its prototype should be CGWorldFrame::TranslateToMapCoords(this,continent,realX,realY,mapX,mapY,0,0,0)
    So what on earth does the first argument mean? what's CGWorldFrame Object? and what value should i pass to this function?

    How to translate coordinate into mapcoords?
  2. #2
    l0l1dk's Avatar Elite User

    Reputation
    499
    Join Date
    Sep 2010
    Posts
    342
    Thanks G/R
    1/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The calling convention of CGWorldFrame::TranslateToMapCoords is __cdecl, so it's not a class method (if it is, it's static). There won't be any "this" argument passed to it. The first argument appears to be a reference to a C3Vector, that contains the coordinates to be translated to map coordinates. Got that from reversing GetPlayerMapPosition.

  3. #3
    radarlove's Avatar Contributor
    Reputation
    158
    Join Date
    Jun 2012
    Posts
    205
    Thanks G/R
    2/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    demonguy's Avatar Member
    Reputation
    2
    Join Date
    Feb 2012
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your words are always helpful, and your OHack is the most valuable resource when i started to learn memory editing, thanks all the way. +rep

    you're right.... it's really the return value of "CGUnit:GetPosition", but if it's true, what's the third and forth argument?

  5. #5
    demonguy's Avatar Member
    Reputation
    2
    Join Date
    Feb 2012
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by demonguy View Post
    your words are always helpful, and your OHack is the most valuable resource when i started to learn memory editing, thanks all the way. +rep

    you're right.... it's really the return value of "CGUnit:GetPosition", but if it's true, what's the third and forth argument?

    i still don't know what are the two arguments mean but in "GetPlayerMapPosition" , if unit is Player then they're 0xCC9FA0 and 0xCC9FA4 respectively (rebased)
    since i don't need to translate a far-away position so it's enough... Thanks

Similar Threads

  1. How to translate wow into my own language
    By Gloffen1 in forum World of Warcraft General
    Replies: 2
    Last Post: 01-02-2010, 05:30 PM
  2. How I turned 700g into 2300g
    By Haxster in forum World of Warcraft Guides
    Replies: 7
    Last Post: 12-23-2007, 07:08 AM
  3. how do i get into GM isalnd?
    By mchugh in forum Community Chat
    Replies: 1
    Last Post: 04-29-2007, 07:17 AM
  4. HOW TO MOVE FILES INTO A MPQ at the speed of light
    By bloodofwar in forum World of Warcraft Model Editing
    Replies: 15
    Last Post: 11-29-2006, 12:46 PM
All times are GMT -5. The time now is 03:58 PM. 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