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

This commit is contained in:
xinef1
2016-12-31 20:51:17 +01:00
committed by Shauren
parent 0a2876c091
commit 114aedcc14

View File

@@ -853,8 +853,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 or Power, Armor
PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(creature_ID, petlevel);