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. } }
public StatBoostDefinition( BlessingType type, int cliloc, StatType stat, CheckForBalm hasBalm ) : base(type, cliloc) { m_Stat = stat; m_HasBalm = hasBalm; }
public BlessingDefinition( BlessingType type, int cliloc ) { m_Type = type; m_Cliloc = cliloc; }
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 BlessingDefinition(BlessingType type, int cliloc) { m_Type = type; m_Cliloc = cliloc; }
public StatBoostDefinition(BlessingType type, int cliloc, StatType stat, CheckForBalm hasBalm) : base(type, cliloc) { m_Stat = stat; m_HasBalm = hasBalm; }
public Blessing(BlessingType type, string text) { Type = type; Text = text; }