*Thread safe player searcher in scripts.
--HG-- branch : trunk
This commit is contained in:
@@ -1651,6 +1651,9 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster)
|
||||
DynObjAura::DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID)
|
||||
{
|
||||
ASSERT(GetDynobjOwner());
|
||||
ASSERT(GetDynobjOwner()->IsInWorld());
|
||||
ASSERT(GetDynobjOwner()->GetMap() == caster->GetMap());
|
||||
GetDynobjOwner()->SetAura(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user