Core/Pets: Fixed hunter pet resistance exploit (#18600)

This commit is contained in:
xinef1
2016-12-31 20:51:17 +01:00
committed by Aokromes
parent ae56332789
commit 59f8f59520

View File

@@ -857,8 +857,10 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
// Resistance
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(cinfo->resistance[i]));
// Hunters pet should not inherit resistances from creature_template, they have separate auras for that
if (!IsHunterPet())
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(cinfo->resistance[i]));
//health, mana, armor and resistance
PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(creature_ID, petlevel);