*More crashfixes
--HG-- branch : trunk
This commit is contained in:
+3
-13
@@ -4163,17 +4163,7 @@ void AuraEffect::HandleAuraModStateImmunity(bool apply, bool Real)
|
|||||||
{
|
{
|
||||||
if(apply && Real && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
if(apply && Real && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
||||||
{
|
{
|
||||||
Unit::AuraEffectList const& auraList = m_target->GetAurasByType(AuraType(GetMiscValue()));
|
m_target->RemoveAurasByType(AuraType(GetMiscValue()), NULL , GetParentAura());
|
||||||
for(Unit::AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end();)
|
|
||||||
{
|
|
||||||
if (auraList.front() != this) // skip itself aura (it already added)
|
|
||||||
{
|
|
||||||
m_target->RemoveAurasDueToSpell(auraList.front()->GetId());
|
|
||||||
itr = auraList.begin();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++itr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,GetMiscValue(),apply);
|
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,GetMiscValue(),apply);
|
||||||
@@ -4198,7 +4188,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real)
|
|||||||
{
|
{
|
||||||
uint32 school_mask = GetMiscValue();
|
uint32 school_mask = GetMiscValue();
|
||||||
Unit::AuraMap& Auras = m_target->GetAuras();
|
Unit::AuraMap& Auras = m_target->GetAuras();
|
||||||
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end();)
|
for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
|
||||||
{
|
{
|
||||||
SpellEntry const *spell = iter->second->GetSpellProto();
|
SpellEntry const *spell = iter->second->GetSpellProto();
|
||||||
if((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
|
if((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
|
||||||
@@ -4206,7 +4196,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real)
|
|||||||
&& !iter->second->IsPositive() //Don't remove positive spells
|
&& !iter->second->IsPositive() //Don't remove positive spells
|
||||||
&& spell->Id != GetId() ) //Don't remove self
|
&& spell->Id != GetId() ) //Don't remove self
|
||||||
{
|
{
|
||||||
m_target->RemoveAurasDueToSpell(spell->Id);
|
m_target->RemoveAura(iter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++iter;
|
++iter;
|
||||||
|
|||||||
+1
-1
@@ -11524,7 +11524,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
}
|
}
|
||||||
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
|
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
|
||||||
uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE);
|
uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE);
|
||||||
CalculateSpellDamageTaken(&damageInfo, damage, spellInfo);
|
CalculateSpellDamageTaken(&damageInfo, damage, spellInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user