*Thread safe player searcher in scripts.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-30 15:51:07 +02:00
parent 9bda35c7df
commit d666ba26c1
32 changed files with 69 additions and 66 deletions
+1 -1
View File
@@ -351,7 +351,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
uint8 count = 0;
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if (ihit->targetGUID != m_caster->GetGUID())
if (Player *target = ObjectAccessor::FindPlayer(ihit->targetGUID))
if (Player *target = ObjectAccessor::GetPlayer(*m_caster, ihit->targetGUID))
if (target->HasAura(m_triggeredByAuraSpell->Id))
++count;
if (count)