public virtual void GetRandomStaticTiles(short X, short Y, short Z, Collection[,] StaticMap, bool iRandom)
 {
     if (this.m_StaticTiles.Count > 0)
     {
         Transition.StaticTile randomTile = this.m_StaticTiles.RandomTile;
         StaticMap[(short)(X >> 3), (short)(Y >> 3)].Add(new StaticCell(randomTile.TileID, checked ((byte)(X % 8)), checked ((byte)(Y % 8)), checked ((short)(Z + randomTile.AltIDMod))), null, null, null);
         randomTile = null;
     }
     if (iRandom)
     {
         if (this.m_RandomTiles != null)
         {
             this.m_RandomTiles.GetRandomStatic(X, Y, Z, StaticMap);
         }
     }
 }
        public Transition(string iDescription, string iHashKey, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            IEnumerator enumerator  = null;
            IEnumerator enumerator1 = null;

            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            this.m_HashKey.AddHashKey(iHashKey);
            try
            {
                enumerator1 = iMapTiles.GetEnumerator();
                while (enumerator1.MoveNext())
                {
                    MapTile current = (MapTile)enumerator1.Current;
                    this.m_MapTiles.Add(current);
                }
            }
            finally
            {
                if (enumerator1 is IDisposable)
                {
                    ((IDisposable)enumerator1).Dispose();
                }
            }
            try
            {
                enumerator = iStaticTiles.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    Transition.StaticTile staticTile = (Transition.StaticTile)enumerator.Current;
                    this.m_StaticTiles.Add(staticTile);
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    ((IDisposable)enumerator).Dispose();
                }
            }
        }
 public void RemoveStaticTile(Transition.StaticTile iStaticTile)
 {
     this.m_StaticTiles.Remove(iStaticTile);
 }
        public Transition(string iDescription, string iHashKey, ClsTerrain iGroupA, ClsTerrain iGroupB, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            IEnumerator enumerator  = null;
            IEnumerator enumerator1 = null;

            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            byte num = 0;

            do
            {
                string str = Strings.Mid(iHashKey, checked (num + 1), 1);
                if (StringType.StrCmp(str, "A", false) == 0)
                {
                    this.m_HashKey.Add(new Transition.HashKey(iGroupA.GroupID));
                }
                else if (StringType.StrCmp(str, "B", false) == 0)
                {
                    this.m_HashKey.Add(new Transition.HashKey(iGroupB.GroupID));
                }
                num = checked ((byte)(num + 1));
            }while (num <= 8);
            if (iMapTiles != null)
            {
                try
                {
                    enumerator1 = iMapTiles.GetEnumerator();
                    while (enumerator1.MoveNext())
                    {
                        MapTile current = (MapTile)enumerator1.Current;
                        this.m_MapTiles.Add(current);
                    }
                }
                finally
                {
                    if (enumerator1 is IDisposable)
                    {
                        ((IDisposable)enumerator1).Dispose();
                    }
                }
            }
            if (iStaticTiles != null)
            {
                try
                {
                    enumerator = iStaticTiles.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        Transition.StaticTile staticTile = (Transition.StaticTile)enumerator.Current;
                        this.m_StaticTiles.Add(staticTile);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                }
            }
        }