aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r--src/game/SpellHandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp
index 1a9bc13eab8..74313eaa38b 100644
--- a/src/game/SpellHandler.cpp
+++ b/src/game/SpellHandler.cpp
@@ -522,10 +522,10 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
if(!unit)
return;
- SpellClickInfoMap const& map = objmgr.mSpellClickInfoMap;
- for(SpellClickInfoMap::const_iterator itr = map.lower_bound(unit->GetEntry()); itr != map.upper_bound(unit->GetEntry()); ++itr)
+ SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
+ for(SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
- if(itr->second.questId == 0 || _player->GetQuestStatus(itr->second.questId) == itr->second.questStatus)
+ if(itr->second.IsFitToRequirements(_player))
{
Unit *caster = (itr->second.castFlags & 0x1) ? (Unit*)_player : (Unit*)unit;
Unit *target = (itr->second.castFlags & 0x2) ? (Unit*)_player : (Unit*)unit;