diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-03-19 04:11:55 -0300 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2020-04-24 17:18:48 +0200 |
commit | 6098c4549cada758437a97ac4ef27988d1244b97 (patch) | |
tree | 90122f0acb8dd40c0c538bbf7f362ed280e78ab5 /src | |
parent | 8b8b6bf31937681fbdcc352030e4934b101fca72 (diff) |
Core/Spell: add assert checks on SpellMgr::CheckSpellGroupStackRules
Ref #19319
(cherry picked from commit 36bb4cabae01c591cf6151bae2f65a1f578ed9f3)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index af6d589217d..a336ff2ab63 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -369,10 +369,14 @@ bool SpellMgr::AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, int SpellGroupStackRule SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const { + ASSERT(spellInfo1); + ASSERT(spellInfo2); + uint32 spellid_1 = spellInfo1->GetFirstRankSpell()->Id; uint32 spellid_2 = spellInfo2->GetFirstRankSpell()->Id; if (spellid_1 == spellid_2) return SPELL_GROUP_STACK_RULE_DEFAULT; + // find SpellGroups which are common for both spells SpellSpellGroupMapBounds spellGroup1 = GetSpellSpellGroupMapBounds(spellid_1); std::set<SpellGroup> groups; |