diff options
author | QAston <none@none> | 2010-02-03 02:41:10 +0100 |
---|---|---|
committer | QAston <none@none> | 2010-02-03 02:41:10 +0100 |
commit | a4b89d880633d2fe294ead3a92a0e0813e41d8fc (patch) | |
tree | 1d05084eb544f0a2edb9a34d983abd1441dede6e | |
parent | 10695f9131336b26c352b19ce2a39e8c2ca0af8e (diff) |
fix a typo in IsHighRankOfSpell(uint32 spell1,uint32 spell2)
--HG--
branch : trunk
-rw-r--r-- | src/game/SpellMgr.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<uint32, SpellGroup > SpellSpellGroupMap; typedef std::pair<SpellSpellGroupMap::const_iterator,SpellSpellGroupMap::const_iterator> 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; } |