• Visit Rebornbuddy
  • [?] WoWPoint in Bounds

    Discussion in 'Archives' started by Smarter, Dec 12, 2011.

    1. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      I am attempting to write a method for determining a WoWPoint's ZoneID. By iterating the WoWDB I have the bounds of each Map, using this data I need a method of checking if a WoWPoint is within those bounds? :-\

      Trying this out .... Scary Results.
      Code:
        
                      if (location.X <= map.AX && location.X >= map.BX && location.Y <= map.AY && location.Y >= map.BY)
                      {
                          Logging.Write(string.Format("Your Location is in Zone: [{0}] {1}", map.Id, map.WorldMapName));
                      }
      
      Code:
      Maps Generated: 211
      Attempting to find ZoneID from Location: <-1303.223, 6580.17, 147.7242>
      Your Location is in Zone: [1] Kalimdor
      Your Location is in Zone: [0] Azeroth
      Your Location is in Zone: [530] Expansion01
      Your Location is in Zone: [530] Zangarmarsh
      Your Location is in Zone: [530] Nagrand
      Your Location is in Zone: [530] TerokkarForest
      Your Location is in Zone: [668] HallsofReflection
      
       
      Last edited: Dec 12, 2011
    2. exemplar

      exemplar New Member

      Joined:
      Mar 16, 2010
      Messages:
      167
      Likes Received:
      32
      Trophy Points:
      0
    3. Inrego

      Inrego New Member Buddy Store Developer

      Joined:
      Feb 7, 2010
      Messages:
      2,765
      Likes Received:
      71
      Trophy Points:
      0
      What he said ^
       
    4. Phoenix_x1337

      Phoenix_x1337 New Member

      Joined:
      Oct 26, 2011
      Messages:
      89
      Likes Received:
      0
      Trophy Points:
      0
      You can see your own location by using the profile writers plugin from Honorbuddy.

      Saves you some work and trouble.
       
    5. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      .... You don't read well. I'm trying to find the ZoneID from ANY WoWPoint. As in, WITHOUT BEING THERE?
       
    6. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      all continents (and instances) have their own wowpoints

      so you'll have to ask continent id (mapid) and then you can try it that way (zoneid = area / zone)

      wasn't there another thread similar to this last week?
       
      Last edited: Dec 12, 2011
    7. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      Yes, and I created a method to do this, but it's returning multiple Maps having that location.
       
    8. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      .....?
       
    9. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Maybe because, oh I don't know, maps are layered?

      Crossroads is inside the Barrens, which is inside Kalimdor. Get it?
       
    10. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      So there is no method whatsoever to strip that down a bit better? I am just looking to get the Continent truly, so I can have it switch to the correct continent. The current Navigator will get it where it needs to go?
       
    11. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Erm... what?

      Continents are continents.

      Zones are zones.

      I'm still not sure what you're trying to do. But the zone DBC stuff has a "parent" field that shows the layers for the world-map.
       
    12. Inrego

      Inrego New Member Buddy Store Developer

      Joined:
      Feb 7, 2010
      Messages:
      2,765
      Likes Received:
      71
      Trophy Points:
      0
      He's trying to find out what continent a certain WoWPoint is in.
       
    13. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      I'm just looking to assist Navigator in making it to it's destination. If I can determine a WoWPoints Continent, or narrow down it's Zone, I can write a method for it to get within a range that base Navigator can take over.
       

    Share This Page