Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "attempt to make double buffer for spell targets. VERY EXPERIM…

…ENTAL!"

This reverts commit 7c46373.
  • Loading branch information...
commit 6177fadd7f261e9eeabe6c53bea42caa9fdddd95 1 parent 4ab1068
@kero99 authored
Showing with 3 additions and 30 deletions.
  1. +3 −21 src/game/Spell.cpp
  2. +0 −9 src/game/Spell.h
View
24 src/game/Spell.cpp
@@ -3534,22 +3534,10 @@ void Spell::handle_immediate()
_handle_immediate_phase();
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
- m_UniqueTargetBuffer.push(*ihit);
-
- while(!m_UniqueTargetBuffer.empty())
- {
- DoAllEffectOnTarget(&m_UniqueTargetBuffer.front());
- m_UniqueTargetBuffer.pop();
- }
+ DoAllEffectOnTarget(&(*ihit));
for(GOTargetList::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
- m_UniqueGOTargetBuffer.push(*ihit);
-
- while(!m_UniqueGOTargetBuffer.empty())
- {
- DoAllEffectOnTarget(&m_UniqueGOTargetBuffer.front());
- m_UniqueGOTargetBuffer.pop();
- }
+ DoAllEffectOnTarget(&(*ihit));
// spell is finished, perform some last features of the spell here
_handle_finish_phase();
@@ -3641,13 +3629,7 @@ void Spell::_handle_immediate_phase()
// process items
for(ItemTargetList::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
- m_UniqueItemBuffer.push(*ihit);
-
- while(!m_UniqueItemBuffer.empty())
- {
- DoAllEffectOnTarget(&m_UniqueItemBuffer.front());
- m_UniqueItemBuffer.pop();
- }
+ DoAllEffectOnTarget(&(*ihit));
// process ground
for(int j = 0; j < MAX_EFFECT_INDEX; ++j)
View
9 src/game/Spell.h
@@ -628,15 +628,6 @@ class Spell
GOTargetList m_UniqueGOTargetInfo;
ItemTargetList m_UniqueItemInfo;
- // Targets double buffering
- typedef std::queue<TargetInfo> TargetBuffer;
- typedef std::queue<GOTargetInfo> GOTargetBuffer;
- typedef std::queue<ItemTargetInfo> ItemTargetBuffer;
-
- TargetBuffer m_UniqueTargetBuffer;
- GOTargetBuffer m_UniqueGOTargetBuffer;
- ItemTargetBuffer m_UniqueItemBuffer;
-
void AddUnitTarget(Unit* target, SpellEffectIndex effIndex);
void AddUnitTarget(uint64 unitGUID, SpellEffectIndex effIndex);
void AddGOTarget(GameObject* target, SpellEffectIndex effIndex);
Please sign in to comment.
Something went wrong with that request. Please try again.