Beispiel #1
0
        public static bool HasBlessing(Mobile m, BlessingType b)
        {
            if (m_Blessings.ContainsKey(m))
            {
                BlessingType blessing = m_Blessings[m];

                if (blessing == b)
                {
                    return(true);
                }
            }

            return(false);
        }
    public static void RefreshBlessingInterfaceOnCurrentPage(BlessingType blessingType)
    {
        try
        {
            dynamic p = GameAssets.CurrentPage;

            HeroStatsPage statsPage = p.StatsFrame.Content;
            statsPage.UpdateBlessingTimer();

            switch (blessingType)
            {
            case BlessingType.ClickDamage:
                statsPage.GenerateStatValueDamageToolTip();
                break;

            case BlessingType.CritChance or BlessingType.CritDamage:
                statsPage.GenerateStatValueCritToolTip();
                break;

            case BlessingType.PoisonDamage:
                statsPage.GenerateStatValuePoisonToolTip();
                break;

            case BlessingType.AuraDamage or BlessingType.AuraSpeed:
                statsPage.GenerateStatValueAuraToolTip();
                break;
            }
        }
        catch (RuntimeBinderException)
        {
            // No stats frame on this page!
            // Best solution according to:
            // https://stackoverflow.com/a/5768449/14770235
        }
        catch (NullReferenceException)
        {
            // This might be necessary instead of the above with the new approach.
        }
    }
Beispiel #3
0
 public StatBoostDefinition( BlessingType type, int cliloc, StatType stat, CheckForBalm hasBalm )
     : base(type, cliloc)
 {
     m_Stat = stat;
     m_HasBalm = hasBalm;
 }
Beispiel #4
0
 public BlessingDefinition( BlessingType type, int cliloc )
 {
     m_Type = type;
     m_Cliloc = cliloc;
 }
Beispiel #5
0
        public static bool HasBlessing( Mobile m, BlessingType b )
        {
            if ( m_Blessings.ContainsKey( m ) )
            {
                BlessingType blessing = m_Blessings[m];

                if ( blessing == b )
                    return true;
            }

            return false;
        }
Beispiel #6
0
 public BlessingDefinition(BlessingType type, int cliloc)
 {
     m_Type   = type;
     m_Cliloc = cliloc;
 }
Beispiel #7
0
 public StatBoostDefinition(BlessingType type, int cliloc, StatType stat, CheckForBalm hasBalm)
     : base(type, cliloc)
 {
     m_Stat    = stat;
     m_HasBalm = hasBalm;
 }
Beispiel #8
0
 public Blessing(BlessingType type, string text)
 {
     Type = type;
     Text = text;
 }