aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-04 15:27:11 -0600
committermegamage <none@none>2009-01-04 15:27:11 -0600
commit2641173fbeedc2a3f3900122443587b97626b5e1 (patch)
tree34fcc6d465d2dfef8ee69eea838e3685c3dbb6f8 /src
parentd608a48839e48860345062b69a7e59f81e8e9904 (diff)
*Fix a bug in ScriptedAI::SelectUnitList.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp3
-rw-r--r--src/game/SpellMgr.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index b54f91a113d..bb7f98c9f7b 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -432,7 +432,7 @@ void ScriptedAI::SelectUnitList(std::list<Unit*> &targetList, uint32 num, Select
std::list<HostilReference*> m_threatlist = m_creature->getThreatManager().getThreatList();
std::list<HostilReference*>::iterator i;
Unit *target;
- while(m_threatlist.size())
+ while(m_threatlist.size() && num)
{
if(targetType == SELECT_TARGET_BOTTOMAGGRO)
{
@@ -455,6 +455,7 @@ void ScriptedAI::SelectUnitList(std::list<Unit*> &targetList, uint32 num, Select
continue;
}
targetList.push_back(target);
+ --num;
}
}
}
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 202682e138a..494921eb2a5 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2159,7 +2159,6 @@ void SpellMgr::LoadSpellCustomAttr()
case 37790: //Spread Shot
case 46771: //Flame Sear
case 45248: //Shadow Blades
- case 39835: //Needle Spine
spellInfo->MaxAffectedTargets = 3;
break;
case 38310: //Multi-Shot