diff options
author | QAston <none@none> | 2009-06-15 01:10:09 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-15 01:10:09 +0200 |
commit | e81175ec11124e885d349b1dca257d0cf97bdd85 (patch) | |
tree | 7a6affc1c09b5f3693bed827e329956461368991 /src/game/Spell.cpp | |
parent | 4c2986c6b16fac13554d8eb290caa28e863c8361 (diff) |
*Fix Hungering Cold.
--HG--
branch : trunk
rename : sql/updates/3997_world_spell_proc_event.sql => sql/updates/4000_world_spell_proc_event.sql
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 2f641c43c35..87be2d381c2 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2280,46 +2280,56 @@ void Spell::SetTargetMap(uint32 i, uint32 cur) } else { - if(m_spellInfo->Id == 27285) // Seed of Corruption proc spell - unitList.remove(m_targets.getUnitTarget()); - else if (m_spellInfo->Id==57699) //Replenishment (special target selection) 10 targets with lowest mana + switch (m_spellInfo->Id) { - typedef std::priority_queue<PrioritizeManaWraper, std::vector<PrioritizeManaWraper>, PrioritizeMana> TopMana; - TopMana manaUsers; - for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr) + case 27285: // Seed of Corruption proc spell + unitList.remove(m_targets.getUnitTarget()); + break; + case 55789: // Improved Icy Talons + case 59725: // Improved Spell Reflection - aoe aura + unitList.remove(m_caster); + break; + case 57699: //Replenishment (special target selection) 10 targets with lowest mana { - if ((*itr)->getPowerType() == POWER_MANA) + typedef std::priority_queue<PrioritizeManaWraper, std::vector<PrioritizeManaWraper>, PrioritizeMana> TopMana; + TopMana manaUsers; + for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr) { - PrioritizeManaWraper WTarget(*itr); - manaUsers.push(WTarget); + if ((*itr)->getPowerType() == POWER_MANA) + { + PrioritizeManaWraper WTarget(*itr); + manaUsers.push(WTarget); + } } - } - unitList.clear(); - while(!manaUsers.empty() && unitList.size()<10) - { - unitList.push_back(manaUsers.top().getUnit()); - manaUsers.pop(); + unitList.clear(); + while(!manaUsers.empty() && unitList.size()<10) + { + unitList.push_back(manaUsers.top().getUnit()); + manaUsers.pop(); + } + break; } - } - else if (m_spellInfo->Id==52759)// Ancestral Awakening - { - typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth; - TopHealth healedMembers; - for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr) + case 52759: // Ancestral Awakening { - PrioritizeHealthWraper WTarget(*itr); - healedMembers.push(WTarget); - } + typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth; + TopHealth healedMembers; + for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr) + { + PrioritizeHealthWraper WTarget(*itr); + healedMembers.push(WTarget); + } - unitList.clear(); - while(!healedMembers.empty() && unitList.size()<1) - { - unitList.push_back(healedMembers.top().getUnit()); - healedMembers.pop(); + unitList.clear(); + while(!healedMembers.empty() && unitList.size()<1) + { + unitList.push_back(healedMembers.top().getUnit()); + healedMembers.pop(); + } + break; } } - else if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_TARGET_ANY + if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_TARGET_ANY && m_spellInfo->EffectImplicitTargetB[i] == TARGET_UNIT_AREA_ALLY_DST)// Wild Growth, Circle of Healing, Glyph of holy light target special selection { typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth; |