예제 #1
0
        public ChampionSpawn()
            : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures   = new List <Mobile>();
            m_RedSkulls   = new List <Item>();
            m_WhiteSkulls = new List <Item>();

            m_Platform = new ChampionPlatform(this);
            m_Altar    = new ChampionAltar(this);
            m_Idol     = new IdolOfTheChampion(this);

            m_ExpireDelay  = TimeSpan.FromMinutes(10.0);
            m_RestartDelay = TimeSpan.FromMinutes(10.0);

            m_DamageEntries = new Dictionary <Mobile, int>();
            m_RandomizeType = false;

            SpawnRadius = 35;
            SpawnMod    = 1;

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(SetInitialSpawnArea));
        }
예제 #2
0
            protected override void OnTarget(Mobile from, object targ)
            {
                if (from == null || from.AccessLevel < AccessLevel.Administrator)
                {
                    return;
                }

                ChampionSpawn spawn = targ switch
                {
                    ChampionSpawn championSpawn => championSpawn,
                    IdolOfTheChampion champion => champion.Spawn,
                    ChampionAltar altar => altar.Spawn,
                    ChampionPlatform platform => platform.Spawn,
                              _ => null
                };

                if (spawn == null)
                {
                    from.SendMessage("That is not a valid target. Please target the champion, altar, platform, or idol.");
                }

                spawn?.DeleteCreatures();
                spawn?.Champion?.Delete();
            }
        }
예제 #3
0
        public ChampionSpawn() : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures   = new ArrayList();
            m_RedSkulls   = new ArrayList();
            m_WhiteSkulls = new ArrayList();

            m_Platform = new ChampionPlatform(this);
            m_Altar    = new ChampionAltar(this);

            m_ExpireDelay  = TimeSpan.FromMinutes(10.0);
            m_RestartDelay = TimeSpan.FromMinutes(5.0);

            m_SpawnRange = 24;
        }
예제 #4
0
		public ChampionSpawn() : base( 0xBD2 )
		{
			Movable = false;
			Visible = false;

			m_Creatures = new List<Mobile>();
			m_RedSkulls = new List<Item>();
			m_WhiteSkulls = new List<Item>();

			m_Platform = new ChampionPlatform( this );
			m_Altar = new ChampionAltar( this );
			m_Idol = new IdolOfTheChampion( this );

			m_ExpireDelay = TimeSpan.FromMinutes( 10.0 );
			m_RestartDelay = TimeSpan.FromMinutes( 5.0 );

			Timer.DelayCall( TimeSpan.Zero, new TimerCallback( SetInitialSpawnArea ) );
		}
예제 #5
0
        public ChampionSpawn() : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures   = new List <Mobile>();
            m_RedSkulls   = new List <Item>();
            m_WhiteSkulls = new List <Item>();

            m_Platform = new ChampionPlatform(this);
            m_Altar    = new ChampionAltar(this);
            m_Idol     = new IdolOfTheChampion(this);

            m_ExpireDelay  = TimeSpan.FromMinutes(10.0);
            m_RestartDelay = TimeSpan.FromMinutes(5.0);

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(SetInitialSpawnArea));
        }
예제 #6
0
        public ChampionSpawn() : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures   = new List <Mobile>();
            m_RedSkulls   = new List <Item>();
            m_WhiteSkulls = new List <Item>();

            m_Platform = new ChampionPlatform(this);
            m_Altar    = new ChampionAltar(this);
            m_Idol     = new IdolOfTheChampion(this);

            ExpireDelay   = TimeSpan.FromMinutes(30.0);
            RestartDelay  = TimeSpan.FromMinutes(30.0);
            DamageEntries = new Dictionary <Mobile, int>();

            Timer.StartTimer(TimeSpan.Zero, SetInitialSpawnArea);
        }
		public ChampionSpawn() : base( 0xBD2 )
		{
			Movable = false;
			Visible = false;

			m_Creatures = new ArrayList();
			m_RedSkulls = new ArrayList();
			m_WhiteSkulls = new ArrayList();

			m_Platform = new ChampionPlatform( this );
			m_Altar = new ChampionAltar( this );

// *** Added for Valor ***
			m_Idol = new ChampionIdol( this );
			m_UseRestartDelay = true;
// *** ***

			m_ExpireDelay = TimeSpan.FromMinutes( 10.0 );
			m_RestartDelay = TimeSpan.FromMinutes( 5.0 );

			m_SpawnRange = 17;
		}
예제 #8
0
        public ChampionSpawn()
            : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures   = new List <Mobile>();
            m_RedSkulls   = new List <Item>();
            m_WhiteSkulls = new List <Item>();

            m_Platform = new ChampionPlatform(this);
            m_Altar    = new ChampionAltar(this);
            m_Idol     = new IdolOfTheChampion(this);

            m_ExpireDelay  = TimeSpan.FromMinutes(10.0);
            m_RestartDelay = TimeSpan.FromMinutes(5.0);
            m_KickDelay    = TimeSpan.FromMinutes(5.0);

            m_DamageEntries = new Dictionary <Mobile, int>();

            // Set initial spawn area (50 by default)
            SetSpawnArea(50);
        }
예제 #9
0
        public ChampionSpawn()
            : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures = new List<Mobile>();
            m_RedSkulls = new List<Item>();
            m_WhiteSkulls = new List<Item>();

            m_Platform = new ChampionPlatform( this );
            m_Altar = new ChampionAltar( this );
            m_Idol = new IdolOfTheChampion( this );

            m_ExpireDelay = TimeSpan.FromMinutes( 10.0 );
            m_RestartDelay = TimeSpan.FromMinutes( 5.0 );
            m_KickDelay = TimeSpan.FromMinutes( 5.0 );

            m_DamageEntries = new Dictionary<Mobile, int>();

            // Set initial spawn area (50 by default)
            SetSpawnArea( 50 );
        }
예제 #10
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            m_DamageEntries = new Dictionary<Mobile, int>();

            int version = reader.ReadInt();

            switch (version)
            {
                case 5:
                    {
                        int entries = reader.ReadInt();
                        Mobile m;
                        int damage;
                        for (int i = 0; i < entries; ++i)
                        {
                            m = reader.ReadMobile();
                            damage = reader.ReadInt();

                            if (m == null)
                                continue;

                            m_DamageEntries.Add(m, damage);
                        }

                        goto case 4;
                    }
                case 4:
                    {
                        m_ConfinedRoaming = reader.ReadBool();
                        m_Idol = reader.ReadItem<IdolOfTheChampion>();
                        m_HasBeenAdvanced = reader.ReadBool();

                        goto case 3;
                    }
                case 3:
                    {
                        m_SpawnArea = reader.ReadRect2D();

                        goto case 2;
                    }
                case 2:
                    {
                        m_RandomizeType = reader.ReadBool();

                        goto case 1;
                    }
                case 1:
                    {
                        if (version < 3)
                        {
                            int oldRange = reader.ReadInt();

                            m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange));
                        }

                        m_Kills = reader.ReadInt();

                        goto case 0;
                    }
                case 0:
                    {
                        if (version < 1)
                            m_SpawnArea = new Rectangle2D(new Point2D(X - 24, Y - 24), new Point2D(X + 24, Y + 24));	//Default was 24

                        bool active = reader.ReadBool();
                        m_Type = (ChampionSpawnType)reader.ReadInt();
                        m_Creatures = reader.ReadStrongMobileList();
                        m_RedSkulls = reader.ReadStrongItemList();
                        m_WhiteSkulls = reader.ReadStrongItemList();
                        m_Platform = reader.ReadItem<ChampionPlatform>();
                        m_Altar = reader.ReadItem<ChampionAltar>();
                        m_ExpireDelay = reader.ReadTimeSpan();
                        m_ExpireTime = reader.ReadDeltaTime();
                        m_Champion = reader.ReadMobile();
                        m_RestartDelay = reader.ReadTimeSpan();

                        if (reader.ReadBool())
                        {
                            m_RestartTime = reader.ReadDeltaTime();
                            BeginRestart(m_RestartTime - DateTime.Now);
                        }

                        if (version < 4)
                        {
                            m_Idol = new IdolOfTheChampion(this);
                            m_Idol.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
                        }

                        if (m_Platform == null || m_Altar == null || m_Idol == null)
                            Delete();
                        else if (active)
                            Start();

                        break;
                    }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
        }
예제 #11
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 4:
            {
                m_ConfinedRoaming = reader.ReadBool();
                m_Idol            = reader.ReadItem <IdolOfTheChampion>();
                m_HasBeenAdvanced = reader.ReadBool();

                goto case 3;
            }

            case 3:
            {
                m_SpawnArea = reader.ReadRect2D();

                goto case 2;
            }

            case 2:
            {
                m_RandomizeType = reader.ReadBool();

                goto case 1;
            }

            case 1:
            {
                if (version < 3)
                {
                    int oldRange = reader.ReadInt();

                    m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange));
                }

                m_Kills = reader.ReadInt();

                goto case 0;
            }

            case 0:
            {
                if (version < 1)
                {
                    m_SpawnArea = new Rectangle2D(new Point2D(X - 24, Y - 24), new Point2D(X + 24, Y + 24));                                    //Default was 24
                }
                bool active = reader.ReadBool();
                m_Type         = (ChampionSpawnType)reader.ReadInt();
                m_Creatures    = reader.ReadStrongMobileList();
                m_RedSkulls    = reader.ReadStrongItemList();
                m_WhiteSkulls  = reader.ReadStrongItemList();
                m_Platform     = reader.ReadItem <ChampionPlatform>();
                m_Altar        = reader.ReadItem <ChampionAltar>();
                m_ExpireDelay  = reader.ReadTimeSpan();
                m_ExpireTime   = reader.ReadDeltaTime();
                m_Champion     = reader.ReadMobile();
                m_RestartDelay = reader.ReadTimeSpan();

                if (reader.ReadBool())
                {
                    m_RestartTime = reader.ReadDeltaTime();
                    BeginRestart(m_RestartTime - DateTime.Now);
                }

                if (version < 4)
                {
                    m_Idol = new IdolOfTheChampion(this);
                    m_Idol.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
                }

                if (m_Platform == null || m_Altar == null || m_Idol == null)
                {
                    Delete();
                }
                else if (active)
                {
                    Start();
                }

                break;
            }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
        }
예제 #12
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            m_DamageEntries = new Dictionary <Mobile, int>();

            int version = reader.ReadInt();

            switch (version)
            {
            case 5:
            {
                m_KickDelay = reader.ReadTimeSpan();
                m_KickTime  = reader.ReadDateTime();

                m_SpawnArea = reader.ReadRect2D();

                goto case 4;
            }

            case 4:
            {
                int    entries = reader.ReadInt();
                Mobile m;
                int    damage;
                for (int i = 0; i < entries; ++i)
                {
                    m      = reader.ReadMobile();
                    damage = reader.ReadInt();

                    if (m != null)
                    {
                        m_DamageEntries.Add(m, damage);
                    }
                }

                goto case 3;
            }

            case 3:
            {
                m_HasBeenAdvanced = reader.ReadBool();

                m_Idol = reader.ReadItem() as IdolOfTheChampion;

                goto case 2;
            }

            case 2:
            {
                m_RandomizeType = reader.ReadBool();

                goto case 1;
            }

            case 1:
            {
                if (version < 5)
                {
                    int oldRange = reader.ReadInt();

                    m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange));
                }

                m_Kills = reader.ReadInt();

                goto case 0;
            }

            case 0:
            {
                if (version < 1)
                {
                    SetSpawnArea(50);
                }

                bool active = reader.ReadBool();
                m_Type         = (ChampionSpawnType)reader.ReadInt();
                m_Creatures    = reader.ReadStrongMobileList();
                m_RedSkulls    = reader.ReadStrongItemList();
                m_WhiteSkulls  = reader.ReadStrongItemList();
                m_Platform     = reader.ReadItem <ChampionPlatform>();
                m_Altar        = reader.ReadItem <ChampionAltar>();
                m_ExpireDelay  = reader.ReadTimeSpan();
                m_ExpireTime   = reader.ReadDeltaTime();
                m_Champion     = reader.ReadMobile();
                m_RestartDelay = reader.ReadTimeSpan();

                if (reader.ReadBool())
                {
                    m_RestartTime = reader.ReadDeltaTime();
                    BeginRestart(m_RestartTime - DateTime.Now);
                }

                if (m_Platform == null || m_Altar == null)
                {
                    Delete();
                }
                else if (active)
                {
                    Start(false);
                }

                break;
            }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
        }
