public void Draw(RenderWindow window)
{
var camera = ServiceLocator.WorldManager.PlayerManager.GetPlayer(ServiceLocator.WorldManager.PlayerManager.ClientID).Camera;
var left = (int)(camera.ViewRect.Left / 32);
var top = (int)(camera.ViewRect.Top / 32);
var width = left + (int)(camera.ViewRect.Width / 32) + 2;
var height = top + (int)(camera.ViewRect.Height / 32) + 1;
if (width > this.Width)
width = this.Width;
if (height > this.Height)
height = this.Height;
this.DrawLowerTiles(window, left, top, width, height);
this.DrawMapItems(window, left, top, width, height);
this.DrawPlayers(window, left, top, width, height);
this.DrawNpcs(window, left, top, width, height);
this.DrawUpperTiles(window, left, top, width, height);
}