[8497] Fixes in talent 53563 work and other area auras spells.

* Support mutiply beacon buffs at same target (as will be in 3.2.x) in triggering part.
* Bonus heal caster expected original paladin, and used his heal bonuses, LoS not required for bonus heal.
* Fixed bug with not apply not-caster affected area spell (hostile area spell or talent 53563)
  to another caster with same area aura active. Correctly remove only specific caster area aura at expire.
* Not show area spell icon for telent 53563 at beacon for this aura.
* Allow stacking dummy auras from diff casters, check formal aura types for effect at add aura stacking check.
  Last important for area auars that can have SPELL_AURA_NONE in modifier data instead formal effect auars at caster.
This commit is contained in:
VladimirMangos 2009-09-14 07:28:03 +04:00
parent 50d426e72c
commit 67d4335614
5 changed files with 116 additions and 22 deletions

View file

@ -3417,6 +3417,7 @@ bool Unit::AddAura(Aura *Aur)
return false;
}
// m_auraname can be modified to SPELL_AURA_NONE for area auras, this expected for this value
AuraType aurName = Aur->GetModifier()->m_auraname;
spellEffectPair spair = spellEffectPair(Aur->GetId(), Aur->GetEffIndex());
@ -3445,10 +3446,15 @@ bool Unit::AddAura(Aura *Aur)
}
bool stop = false;
switch(aurName)
// m_auraname can be modified to SPELL_AURA_NONE for area auras, use original
AuraType aurNameReal = AuraType(aurSpellInfo->EffectApplyAuraName[Aur->GetEffIndex()]);
switch(aurNameReal)
{
// DoT/HoT/etc
case SPELL_AURA_PERIODIC_DAMAGE: // allow stack
case SPELL_AURA_DUMMY: // allow stack
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
case SPELL_AURA_PERIODIC_LEECH:
case SPELL_AURA_PERIODIC_HEAL:
@ -3752,6 +3758,22 @@ void Unit::RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID)
}
}
void Unit::RemoveAurasByCasterSpell(uint32 spellId, uint32 effindex, uint64 casterGUID)
{
spellEffectPair spair = spellEffectPair(spellId, effindex);
for(AuraMap::iterator iter = m_Auras.lower_bound(spair); iter != m_Auras.upper_bound(spair);)
{
Aura *aur = iter->second;
if (aur->GetId() == spellId && aur->GetCasterGUID() == casterGUID)
{
RemoveAura(iter);
iter = m_Auras.lower_bound(spair);
}
else
++iter;
}
}
void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler)
{
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
@ -5110,7 +5132,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
}
CastSpell(this, 28682, true, castItem, triggeredByAura);
return (procEx & PROC_EX_CRITICAL_HIT);// charge update only at crit hits, no hidden cooldowns
return (procEx & PROC_EX_CRITICAL_HIT); // charge update only at crit hits, no hidden cooldowns
}
}
break;
@ -5807,22 +5829,33 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (GetGUID() == triggeredByAura->GetCasterGUID())
return false;
// beacon
Unit* beacon = triggeredByAura->GetCaster();
if (!beacon)
return false;
Aura* dummy = beacon->GetDummyAura(53563);
// find caster main aura at beacon
Aura* dummy = NULL;
Unit::AuraList const& baa = beacon->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = baa.begin(); i != baa.end(); ++i)
{
if ((*i)->GetId() == 53563 && (*i)->GetCasterGUID() == pVictim->GetGUID())
{
dummy = (*i);
break;
}
}
// original heal must be form beacon caster
if (!dummy)
return false;
// original heal must be form beacon caster
if (dummy->GetCasterGUID() != pVictim->GetGUID())
return false;
triggered_spell_id = 53652; // Beacon of Light
triggered_spell_id = 53652; // Beacon of Light
basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
target = beacon;
break;
// cast with original caster set but beacon to beacon for apply caster mods and avoid LoS check
beacon->CastCustomSpell(beacon,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura,pVictim->GetGUID());
return true;
}
// Seal of the Martyr do damage trigger
case 53720: