Avoid high level auras on pet when summon

This commit is contained in:
Yehonal
2017-02-24 19:10:34 +01:00
parent b652300542
commit f95ba1db79

View File

@@ -1213,6 +1213,15 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
continue;
}
// avoid higher level auras if any, and adjust
SpellInfo const* scaledSpellInfo = spellInfo->GetAuraRankForLevel(getLevel());
if (scaledSpellInfo != spellInfo)
spellInfo = scaledSpellInfo;
// again after level check
if (!spellInfo)
continue;
// negative effects should continue counting down after logout
if (remaintime != -1 && !spellInfo->IsPositive())
{