[8426] Use upper/lower iterator pairs as result instead 2 function calls.

This commit is contained in:
VladimirMangos 2009-08-27 10:51:23 +04:00
parent fdb2842f60
commit 5d50bb16b8
9 changed files with 139 additions and 173 deletions

View file

@ -2028,10 +2028,8 @@ void ObjectMgr::LoadItemRequiredTarget()
if (pItemProto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE ||
pItemProto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)
{
SpellScriptTarget::const_iterator lower = spellmgr.GetBeginSpellScriptTarget(pSpellInfo->Id);
SpellScriptTarget::const_iterator upper = spellmgr.GetEndSpellScriptTarget(pSpellInfo->Id);
if (lower != upper)
SpellScriptTargetBounds bounds = spellmgr.GetSpellScriptTargetBounds(pSpellInfo->Id);
if (bounds.first != bounds.second)
break;
for (int j = 0; j < 3; ++j)