Skip to content

Commit 4005ae4

Browse files
committed
Core/Spells: Fixed spell visual selection
1 parent bdceccd commit 4005ae4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/server/game/Spells/SpellInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4476,7 +4476,7 @@ uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/
44764476
return true;
44774477
};
44784478

4479-
for (auto itr = _visuals.begin(); itr != _visuals.end(); ++itr)
4479+
for (auto itr = _visuals.begin(), end = _visuals.end(); itr != end; ++itr)
44804480
{
44814481
if (!canUseSpellVisual(*itr))
44824482
continue;
@@ -4485,9 +4485,9 @@ uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/
44854485
boost::container::small_vector<SpellXSpellVisualEntry const*, 4> visualCandidates;
44864486
visualCandidates.push_back(*itr);
44874487

4488-
for (auto itr2 = itr + 1; itr2 != _visuals.end() && (*itr)->Priority == (*itr2)->Priority ; ++itr2)
4489-
if (canUseSpellVisual(*itr))
4490-
visualCandidates.push_back(*itr);
4488+
for (auto itr2 = itr + 1; itr2 != end && (*itr)->Priority == (*itr2)->Priority; ++itr2)
4489+
if (canUseSpellVisual(*itr2))
4490+
visualCandidates.push_back(*itr2);
44914491

44924492
if (visualCandidates.size() == 1)
44934493
return visualCandidates.front()->ID; // special case, ignores Probability

0 commit comments

Comments
 (0)