Ejemplo n.º 1
0
        public void SpawnMiniChamp()
        {
            if (m_MiniAltar != null)
            {
                m_MiniAltar.Hue = 0x26;
            }

            if (m_MiniPlatform != null)
            {
                m_MiniPlatform.Hue = 0x452;
            }

            m_Kills = 0;
            Level   = 0;
            InvalidateProperties();
            SetWhiteSkullCount(0);

            try
            {
                m_MiniChamp = Activator.CreateInstance(MiniChampSpawnInfo.GetInfo(m_Type).MiniChamp) as Mobile;
            }
            catch { }

            if (m_MiniChamp != null)
            {
                m_MiniChamp.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
            }
        }
Ejemplo n.º 2
0
        public Mobile Spawn()
        {
            Type[][] types = MiniChampSpawnInfo.GetInfo(m_Type).MiniSpawnTypes;

            int v = GetSubLevel();

            if (v >= 0 && v < types.Length)
            {
                return(Spawn(types[v]));
            }

            return(null);
        }
Ejemplo n.º 3
0
        public int GetSubLevelFor(Mobile m)
        {
            Type[][] types = MiniChampSpawnInfo.GetInfo(m_Type).MiniSpawnTypes;
            Type     t     = m.GetType();

            for (int i = 0; i < types.GetLength(0); i++)
            {
                Type[] individualTypes = types[i];

                for (int j = 0; j < individualTypes.Length; j++)
                {
                    if (t == individualTypes[j])
                    {
                        return(i);
                    }
                }
            }

            return(-1);
        }