summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-02-24 19:10:34 +0100
committerYehonal <yehonal.azeroth@gmail.com>2017-03-26 01:09:40 +0100
commitf95ba1db794cc102c14d90816a3bd778e7dba282 (patch)
treed96bcfd29d7cf850e65daece12e5d6fa69772964
parentb65230054241eb7824c119d1faf785dfbe94dc1e (diff)
Avoid high level auras on pet when summon
-rw-r--r--src/game/Entities/Pet/Pet.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Entities/Pet/Pet.cpp b/src/game/Entities/Pet/Pet.cpp
index d1209225f3..71e89a30d8 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())
{