player/world coordination menu

User Tag List

Results 1 to 7 of 7
  1. #1
    felixdekat's Avatar Member
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    player/world coordination

    hello, is there anyone thats been working on a system to auto receive info about nodes trough databases provided like gatherer/cartographer.

    the point is that the positions those addons use are most likely relative to the continent(zone) the object is in, as shown below. i THINK these coords are retrieved with a function like getPlayerMapPostition(obviously not the same function)
    0.294 [x]
    0.714 [y]

    local posX, posY = GetPlayerMapPosition("player");
    this returns somehow the same ''zone-relative'' coords(0.4332, 0.6936).


    The thing is that im trying to get from these relative positions to worldspace positions as in the image below, i used the zone information to produce any kind of formula to do this, but it seems that im kinda stuck.
    is there anyone that has tried something like this before, or knows a way to get from zonespace to worldspace?





    <Zone name="Elwynn">
    <Height>2314.592478810788</Height>
    <Width>3470.832795915813</Width>
    <XOffset>16636.55146195304</XOffset>
    <YOffset>19116.00248086271</YOffset>
    </Zone>


    Zone Continent XOffset
    http://img521.imageshack.us/img521/9813/kalimdor.png

    Zone Continent YOffset
    http://img190.imageshack.us/img190/4369/kalimdory.png

    player/world coordination
  2. #2
    UnknOwned's Avatar Legendary
    Reputation
    713
    Join Date
    Nov 2006
    Posts
    583
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Search and you shall find...

  3. #3
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Honestely: What the ****?

    You do realize, that the zones are specified to be between two coordinates in the WorldMapArea.dbc, or?

    WorldMapArea.dbc - WoW.Dev Wiki

    Enough?

  4. #4
    felixdekat's Avatar Member
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ye

    Originally Posted by schlumpf View Post
    Honestely: What the ****?

    You do realize, that the zones are specified to be between two coordinates in the WorldMapArea.dbc, or?

    WorldMapArea.dbc - WoW.Dev Wiki

    Enough?
    if you read into my post you see that i posted the zone info coords, so ofcourse i do realize that the zones are between 2 coordinates in the worldmap(doh...?)

    but that doesnt have much to do with my main question.

    how to get from relative zone coords back to worldspace....


    -------------------------------------------------------------------
    search and u will find, that sounds real spectacular, but really wth is this for useless info

    is there anyone who has encountered this problem. Or that has already done research on this topic...?????

  5. #5
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by felixdekat View Post
    if you read into my post you see that i posted the zone info coords, so ofcourse i do realize that the zones are between 2 coordinates in the worldmap(doh...?)

    but that doesnt have much to do with my main question.

    how to get from relative zone coords back to worldspace....


    -------------------------------------------------------------------
    search and u will find, that sounds real spectacular, but really wth is this for useless info

    is there anyone who has encountered this problem. Or that has already done research on this topic...?????

    Uhm .. Yah?

    Take your coordinate, say [0.2;0.5]. You know from WorldMapArea.dbc, that your current map is from [123734.122;723.2] to [163262.162;836.25]. So now, you get the math started..

    Code:
    1632.62162 - 1237.34122 = 395.2804
    836.25 - 723.2 = 113.05
    
    0.2 * 395.2804 = 79.05608
    0.5 * 113.05 = 56.525
    
    1237.34122 + 79.05608 = 1316.3973
    723.2 + 56.525 = 779.725
    OMG BIG DEAL!11

    I hope, you realize that my post was everything you need. I was just amazed by the work you did for getting all those values as they are just listed in the DBC. And are exactely what you need.

  6. #6
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They gave you all the ****ing information you requested ffs.

    Read the 2 coordinate pairs from said DBC file.

    Example:

    First record in the WorldMapArea.dbc is durotar -> get the pairs:

    A.y FF 4F F5 C4 ~= -1962f
    B.y FF 8F E2 C5 ~= ..
    A.x AA 0A E2 44 ~= ..
    B.x 55 95 D6 C4 ~= ..

    The values x,y you get from the GetPlayerMapPosition function are in [0, 1] x [0, 1].

    You can do the math. (Or not)

    Edit: Gnah, too late.

  7. #7
    felixdekat's Avatar Member
    Reputation
    2
    Join Date
    Aug 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by schlumpf View Post
    Uhm .. Yah?

    Take your coordinate, say [0.2;0.5]. You know from WorldMapArea.dbc, that your current map is from [123734.122;723.2] to [163262.162;836.25]. So now, you get the math started..

    Code:
    1632.62162 - 1237.34122 = 395.2804
    836.25 - 723.2 = 113.05
    
    0.2 * 395.2804 = 79.05608
    0.5 * 113.05 = 56.525
    
    1237.34122 + 79.05608 = 1316.3973
    723.2 + 56.525 = 779.725
    OMG BIG DEAL!11

    I hope, you realize that my post was everything you need. I was just amazed by the work you did for getting all those values as they are just listed in the DBC. And are exactely what you need.

    really, why is everyone influenced by others swearing on this forums, whats the use as im just trying to improve(bah)??

    anyway, i didnt do that much work to get the values, as i just took them from the data file as you stated above. i just tried to see the logic between them so i wrote them on a screen.

    tnx anyway , ill try what u said and will see if thats what i meant.
    Last edited by felixdekat; 07-23-2009 at 04:15 PM.

Similar Threads

  1. Replies: 8
    Last Post: 04-15-2010, 09:26 PM
  2. Replies: 0
    Last Post: 03-14-2008, 10:40 PM
  3. Replies: 0
    Last Post: 02-05-2008, 09:38 PM
  4. World of Warcraft Player ownd by Mommy and Lacrosse lol
    By rageelf in forum Community Chat
    Replies: 3
    Last Post: 08-22-2007, 12:56 PM
  5. How to World PvP on a PvE server for New players
    By Ðeception in forum World of Warcraft Guides
    Replies: 7
    Last Post: 12-20-2006, 10:00 PM
All times are GMT -5. The time now is 07:53 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search