aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyrserth <wyrserth@protonmail.com>2019-07-18 02:47:10 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-16 22:01:10 +0100
commit434ef51c10535a4ef79e6210a762b9680518442b (patch)
tree8c1f6e05c55b526dae1778defaa6eeb4bdff8865 /src
parent537b425377c065e5a99486387247349bde0a37ea (diff)
Core/Creature: honor existing DB data for health and mana in case of summoned pets that don't have pet-specific stat data.
Closes #23570. (cherry picked from commit 55570be6610483da129e40291e49090a8bc0f30c)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index a89d015f317..a33bc288698 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -845,9 +845,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class);
CreatureLevelScaling const* scaling = cinfo->GetLevelScaling(GetMap()->GetDifficultyID());
- SetCreateHealth(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, cinfo->GetHealthScalingExpansion(), scaling->ContentTuningID, Classes(cinfo->unit_class)) * cinfo->ModHealth * cinfo->ModHealthExtra);
- SetCreateMana(stats->BaseMana);
-
+ SetCreateHealth(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, cinfo->GetHealthScalingExpansion(), scaling->ContentTuningID, Classes(cinfo->unit_class)) * cinfo->ModHealth * cinfo->ModHealthExtra * _GetHealthMod(cinfo->rank));
+ SetCreateMana(stats->GenerateMana(cinfo));
SetCreateStat(STAT_STRENGTH, 22);
SetCreateStat(STAT_AGILITY, 22);
SetCreateStat(STAT_STAMINA, 25);