Esempio n. 1
0
        public void SetMountBlock(BlockMountType type, TimeSpan duration, bool dismount)
        {
            if (dismount)
            {
                if (this.Mount != null)
                {
                    this.Mount.Rider = null;
                }
                else if (AnimalForm.UnderTransformation(this))
                {
                    AnimalForm.RemoveContext(this, true);
                }
            }

            if ((m_MountBlock == null) || !m_MountBlock.m_Timer.Running || (m_MountBlock.m_Timer.Next < (DateTime.UtcNow + duration)))
            {
                m_MountBlock = new MountBlock(duration, type, this);
            }
        }
Esempio n. 2
0
 private static bool CheckBlock(MountBlock block)
 {
     return ((block is MountBlock) && block.m_Timer.Running);
 }
Esempio n. 3
0
        public void SetMountBlock(BlockMountType type, TimeSpan duration, bool dismount)
        {
            if (dismount)
            {
                if (this.Mount != null)
                {
                    this.Mount.Rider = null;
                }
            }

            if ((m_MountBlock == null) || !m_MountBlock.m_Timer.Running || (m_MountBlock.m_Timer.Next < (DateTime.UtcNow + duration)))
            {
                m_MountBlock = new MountBlock(duration, type, this);
            }
        }