From a4b89d880633d2fe294ead3a92a0e0813e41d8fc Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 3 Feb 2010 02:41:10 +0100 Subject: fix a typo in IsHighRankOfSpell(uint32 spell1,uint32 spell2) --HG-- branch : trunk --- src/game/SpellMgr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 36ad5d9c3bd..4d2be7fbea6 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -636,7 +636,7 @@ enum SpellGroup #define SPELL_GROUP_DB_RANGE_MIN 1000 -// spell_id, group_id // native if true, inherited if false +// spell_id, group_id typedef std::multimap SpellSpellGroupMap; typedef std::pair SpellSpellGroupMapBounds; @@ -1104,9 +1104,11 @@ class SpellMgr { SpellChainMap::const_iterator itr1 = mSpellChains.find(spell1); SpellChainMap::const_iterator itr2 = mSpellChains.find(spell2); + if (itr1 == mSpellChains.end() || itr2 == mSpellChains.end()) + return false; if (itr1->second.first == itr2->second.first) - if (itr1->second.rank <= itr2->second.rank) + if (itr1->second.rank > itr2->second.rank) return true; return false; } -- cgit v1.2.3