mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8426] Use upper/lower iterator pairs as result instead 2 function calls.
This commit is contained in:
parent
fdb2842f60
commit
5d50bb16b8
9 changed files with 139 additions and 173 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue