diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-05-15 22:10:18 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-05-15 22:10:18 +0200 |
commit | a4fba9b3c461676622079b166a376e29685d2ca7 (patch) | |
tree | 23d9087e1799bc7690ba63b177856059931e48fd /src/server/game/Entities/Pet | |
parent | 11cf79b4e5e5ab96ff6aae436b0e082cefdf3f51 (diff) |
Core/Creatures: Only use scaling data when it was actually loaded for the creature, not always if it just exists in db
Closes #27954
Diffstat (limited to 'src/server/game/Entities/Pet')
-rw-r--r-- | src/server/game/Entities/Pet/Pet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index a3c2313e63f..2544886ff87 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -914,9 +914,9 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) { // remove elite bonuses included in DB values CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class); - CreatureLevelScaling const* scaling = cinfo->GetLevelScaling(GetMap()->GetDifficultyID()); + ApplyLevelScaling(); - SetCreateHealth(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, cinfo->GetHealthScalingExpansion(), scaling->ContentTuningID, Classes(cinfo->unit_class)) * cinfo->ModHealth * cinfo->ModHealthExtra * _GetHealthMod(cinfo->rank)); + SetCreateHealth(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, cinfo->GetHealthScalingExpansion(), m_unitData->ContentTuningID, Classes(cinfo->unit_class)) * cinfo->ModHealth * cinfo->ModHealthExtra * _GetHealthMod(cinfo->rank)); SetCreateMana(stats->GenerateMana(cinfo)); SetCreateStat(STAT_STRENGTH, 22); SetCreateStat(STAT_AGILITY, 22); |