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); } }
private static bool CheckBlock(MountBlock block) { return ((block is MountBlock) && block.m_Timer.Running); }
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); } }