[8437] Remove redundent player typeid check.

This commit is contained in:
VladimirMangos 2009-08-29 22:38:40 +04:00
parent a86abcf977
commit a1d29f50a0
2 changed files with 11 additions and 10 deletions

View file

@ -1254,13 +1254,17 @@ void Aura::ReapplyAffectedPassiveAuras( Unit* target )
std::set<uint32> affectedPassives;
for(Unit::AuraMap::const_iterator itr = target->GetAuras().begin(); itr != target->GetAuras().end(); ++itr)
{
// permanent passive
if (itr->second->IsPassive() && itr->second->IsPermanent() &&
// non deleted and not same aura (any with same spell id)
!itr->second->IsDeleted() && itr->second->GetId() != GetId() &&
// only applied by self and affected by aura
itr->second->GetCasterGUID() == target->GetGUID() && isAffectedOnSpell(itr->second->GetSpellProto()))
{
affectedPassives.insert(itr->second->GetId());
}
}
for(std::set<uint32>::const_iterator set_itr = affectedPassives.begin(); set_itr != affectedPassives.end(); ++set_itr)
{
@ -1329,16 +1333,13 @@ void Aura::HandleAddModifier(bool apply, bool Real)
ReapplyAffectedPassiveAuras(m_target);
// re-aplly talents and passives applied to pet (it affected by player spellmods)
if (m_target->GetTypeId() == TYPEID_PLAYER)
{
if(Pet* pet = m_target->GetPet())
ReapplyAffectedPassiveAuras(pet);
if(Pet* pet = m_target->GetPet())
ReapplyAffectedPassiveAuras(pet);
for(int i = 0; i < MAX_TOTEM; ++i)
if(m_target->m_TotemSlot[i])
if(Creature* totem = m_target->GetMap()->GetCreature(m_target->m_TotemSlot[i]))
ReapplyAffectedPassiveAuras(totem);
}
for(int i = 0; i < MAX_TOTEM; ++i)
if(m_target->m_TotemSlot[i])
if(Creature* totem = m_target->GetMap()->GetCreature(m_target->m_TotemSlot[i]))
ReapplyAffectedPassiveAuras(totem);
}
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8436"
#define REVISION_NR "8437"
#endif // __REVISION_NR_H__