Exemplo n.º 1
0
        static void GetWalkableTiles(TibiaMapFile map)
        {
            int  posx, posy, posz;
            long posOffset;

            for (int x = 0; x < 256; x++)
            {
                for (int y = 0; y < 256; y++)
                {
                    posx = (map.BaseX << 8) + x;
                    posy = (map.BaseY << 8) + y;
                    posz = (map.BaseZ);

                    posOffset = GetPositionOffset(posx, posy, posz);
                    if (map.GetHasTile(x, y) && !map.GetIsUnwalkable(x, y) && !TileWalkableStates.Contains(posOffset))
                    {
                        TileWalkableStates.Add(posOffset);
                    }
                }
            }
        }