Example #1
0
 public override float GetResiliencePct()
 {
     if (HasPlayerMaster)
     {
         var chr        = (Character)m_master;
         var resilience = chr.GetCombatRating(CombatRating.MeleeResilience);
         return(resilience / GameTables.GetCRTable(CombatRating.MeleeResilience).GetMax((uint)Level - 1));
     }
     return(0);
 }
Example #2
0
        /// <summary>Loads the DBC file starting with gtXXXX.dbc</summary>
        /// <returns>Wether all gametables were loaded</returns>
        public static bool LoadGtDBCs()
        {
            if (!GameTables.LoadGtBaseSpellCritChanceDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed,
                                                    (object)"gtChanceToSpellCritBase.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassSpellCritChanceDBC())
            {
                GameTables.s_log.Info(
                    string.Format(WCell_RealmServer.DBCLoadFailed, (object)"gtChanceToSpellCrit.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtBaseMeleeCritChanceDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed,
                                                    (object)"gtChanceToMeleeCritBase.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassMeleeCritChanceDBC())
            {
                GameTables.s_log.Info(
                    string.Format(WCell_RealmServer.DBCLoadFailed, (object)"gtChanceToMeleeCrit.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtBarberShopCostDBC(out GameTables.s_barberShopCosts))
            {
                GameTables.s_log.Info(
                    string.Format(WCell_RealmServer.DBCLoadFailed, (object)"gtChanceToMeleeCrit.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtCombatRatingsDBC(out GameTables.s_combatRatings))
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed, (object)"gtCombatRatings.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassHealthRegenPerSpiritDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed, (object)"GtRegenHPPerSpt.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassManaRegenPerSpiritDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed, (object)"GtRegenMPPerSpt.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassOCTHealthRegenDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed, (object)"GtOCTRegenHP.dbc"));
                return(false);
            }

            if (!GameTables.LoadGtClassOCTManaRegenDBC())
            {
                GameTables.s_log.Info(string.Format(WCell_RealmServer.DBCLoadFailed, (object)"GtOCTRegenMP.dbc"));
                return(false);
            }

            GameTables.Loaded = true;
            return(true);
        }
Example #3
0
 private static bool LoadGtClassOCTManaRegenDBC()
 {
     return(GameTables.LoadRatingChanceDBC("GtOCTRegenMP.dbc", out GameTables.s_octManaRegen));
 }
Example #4
0
 private static bool LoadGtClassManaRegenPerSpiritDBC()
 {
     return(GameTables.LoadRatingChanceDBC("GtRegenMPPerSpt.dbc", out GameTables.s_octManaRegenPerSpirit));
 }
Example #5
0
 private static bool LoadGtClassMeleeCritChanceDBC()
 {
     return(GameTables.LoadRatingChanceDBC("gtChanceToMeleeCrit.dbc", out GameTables.s_classMeleeCritChance));
 }
Example #6
0
 private static bool LoadGtBaseMeleeCritChanceDBC()
 {
     return(GameTables.LoadRatingChanceDBC("gtChanceToMeleeCritBase.dbc", out GameTables.s_baseMeleeCritChance));
 }
Example #7
0
 public static float GetUnModifiedClassMeleeCritChanceValue(int level, ClassId id)
 {
     return(GameTables.GetValuePerRating(GameTables.ClassMeleeCritChance, level, id));
 }
Example #8
0
 /// <summary>
 /// Gets the modified value from the table ClassSpellCritChance from the correct index.
 /// </summary>
 /// <param name="level"></param>
 /// <param name="id"></param>
 /// <returns>The modified value matching the format "XX stat for 1% chance"</returns>
 public static float GetClassSpellCritChanceValue(int level, ClassId id)
 {
     return(GameTables.ModifyValue(GameTables.GetValuePerRating(GameTables.ClassSpellCritChance, level, id)));
 }
Example #9
0
        public override float GetResiliencePct()
        {
            var resilience = GetCombatRating(CombatRating.MeleeResilience);

            return(resilience / GameTables.GetCRTable(CombatRating.MeleeResilience).GetMax((uint)Level - 1));
        }