diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 98f49ed127d..b4bedebbfe9 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1043,7 +1043,13 @@ void Aura::_RemoveAura() ProcCaster = PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT; ProcVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT; } - caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, PROC_EX_AURA_REMOVE, 0, BASE_ATTACK, m_spellProto); + uint32 procEx=0; + if (m_removeMode == AURA_REMOVE_BY_DISPEL) + procEx = PROC_EX_AURA_REMOVE_DISPEL; + else if (m_removeMode == AURA_REMOVE_BY_DEFAULT) + procEx = PROC_EX_AURA_REMOVE_EXPIRE; + + caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, procEx, m_modifier.m_amount, BASE_ATTACK, m_spellProto); } } } @@ -2051,9 +2057,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) // Living Bomb if (m_spellProto->SpellFamilyFlags[1] & 0x20000) { - if(!m_target || !caster || !(m_removeMode == AURA_REMOVE_BY_DISPEL || m_removeMode == AURA_REMOVE_BY_DEFAULT)) + if(!m_target || !(m_removeMode == AURA_REMOVE_BY_DISPEL || m_removeMode == AURA_REMOVE_BY_DEFAULT)) return; - caster->CastSpell(m_target, GetModifier()->m_amount, true, NULL, NULL, GetCasterGUID()); + Unit* target=NULL; + m_target->CastSpell(m_target, GetModifier()->m_amount, true, NULL, NULL, GetCasterGUID()); return; } break; @@ -3238,7 +3245,7 @@ void Aura::HandleFeignDeath(bool apply, bool Real) m_target->addUnitState(UNIT_STAT_DIED); m_target->CombatStop(); - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_UNATTACKABLE); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_STEALTH); // prevent interrupt message if(m_caster_guid==m_target->GetGUID() && m_target->m_currentSpells[CURRENT_GENERIC_SPELL]) @@ -3322,7 +3329,7 @@ void Aura::HandleModStealth(bool apply, bool Real) if(Real && m_target->GetTypeId()==TYPEID_PLAYER) { // drop flag at stealth in bg - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_UNATTACKABLE); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_STEALTH); // remove player from the objective's active player count at stealth if(OutdoorPvP * pvp = ((Player*)m_target)->GetOutdoorPvP()) @@ -3392,7 +3399,7 @@ void Aura::HandleInvisibility(bool apply, bool Real) { m_target->m_invisibilityMask |= (1 << m_modifier.m_miscvalue); - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_UNATTACKABLE); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_STEALTH); if(Real && m_target->GetTypeId()==TYPEID_PLAYER) { @@ -3850,7 +3857,7 @@ void Aura::HandleAuraModStateImmunity(bool apply, bool Real) void Aura::HandleAuraModSchoolImmunity(bool apply, bool Real) { if(apply && m_modifier.m_miscvalue == SPELL_SCHOOL_MASK_NORMAL) - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_UNATTACKABLE); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_STEALTH); m_target->ApplySpellImmune(GetId(),IMMUNITY_SCHOOL,m_modifier.m_miscvalue,apply); @@ -5232,9 +5239,15 @@ void Aura::HandleAuraAllowFlight(bool apply, bool Real) // allow fly WorldPacket data; if(apply) + { data.Initialize(SMSG_MOVE_SET_CAN_FLY, 12); + m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + } else + { data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 12); + m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02); + } data.append(m_target->GetPackGUID()); data << uint32(0); // unk m_target->SendMessageToSet(&data, true); @@ -5336,7 +5349,7 @@ void Aura::HandleModUnattackable( bool Apply, bool Real ) if(Real && Apply) { m_target->CombatStop(); - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_UNATTACKABLE); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_STEALTH); } m_target->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE,Apply); |
