mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[8257] Avoid remove daze and croud control spells except polymorph at druid form change.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c547a27dad
commit
793ce2259a
3 changed files with 28 additions and 2 deletions
|
|
@ -2709,14 +2709,34 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
case FORM_FLIGHT_EPIC:
|
||||
case FORM_FLIGHT:
|
||||
case FORM_MOONKIN:
|
||||
{
|
||||
// remove movement affects
|
||||
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT);
|
||||
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||
Unit::AuraList const& slowingAuras = m_target->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||
for (Unit::AuraList::const_iterator iter = slowingAuras.begin(); iter != slowingAuras.end();)
|
||||
{
|
||||
SpellEntry const* aurSpellInfo = (*iter)->GetSpellProto();
|
||||
|
||||
// If spell that caused this aura has Croud Control or Daze effect
|
||||
if((GetAllSpellMechanicMask(aurSpellInfo) & MECHANIC_NOT_REMOVED_BY_SHAPESHIFT) ||
|
||||
// some Daze spells have these parameters instead of MECHANIC_DAZE
|
||||
(aurSpellInfo->SpellIconID == 15 && aurSpellInfo->Dispel == 0))
|
||||
{
|
||||
++iter;
|
||||
continue;
|
||||
}
|
||||
|
||||
// All OK, remove aura now
|
||||
m_target->RemoveAurasDueToSpellByCancel(aurSpellInfo->Id);
|
||||
iter = slowingAuras.begin();
|
||||
}
|
||||
|
||||
// and polymorphic affects
|
||||
if(m_target->IsPolymorphed())
|
||||
m_target->RemoveAurasDueToSpell(m_target->getTransForm());
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue