コード例 #1
0
ファイル: CharybdisSpawner.cs プロジェクト: Evad-lab/ServUOX
        public CharydbisSpawner()
        {
            m_Charydbis  = null;
            m_NextSpawn  = DateTime.UtcNow;
            m_IsSummoned = false;
            m_HasSpawned = false;

            Active = true;
        }
コード例 #2
0
ファイル: CharybdisSpawner.cs プロジェクト: Evad-lab/ServUOX
        public void SpawnCharydbis(Mobile from, Point3D pnt, Map map, BaseBoat boat)
        {
            Effects.PlaySound(pnt, map, 0x668);

            m_Charydbis = new Charydbis(from);
            from.SendMessage("It seems as though you've snagged your hook.");

            Timer.DelayCall(TimeSpan.FromSeconds(11), new TimerStateCallback(DoTeleportEffect), new object[] { pnt, map });
            Timer.DelayCall(TimeSpan.FromSeconds(12), new TimerStateCallback(DoDelayedSpawn), new object[] { from, pnt, map, boat });
        }
コード例 #3
0
ファイル: Charybdis.cs プロジェクト: pallop/Servuo
 public EffectsTimer(Charydbis mobile, Point3DList path, Direction dir, int imax)
     : base(TimeSpan.FromSeconds(0.25), TimeSpan.FromSeconds(0.25))
 {
     m_Dir    = dir;
     m_I      = 1;
     m_IMax   = imax;
     m_Path   = path;
     m_Mobile = mobile;
     Priority = TimerPriority.FiftyMS;
     this.Start();
 }
コード例 #4
0
ファイル: CharybdisSpawner.cs プロジェクト: Evad-lab/ServUOX
        public void OnCharybdisKilled()
        {
            DateTime timeout = m_LastAttempt + KillDelay;

            if (m_LastAttempt + KillDelay < DateTime.UtcNow)
            {
                m_Charydbis = null;
                Reset();
            }
            else
            {
                TimeSpan ts = timeout - DateTime.UtcNow;
                m_NextSpawn = DateTime.UtcNow + ts;
                m_Timer     = new InternalTimer(this, ts);
                m_Timer.Start();
            }
        }
コード例 #5
0
ファイル: CharybdisSpawner.cs プロジェクト: Evad-lab/ServUOX
        public void Reset()
        {
            if (m_Charydbis != null && m_Charydbis.Alive)
            {
                IPooledEnumerable eable = m_Charydbis.GetMobilesInRange(12);
                foreach (Mobile mob in eable)
                {
                    if (mob is PlayerMobile)
                    {
                        mob.SendMessage("Charydbis sinks to the depths of the ocean from which it came from...You have taken too long!");
                    }
                }
                eable.Free();

                for (int x = m_Charydbis.X - 1; x <= m_Charydbis.X + 1; x++)
                {
                    for (int y = m_Charydbis.Y - 1; y <= m_Charydbis.Y + 1; y++)
                    {
                        int splash = Utility.RandomList(0x352D, 0x5675);

                        Effects.SendLocationEffect(new Point3D(x, y, m_Charydbis.Z), m_Charydbis.Map, splash, 16, 4);
                        Effects.PlaySound(new Point3D(x, y, m_Charydbis.Z), m_Charydbis.Map, 0x364);
                    }
                }

                m_Charydbis.Delete();
            }

            m_Charydbis       = null;
            m_IsSummoned      = false;
            m_HasSpawned      = false;
            m_CurrentLocation = new Rectangle2D(0, 0, 0, 0);
            m_NextSpawn       = DateTime.UtcNow;

            if (m_Timer != null)
            {
                m_Timer.Stop();
            }
        }
コード例 #6
0
ファイル: CharybdisSpawner.cs プロジェクト: Evad-lab/ServUOX
        public void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_HasSpawned  = reader.ReadBool();
            m_LastAttempt = reader.ReadDateTime();
            m_Active      = reader.ReadBool();

            m_Charydbis       = reader.ReadMobile() as Charydbis;
            m_NextSpawn       = reader.ReadDateTime();
            m_IsSummoned      = reader.ReadBool();
            m_Map             = reader.ReadMap();
            m_CurrentLocation = reader.ReadRect2D();
            m_LastLocation    = reader.ReadRect2D();

            if (m_NextSpawn > DateTime.UtcNow)
            {
                m_Timer = new InternalTimer(this, m_NextSpawn - DateTime.UtcNow);
            }
            else
            {
                Reset();
            }
        }
コード例 #7
0
ファイル: CharybdisSpawner.cs プロジェクト: Crome696/ServUO
        public CharydbisSpawner()
        {
            m_Charydbis = null;
            m_NextSpawn = DateTime.UtcNow;
            m_IsSummoned = false;
            m_HasSpawned = false;

            Active = true;
        }
コード例 #8
0
ファイル: CharybdisSpawner.cs プロジェクト: Crome696/ServUO
        public void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_HasSpawned = reader.ReadBool();
            m_LastAttempt = reader.ReadDateTime();
            m_Active = reader.ReadBool();

            m_Charydbis = reader.ReadMobile() as Charydbis;
            m_NextSpawn = reader.ReadDateTime();
            m_IsSummoned = reader.ReadBool();
            m_Map = reader.ReadMap();
            m_CurrentLocation = reader.ReadRect2D();
            m_LastLocation = reader.ReadRect2D();

            if (m_NextSpawn > DateTime.UtcNow)
                m_Timer = new InternalTimer(this, m_NextSpawn - DateTime.UtcNow);
            else
                Reset();
        }
コード例 #9
0
ファイル: CharybdisSpawner.cs プロジェクト: Crome696/ServUO
        public void Reset()
        {
            if (m_Charydbis != null && m_Charydbis.Alive)
            {
                IPooledEnumerable eable = m_Charydbis.GetMobilesInRange(12);
                foreach (Mobile mob in eable)
                {
                    if (mob is PlayerMobile)
                        mob.SendMessage("Charydbis sinks to the depths of the ocean from which it came from...You have taken too long!");
                }
                eable.Free();

                for (int x = m_Charydbis.X - 1; x <= m_Charydbis.X + 1; x++)
                {
                    for (int y = m_Charydbis.Y - 1; y <= m_Charydbis.Y + 1; y++)
                    {
                        int splash = Utility.RandomList(0x352D, 0x5675);

                        Effects.SendLocationEffect(new Point3D(x, y, m_Charydbis.Z), m_Charydbis.Map, splash, 16, 4);
                        Effects.PlaySound(new Point3D(x, y, m_Charydbis.Z), m_Charydbis.Map, 0x364);
                    }
                }

                m_Charydbis.Delete();
            }

            m_Charydbis = null;
            m_IsSummoned = false;
            m_HasSpawned = false;
            m_CurrentLocation = new Rectangle2D(0, 0, 0, 0);
            m_NextSpawn = DateTime.UtcNow;

            if (m_Timer != null)
                m_Timer.Stop();
        }
コード例 #10
0
ファイル: CharybdisSpawner.cs プロジェクト: Crome696/ServUO
        public void OnCharybdisKilled()
        {
            DateTime timeout = m_LastAttempt + KillDelay;

            if (m_LastAttempt + KillDelay < DateTime.UtcNow)
            {
                m_Charydbis = null;
                Reset();
            }
            else
            {
                TimeSpan ts = timeout - DateTime.UtcNow;
                m_NextSpawn = DateTime.UtcNow + ts;
                m_Timer = new InternalTimer(this, ts);
                m_Timer.Start();
            }
        }
コード例 #11
0
ファイル: CharybdisSpawner.cs プロジェクト: Crome696/ServUO
        public void SpawnCharydbis(Mobile from, Point3D pnt, Map map, BaseBoat boat)
        {
            Effects.PlaySound(pnt, map, 0x668);

            m_Charydbis = new Charydbis(from);
            from.SendMessage("It seems as though you've snagged your hook.");

            Timer.DelayCall(TimeSpan.FromSeconds(11), new TimerStateCallback(DoTeleportEffect), new object[] { pnt, map });
            Timer.DelayCall(TimeSpan.FromSeconds(12), new TimerStateCallback(DoDelayedSpawn), new object[] { from, pnt, map, boat });
        }
コード例 #12
0
ファイル: Charybdis.cs プロジェクト: Crome696/ServUO
 public EffectsTimer(Charydbis mobile, Point3DList path, Direction dir, int imax)
     : base(TimeSpan.FromSeconds(0.25), TimeSpan.FromSeconds(0.25))
 {
     m_Dir = dir;
     m_I = 1;
     m_IMax = imax;
     m_Path = path;
     m_Mobile = mobile;
     Priority = TimerPriority.FiftyMS;
     this.Start();
 }