예제 #13
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            this.m_DamageEntries = new Dictionary <Mobile, int>();

            int version = reader.ReadInt();

            switch (version)
            {
            case 7:
                KillsMod  = reader.ReadDouble();
                GroupName = reader.ReadString();
                goto case 6;

            case 6:
                SpawnName   = reader.ReadString();
                AutoRestart = reader.ReadBool();
                SpawnMod    = reader.ReadDouble();
                SpawnRadius = reader.ReadInt();
                goto case 5;

            case 5:
            {
                int    entries = reader.ReadInt();
                Mobile m;
                int    damage;
                for (int i = 0; i < entries; ++i)
                {
                    m      = reader.ReadMobile();
                    damage = reader.ReadInt();

                    if (m == null)
                    {
                        continue;
                    }

                    this.m_DamageEntries.Add(m, damage);
                }

                goto case 4;
            }

            case 4:
            {
                this.m_ConfinedRoaming = reader.ReadBool();
                this.m_Idol            = reader.ReadItem <IdolOfTheChampion>();
                this.m_HasBeenAdvanced = reader.ReadBool();

                goto case 3;
            }

            case 3:
            {
                this.m_SpawnArea = reader.ReadRect2D();

                goto case 2;
            }

            case 2:
            {
                this.m_RandomizeType = reader.ReadBool();

                goto case 1;
            }

            case 1:
            {
                if (version < 3)
                {
                    int oldRange = reader.ReadInt();

                    this.m_SpawnArea = new Rectangle2D(new Point2D(this.X - oldRange, this.Y - oldRange), new Point2D(this.X + oldRange, this.Y + oldRange));
                }

                this.m_Kills = reader.ReadInt();

                goto case 0;
            }

            case 0:
            {
                if (version < 1)
                {
                    this.m_SpawnArea = new Rectangle2D(new Point2D(this.X - 24, this.Y - 24), new Point2D(this.X + 24, this.Y + 24));           //Default was 24
                }
                bool active = reader.ReadBool();
                this.m_Type         = (ChampionSpawnType)reader.ReadInt();
                this.m_Creatures    = reader.ReadStrongMobileList();
                this.m_RedSkulls    = reader.ReadStrongItemList();
                this.m_WhiteSkulls  = reader.ReadStrongItemList();
                this.m_Platform     = reader.ReadItem <ChampionPlatform>();
                this.m_Altar        = reader.ReadItem <ChampionAltar>();
                this.m_ExpireDelay  = reader.ReadTimeSpan();
                this.m_ExpireTime   = reader.ReadDeltaTime();
                this.m_Champion     = reader.ReadMobile();
                this.m_RestartDelay = reader.ReadTimeSpan();

                if (reader.ReadBool())
                {
                    this.m_RestartTime = reader.ReadDeltaTime();
                    this.BeginRestart(this.m_RestartTime - DateTime.UtcNow);
                }

                if (version < 4)
                {
                    this.m_Idol = new IdolOfTheChampion(this);
                    this.m_Idol.MoveToWorld(new Point3D(this.X, this.Y, this.Z - 15), this.Map);
                }

                if (this.m_Platform == null || this.m_Altar == null || this.m_Idol == null)
                {
                    this.Delete();
                }
                else if (active)
                {
                    this.Start();
                }

                break;
            }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
        }
        public ChampionSpawn()
            : base(0xBD2)
        {
            this.Movable = false;
            this.Visible = false;

            this.m_Creatures = new List<Mobile>();
            this.m_RedSkulls = new List<Item>();
            this.m_WhiteSkulls = new List<Item>();

            this.m_Platform = new ChampionPlatform(this);
            this.m_Altar = new ChampionAltar(this);
            this.m_Idol = new IdolOfTheChampion(this);

            this.m_ExpireDelay = TimeSpan.FromMinutes(10.0);
            this.m_RestartDelay = TimeSpan.FromMinutes(10.0);

            this.m_DamageEntries = new Dictionary<Mobile, int>();
			this.m_RandomizeType = false;

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(SetInitialSpawnArea));
        }
