mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8437] Remove redundent player typeid check.
This commit is contained in:
parent
a86abcf977
commit
a1d29f50a0
2 changed files with 11 additions and 10 deletions
|
|
@ -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,8 +1333,6 @@ 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);
|
||||
|
||||
|
|
@ -1339,7 +1341,6 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
if(Creature* totem = m_target->GetMap()->GetCreature(m_target->m_TotemSlot[i]))
|
||||
ReapplyAffectedPassiveAuras(totem);
|
||||
}
|
||||
}
|
||||
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
||||
{
|
||||
// Use SpellModifier structure for check
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8436"
|
||||
#define REVISION_NR "8437"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue