ok, we have custom maps, but the water tiles are still the same. but we cannot place any ships anywhere, not even at a dock.

any suggestions?
fixes?

* * * * E D I T * * * *
Client Version = 7.0.63.2
Water Tiles = Standard
 
Last edited:
Ok, here is what is in BaseBoat, and how do I set it to Tram/Brit or just ALL of Tram map...

public static bool IsValidLocation(Point3D p, Map map)
{
Rectangle2D[] wrap = GetWrapFor(map);

for (int i = 0; i < wrap.Length; ++i)
{
if (wrap.Contains(p))
return true;
}

return false;
}

public static Rectangle2D[] GetWrapFor(Map m)
{
if (m == Map.Ilshenar)
return m_IlshWrap;
else if (m == Map.Tokuno)
return m_TokunoWrap;
else
return m_BritWrap;
}
 
the GetWrapFor returns the Rectangle2D[] of the map. that map is specified at the top of the script.
mine looks like this
Code:
   public abstract class BaseBoat : BaseMulti
    {
        private static readonly Rectangle2D[] m_BritWrap = new Rectangle2D[] { new Rectangle2D(16, 16, 5120 - 32, 4096 - 32), new Rectangle2D(5136, 2320, 992, 1760) };
        private static readonly Rectangle2D[] m_IlshWrap = new Rectangle2D[] { new Rectangle2D(16, 16, 2304 - 32, 1600 - 32) };
        private static readonly Rectangle2D[] m_TokunoWrap = new Rectangle2D[] { new Rectangle2D(16, 16, 1448 - 32, 1448 - 32) };

so to edit the m_BritWrap to just contain the whole map as a valid spot to place a boat you would do this

Code:
private static readonly Rectangle2D[] m_BritWrap = new Rectangle2D[] { new Rectangle2D(16, 16, 7168 - 32, 4096 - 32) };
 
the other spot to check is within BaseBoat.cs

search for
Code:
public bool CanFit(Point3D p, Map map, int itemID)
and then down a few lines is this stuff. here's what mine looks like, it's custom
Code:
                    bool hasWater = false;
                    if (landTile.Z == p.Z && ((landTile.ID >= 168 && landTile.ID <= 171) || (landTile.ID >= 310 && landTile.ID <= 311) || (landTile.ID >= 3432 && landTile.ID <= 3435)
                         || (landTile.ID >= 16368 && landTile.ID <= 16371)
                          || (landTile.ID >= 15849 && landTile.ID <= 15852)
                           || (landTile.ID >= 1703 && landTile.ID <= 1710)))
                        hasWater = true;
i've imported custom art just for my transparent water and so had to add those tile itemID's to the list here of valid itemID's where a boat can fit.
 
If you are using custom transparent water check the statics placement part
Code:
                    StaticTile[] tiles = map.Tiles.GetStaticTiles(tx, ty, true);
                    for (int i = 0; i < tiles.Length; ++i)
                    {
                        StaticTile tile = tiles[i];
                        bool isWater = ((tile.ID >= 0x1796 && tile.ID <= 0x17B2)
                            || (tile.ID >= 0x1fa3 && tile.ID <= 0x1fca)
                           || (tile.ID >= 12809 && tile.ID <= 12933));

                        if (tile.Z == p.Z && isWater)
                            hasWater = true;
                        else if (tile.Z >= p.Z && !isWater)
                            return false;
                    }
 
Back