mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7875] Calculate mechanic immune mask for aura remove only if really needed.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
5c80c62f9b
commit
dad833fd3e
2 changed files with 7 additions and 7 deletions
|
|
@ -3965,12 +3965,6 @@ void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
|
||||||
|
|
||||||
void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
||||||
{
|
{
|
||||||
uint32 mechanic = 1 << m_modifier.m_miscvalue;
|
|
||||||
|
|
||||||
//immune movement impairment and loss of control
|
|
||||||
if(GetId()==42292 || GetId()==59752)
|
|
||||||
mechanic=IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
|
||||||
|
|
||||||
// cache values in local vars for prevent access to possible deleted aura data
|
// cache values in local vars for prevent access to possible deleted aura data
|
||||||
SpellEntry const* spellInfo = GetSpellProto();
|
SpellEntry const* spellInfo = GetSpellProto();
|
||||||
uint32 misc = m_modifier.m_miscvalue;
|
uint32 misc = m_modifier.m_miscvalue;
|
||||||
|
|
@ -3978,6 +3972,12 @@ void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
||||||
|
|
||||||
if(apply && spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
if(apply && spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
||||||
{
|
{
|
||||||
|
uint32 mechanic = 1 << m_modifier.m_miscvalue;
|
||||||
|
|
||||||
|
//immune movement impairment and loss of control
|
||||||
|
if(GetId()==42292 || GetId()==59752)
|
||||||
|
mechanic=IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||||
|
|
||||||
Unit::AuraMap& Auras = target->GetAuras();
|
Unit::AuraMap& Auras = target->GetAuras();
|
||||||
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter = next)
|
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end(); iter = next)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7874"
|
#define REVISION_NR "7875"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue