From f95ba1db794cc102c14d90816a3bd778e7dba282 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Fri, 24 Feb 2017 19:10:34 +0100 Subject: [PATCH] Avoid high level auras on pet when summon --- src/game/Entities/Pet/Pet.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/Entities/Pet/Pet.cpp b/src/game/Entities/Pet/Pet.cpp index d1209225f..71e89a30d 100644 --- a/src/game/Entities/Pet/Pet.cpp +++ b/src/game/Entities/Pet/Pet.cpp @@ -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()) {