From e81175ec11124e885d349b1dca257d0cf97bdd85 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 15 Jun 2009 01:10:09 +0200 Subject: *Fix Hungering Cold. --HG-- branch : trunk rename : sql/updates/3997_world_spell_proc_event.sql => sql/updates/4000_world_spell_proc_event.sql --- src/game/Spell.cpp | 70 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 30 deletions(-) (limited to 'src/game/Spell.cpp') 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, PrioritizeMana> TopMana; - TopMana manaUsers; - for (std::list::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, PrioritizeMana> TopMana; + TopMana manaUsers; + for (std::list::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, PrioritizeHealth> TopHealth; - TopHealth healedMembers; - for (std::list::iterator itr = unitList.begin() ; itr != unitList.end();++itr) + case 52759: // Ancestral Awakening { - PrioritizeHealthWraper WTarget(*itr); - healedMembers.push(WTarget); - } + typedef std::priority_queue, PrioritizeHealth> TopHealth; + TopHealth healedMembers; + for (std::list::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, PrioritizeHealth> TopHealth; -- cgit v1.2.3