Beispiel #1
0
        public Mobile Spawn()
        {
            Type[][] types = ChampionSpawnInfo.GetInfo(this.m_Type).SpawnTypes;

            int v = Rank;

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

            return(null);
        }
        public Mobile Spawn()
        {
            Type[][] types = ChampionSpawnInfo.GetInfo(m_Type).SpawnTypes;

            int v = GetSubLevel();

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

            return(null);
        }
Beispiel #3
0
        public int GetSubLevelFor(Mobile m)
        {
            Type[][] types = ChampionSpawnInfo.GetInfo(m_Type).SpawnTypes;
            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);
        }
Beispiel #4
0
        public void SpawnChampion()
        {
            if (m_Altar != null)
            {
                m_Altar.Hue = 0x26;
            }

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

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

            if (m_CustomChampion != null)
            {
                m_Champion       = m_CustomChampion;
                m_CustomChampion = null;
            }
            else
            {
                try
                {
                    m_Champion = Activator.CreateInstance(ChampionSpawnInfo.GetInfo(m_Type).Champion) as Mobile;
                }
                catch
                {
                }
            }

            if (m_Champion != null)
            {
                m_Champion.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
            }
        }