예제 #15
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 2:
                {
                    m_RandomizeType = reader.ReadBool();

                    goto case 1;
                }
                case 1:
                {
                    m_SpawnRange = reader.ReadInt();
                    m_Kills = reader.ReadInt();

                    goto case 0;
                }
                case 0:
                {
                    if ( version < 1 )
                        m_SpawnRange = 24;

                    bool active = reader.ReadBool();
                    m_Type = (ChampionSpawnType)reader.ReadInt();
                    m_Creatures = reader.ReadMobileList();
                    m_RedSkulls = reader.ReadItemList();
                    m_WhiteSkulls = reader.ReadItemList();
                    m_Platform = reader.ReadItem() as ChampionPlatform;
                    m_Altar = reader.ReadItem() as ChampionAltar;
                    m_ExpireDelay = reader.ReadTimeSpan();
                    m_ExpireTime = reader.ReadDeltaTime();
                    m_Champion = reader.ReadMobile();
                    m_RestartDelay = reader.ReadTimeSpan();

                    if ( reader.ReadBool() )
                    {
                        m_RestartTime = reader.ReadDeltaTime();
                        BeginRestart( m_RestartTime - Core.Now );
                    }

                    if ( m_Platform == null || m_Altar == null )
                        Delete();
                    else if ( active )
                        Start();

                    break;
                }
            }
        }
예제 #16
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 3:
            {
                m_IsValorUsed = reader.ReadBool();

                m_Idol = reader.ReadItem() as ChampionIdol;

                goto case 2;
            }

            case 2:
            {
                m_RandomizeType = reader.ReadBool();

                goto case 1;
            }

            case 1:
            {
                m_SpawnRange = reader.ReadInt();
                m_Kills      = reader.ReadInt();

                goto case 0;
            }

            case 0:
            {
                if (version < 1)
                {
                    m_SpawnRange = 24;
                }

                bool active = reader.ReadBool();
                m_Type         = (ChampionSpawnType)reader.ReadInt();
                m_Creatures    = reader.ReadMobileList();
                m_RedSkulls    = reader.ReadItemList();
                m_WhiteSkulls  = reader.ReadItemList();
                m_Platform     = reader.ReadItem() as ChampionPlatform;
                m_Altar        = reader.ReadItem() as ChampionAltar;
                m_ExpireDelay  = reader.ReadTimeSpan();
                m_ExpireTime   = reader.ReadDeltaTime();
                m_Champion     = reader.ReadMobile();
                m_RestartDelay = reader.ReadTimeSpan();

                if (reader.ReadBool())
                {
                    m_RestartTime = reader.ReadDeltaTime();
                    BeginRestart(m_RestartTime - DateTime.Now);
                }

                if (m_Platform == null || m_Altar == null)
                {
                    Delete();
                }
                else if (active)
                {
                    Start();
                }

                break;
            }
            }
        }
예제 #17
0
        public ChampionSpawn()
            : base(0xBD2)
        {
            Movable = false;
            Visible = false;

            m_Creatures = new ArrayList();
            m_RedSkulls = new ArrayList();
            m_WhiteSkulls = new ArrayList();

            m_Platform = new ChampionPlatform( this );
            m_Altar = new ChampionAltar( this );

            m_ExpireDelay = TimeSpan.FromMinutes( 10.0 );
            m_RestartDelay = TimeSpan.FromMinutes( 5.0 );

            m_SpawnRange = 24;
        }