mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[11540] Fixed spell 59752 and some other impossibility cast in stun like states.
Original patch provided by darkstalker.
This commit is contained in:
parent
5cae1c2211
commit
2b79599986
4 changed files with 18 additions and 8 deletions
|
|
@ -5709,8 +5709,9 @@ SpellCastResult Spell::CheckCasterAuras() const
|
|||
else if (m_spellInfo->EffectApplyAuraName[i] == SPELL_AURA_DISPEL_IMMUNITY)
|
||||
dispel_immune |= GetDispellMask(DispelType(m_spellInfo->EffectMiscValue[i]));
|
||||
}
|
||||
// immune movement impairment and loss of control
|
||||
if (m_spellInfo->Id == 42292) // PvP Trinket
|
||||
|
||||
// immune movement impairment and loss of control (spell data have special structure for mark this case)
|
||||
if (IsSpellRemoveAllMovementAndControlLossEffects(m_spellInfo))
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,18 @@ inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
|
|||
return !IsSpellHaveEffect(spellProto,SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
|
||||
inline bool IsSpellRemoveAllMovementAndControlLossEffects(SpellEntry const* spellProto)
|
||||
{
|
||||
return spellProto->EffectApplyAuraName[EFFECT_INDEX_0] == SPELL_AURA_MECHANIC_IMMUNITY &&
|
||||
spellProto->EffectMiscValue[EFFECT_INDEX_0] == 1 &&
|
||||
spellProto->EffectApplyAuraName[EFFECT_INDEX_1] == 0 &&
|
||||
spellProto->EffectApplyAuraName[EFFECT_INDEX_2] == 0 &&
|
||||
(spellProto->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)/* && -- all above selected spells have SPELL_ATTR_EX5_* mask
|
||||
((spellProto->AttributesEx5 &
|
||||
(SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED|SPELL_ATTR_EX5_USABLE_WHILE_FEARED|SPELL_ATTR_EX5_USABLE_WHILE_STUNNED)) ==
|
||||
(SPELL_ATTR_EX5_USABLE_WHILE_CONFUSED|SPELL_ATTR_EX5_USABLE_WHILE_FEARED|SPELL_ATTR_EX5_USABLE_WHILE_STUNNED))*/;
|
||||
}
|
||||
|
||||
inline bool IsDeathOnlySpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
return spellInfo->AttributesEx3 & SPELL_ATTR_EX3_CAST_ON_DEAD
|
||||
|
|
|
|||
|
|
@ -713,12 +713,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
|||
SpellAuraHolderMap& Auras = pVictim->GetSpellAuraHolderMap();
|
||||
for(SpellAuraHolderMap::const_iterator iter = Auras.begin(); iter != Auras.end();)
|
||||
{
|
||||
SpellEntry const *spell = iter->second->GetSpellProto();
|
||||
|
||||
if( spell->Mechanic == MECHANIC_STUN ||
|
||||
iter->second->HasMechanic(MECHANIC_STUN))
|
||||
if (iter->second->HasMechanic(MECHANIC_STUN))
|
||||
{
|
||||
pVictim->RemoveAurasDueToSpell(spell->Id);
|
||||
pVictim->RemoveAurasDueToSpell(iter->second->GetId());
|
||||
iter = Auras.begin();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11539"
|
||||
#define REVISION_NR "11540"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue