diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 01b8fb146..857147253 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1091,7 +1091,17 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(creature_ID, petlevel); if (pInfo) // exist in DB { - SetCreateHealth(pInfo->health); + // Default scale value of 1 to use if Pet.RankMod.Health = 0 + float factorHealth = 1; + // If config is set to allow pets to use health modifiers, apply it to creatures with a DB entry + // Pet.RankMod.Health = 1 use the factor value based on the rank of the pet, most pets have a rank of 0 and so use + // the Elite rank which is set as the default in Creature::_GetHealthMod(int32 Rank) + if (sWorld->getBoolConfig(CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH)) + { + factorHealth *= _GetHealthMod(cinfo->rank); + } + + SetCreateHealth(pInfo->health*factorHealth); SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)pInfo->health); if (petType != HUNTER_PET) //hunter pet use focus {