What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Zeta.Bot.Navigation.MainGridProvider provides incomplete map image

ury0005

New Member
Joined
Apr 24, 2014
Messages
8
Reaction score
0
Sometimes when I query map image by Zeta.Bot.Navigation.MainGridProvider I get wrong image.
I use following code:
Code:
var grid = new Zeta.Bot.Navigation.MainGridProvider();
grid.Update();
var width = grid.Width;
var height = grid.Height;
Logger.Log("Save world map {0} x {1}", width, height);
var image = new WorldVisualizer(width, height);
var pos = new Point();
for (pos.Y = 0; pos.Y <= height; pos.Y++)
{
    for (pos.X = 0; pos.X <= width; pos.X++)
    {
        if (grid.CanStandAt(pos))
        {
            image.SetPixel(pos.X, pos.Y, Color.White);
        }
    }
}
pos = grid.WorldToGrid(Trinity.Player.Position.ToVector2());
image.SetPixel(pos.X, pos.Y, Color.Green);
image.Save(@"map.png");

In this example user (green dot) is outside of "CanStandAt" area:
map1_out_of_CanStandAt.webp
In this example only half of the map is retrieved:
map2_half_map.webp

I use beta build 403.
Is it feature or a bug?
 
Is this right place to ask this question or should I post it to dev's forum?
 
it is the right place its just that help is hard to find.
 
Back
Top