*Skip [8257] Avoid remove daze and croud control spells except polymorph at druid form change. Author: Astellar

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-31 10:51:02 +08:00
parent 0a2af88cb4
commit 62e31f41e4
2 changed files with 31 additions and 1 deletions

View File

@@ -970,7 +970,13 @@ enum Mechanics
(1<<MECHANIC_SHACKLE )|(1<<MECHANIC_TURN )|(1<<MECHANIC_HORROR)| \
(1<<MECHANIC_DAZE )|(1<<MECHANIC_SAPPED ) )
// Spell dispel type
// Daze and all croud control spells except polymorph are not removed
#define MECHANIC_NOT_REMOVED_BY_SHAPESHIFT ( \
(1<<MECHANIC_CHARM )|(1<<MECHANIC_DISORIENTED)|(1<<MECHANIC_FEAR )|(1<<MECHANIC_PACIFY )| \
(1<<MECHANIC_STUN )|(1<<MECHANIC_FREEZE )|(1<<MECHANIC_BANISH)|(1<<MECHANIC_SHACKLE)| \
(1<<MECHANIC_HORROR)|(1<<MECHANIC_TURN )|(1<<MECHANIC_DAZE )|(1<<MECHANIC_SAPPED ) )
// Spell dispell type
enum DispelType
{
DISPEL_NONE = 0,

View File

@@ -3235,13 +3235,37 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
case FORM_FLIGHT_EPIC:
case FORM_FLIGHT:
case FORM_MOONKIN:
{
// remove movement affects
m_target->RemoveMovementImpairingAuras();
/*
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT);
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;
}