Beispiel #1
0
            public bool IsExpired(BaseMount mount)
            {
                if (m_Type == BlockMountType.RidingSwipe)
                {
                    if (DateTime.UtcNow < m_Expiration)
                    {
                        return(false);
                    }
                    else if (m_Mount != null && mount != null && m_Mount == mount)
                    {
                        if (mount.Hits >= mount.HitsMax)
                        {
                            BaseMount.ExpireMountPrevention(m_Mobile);
                            return(true);
                        }
                    }
                    else if (m_Mobile != null)
                    {
                        if (m_Mobile.Hits >= m_Mobile.HitsMax)
                        {
                            BaseMount.ExpireMountPrevention(m_Mobile);
                            return(true);
                        }
                    }

                    return(false);
                }

                BaseMount.ExpireMountPrevention(m_Mobile);
                return(DateTime.UtcNow >= m_Expiration);
            }
Beispiel #2
0
            public bool IsExpired(BaseMount mount)
            {
                if (m_Type >= BlockMountType.RidingSwipe)
                {
                    if (Core.SA && DateTime.UtcNow < m_Expiration)
                    {
                        return(false);
                    }
                    else
                    {
                        if (mount != m_Mount)
                        {
                            return(true);
                        }

                        switch (m_Type)
                        {
                        default:
                        case BlockMountType.RidingSwipe:
                        {
                            if ((!Core.SA && m_Mount == null) || m_Mount is Mobile && ((Mobile)m_Mount).Hits >= ((Mobile)m_Mount).HitsMax)
                            {
                                BaseMount.ExpireMountPrevention(m_Mobile);
                                return(true);
                            }
                        }
                        break;

                        case BlockMountType.RidingSwipeEthereal:
                        {
                            BaseMount.ExpireMountPrevention(m_Mobile);
                            return(true);
                        }

                        case BlockMountType.RidingSwipeFlying:
                        {
                            if (m_Mobile.Hits >= m_Mobile.HitsMax)
                            {
                                BaseMount.ExpireMountPrevention(m_Mobile);
                                return(true);
                            }
                        }
                        break;
                        }
                    }

                    return(false);
                }

                if (DateTime.UtcNow >= m_Expiration)
                {
                    BaseMount.ExpireMountPrevention(m_Mobile);
                    return(true);
                }

                return(false);
            }