From 55570be6610483da129e40291e49090a8bc0f30c Mon Sep 17 00:00:00 2001 From: Wyrserth Date: Thu, 18 Jul 2019 02:47:10 +0200 Subject: 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. --- src/server/game/Entities/Pet/Pet.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 68696f9a003..8f1f9f38381 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -872,9 +872,13 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) { // remove elite bonuses included in DB values CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(petlevel, cinfo->unit_class); - SetCreateHealth(stats->BaseHealth[cinfo->expansion]); - SetCreateMana(stats->BaseMana); + float healthmod = _GetHealthMod(cinfo->rank); + uint32 basehp = stats->GenerateHealth(cinfo); + uint32 health = uint32(basehp * healthmod); + uint32 mana = stats->GenerateMana(cinfo); + SetCreateHealth(health); + SetCreateMana(mana); SetCreateStat(STAT_STRENGTH, 22); SetCreateStat(STAT_AGILITY, 22); SetCreateStat(STAT_STAMINA, 25); -- cgit v1.2.3