mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Core/Config): Added new config to make pet's health be modified b… (#14051)
This commit is contained in:
@@ -1108,6 +1108,11 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
float factorHealth = owner->GetTypeId() == TYPEID_PLAYER ? std::min(1.0f, cinfo->ModHealth) : cinfo->ModHealth;
|
||||
float factorMana = owner->GetTypeId() == TYPEID_PLAYER ? std::min(1.0f, cinfo->ModMana) : cinfo->ModMana;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH))
|
||||
{
|
||||
factorHealth *= _GetHealthMod(cinfo->rank);
|
||||
}
|
||||
|
||||
SetCreateHealth(std::max<uint32>(1, stats->BaseHealth[cinfo->expansion]*factorHealth));
|
||||
SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, GetCreateHealth());
|
||||
SetCreateMana(stats->BaseMana * factorMana);
|
||||
|
||||
Reference in New Issue
Block a user