mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13: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;
|
std::set<uint32> affectedPassives;
|
||||||
|
|
||||||
for(Unit::AuraMap::const_iterator itr = target->GetAuras().begin(); itr != target->GetAuras().end(); ++itr)
|
for(Unit::AuraMap::const_iterator itr = target->GetAuras().begin(); itr != target->GetAuras().end(); ++itr)
|
||||||
|
{
|
||||||
// permanent passive
|
// permanent passive
|
||||||
if (itr->second->IsPassive() && itr->second->IsPermanent() &&
|
if (itr->second->IsPassive() && itr->second->IsPermanent() &&
|
||||||
// non deleted and not same aura (any with same spell id)
|
// non deleted and not same aura (any with same spell id)
|
||||||
!itr->second->IsDeleted() && itr->second->GetId() != GetId() &&
|
!itr->second->IsDeleted() && itr->second->GetId() != GetId() &&
|
||||||
// only applied by self and affected by aura
|
// only applied by self and affected by aura
|
||||||
itr->second->GetCasterGUID() == target->GetGUID() && isAffectedOnSpell(itr->second->GetSpellProto()))
|
itr->second->GetCasterGUID() == target->GetGUID() && isAffectedOnSpell(itr->second->GetSpellProto()))
|
||||||
|
{
|
||||||
affectedPassives.insert(itr->second->GetId());
|
affectedPassives.insert(itr->second->GetId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(std::set<uint32>::const_iterator set_itr = affectedPassives.begin(); set_itr != affectedPassives.end(); ++set_itr)
|
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);
|
ReapplyAffectedPassiveAuras(m_target);
|
||||||
|
|
||||||
// re-aplly talents and passives applied to pet (it affected by player spellmods)
|
// 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())
|
if(Pet* pet = m_target->GetPet())
|
||||||
ReapplyAffectedPassiveAuras(pet);
|
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]))
|
if(Creature* totem = m_target->GetMap()->GetCreature(m_target->m_TotemSlot[i]))
|
||||||
ReapplyAffectedPassiveAuras(totem);
|
ReapplyAffectedPassiveAuras(totem);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
||||||
{
|
{
|
||||||
// Use SpellModifier structure for check
|
// Use SpellModifier structure for check
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8436"
|
#define REVISION_NR "8437"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue