[10185] fix auras adding to previously added holder

This commit is contained in:
Laise 2010-07-12 20:28:51 +03:00
parent 40c7356290
commit beff2a145c
6 changed files with 12 additions and 3 deletions

View file

@ -3981,8 +3981,7 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder *holder)
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
if (Aura *aur = holder->GetAuraByEffectIndex(SpellEffectIndex(i)))
if (aur->GetModifier()->m_auraname < TOTAL_AURAS)
m_modAuras[aur->GetModifier()->m_auraname].push_back(aur);
AddAuraToModList(aur);
holder->ApplyAuraModifiers(true, true);
DEBUG_LOG("Holder of spell %u now is in use", holder->GetId());
@ -3997,6 +3996,12 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder *holder)
return true;
}
void Unit::AddAuraToModList(Aura *aura)
{
if (aura->GetModifier()->m_auraname < TOTAL_AURAS)
m_modAuras[aura->GetModifier()->m_auraname].push_back(aura);
}
void Unit::RemoveRankAurasDueToSpell(uint32 spellId)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);