diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index 0898e2e0b65..bfef88472e8 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -921,6 +921,9 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged) { switch (getClass()) { + case CLASS_MAGE: + val2 = GetStat(STAT_STRENGTH) - 10.0f; + break; case CLASS_ROGUE: val2 = (GetStat(STAT_STRENGTH) - 10.0f) + GetStat(STAT_AGILITY); break; diff --git a/src/game/Globals/ObjectMgr.cpp b/src/game/Globals/ObjectMgr.cpp index 1fa80ed97ad..4a410610cc5 100644 --- a/src/game/Globals/ObjectMgr.cpp +++ b/src/game/Globals/ObjectMgr.cpp @@ -980,12 +980,25 @@ void ObjectMgr::LoadCreatureClassLvlStats() cCLS.BaseHealth = fields[11 + (i * 2)].GetUInt32(); cCLS.BaseDamage = fields[12 + (i * 2)].GetFloat(); + uint32 apCoeffStr = 2; + uint32 apCoeffAgi = 0; + switch (creatureClass) + { + case CLASS_ROGUE: + apCoeffStr = 1; + apCoeffAgi = 1; + break; + case CLASS_MAGE: + apCoeffStr = 1; + break; + } + // should ensure old data does not need change (not wanting to recalculate to avoid losing data) // if any mistake is made, it will be in these formulae that make asumptions about the new calculations // AP, RAP, HP, Mana and armor should stay the same pre-change and post-change when using multipliers == 1 cCLS.BaseHealth -= std::min(cCLS.BaseHealth, std::max(0u, (uint32)Unit::GetHealthBonusFromStamina(cCLS.Stamina))); cCLS.BaseMana -= std::min(cCLS.BaseMana, std::max(0u, (uint32)Unit::GetManaBonusFromIntellect(cCLS.Intellect))); - cCLS.BaseMeleeAttackPower -= std::min(cCLS.BaseMeleeAttackPower, std::max(0.f, float(cCLS.Strength >= 10 ? (cCLS.Strength - 10) * 2 : 0))); + cCLS.BaseMeleeAttackPower -= std::min(cCLS.BaseMeleeAttackPower, std::max(0.f, float(((std::max(cCLS.Strength, 10u) - 10) * apCoeffStr + (std::max(cCLS.Agility, 10u) - 10) * apCoeffAgi)))); cCLS.BaseRangedAttackPower -= std::min(cCLS.BaseRangedAttackPower, std::max(0.f, float(cCLS.Agility >= 10 ? (cCLS.Agility - 10) : 0))); cCLS.BaseArmor -= std::min(cCLS.BaseArmor, std::max(0u, cCLS.Agility * 2)); }