[11223] Replace direct auras adding from creature*_addon tables by cast spell.

This commit is contained in:
VladimirMangos 2011-03-06 12:48:08 +03:00
parent 51b4556c4b
commit 5aeda4f28b
3 changed files with 2 additions and 25 deletions

View file

@ -1908,7 +1908,6 @@ bool Creature::LoadCreatureAddon(bool reload)
continue;
}
// skip already applied aura
if (HasAura(cAura->spell_id))
{
if(!reload)
@ -1917,23 +1916,7 @@ bool Creature::LoadCreatureAddon(bool reload)
continue;
}
SpellAuraHolder *holder = CreateSpellAuraHolder(AdditionalSpellInfo, this, this);
for(uint32 eff = 0; eff < MAX_EFFECT_INDEX; ++eff)
{
if (IsSpellAppliesAura(AdditionalSpellInfo, 1 << eff))
{
Aura* AdditionalAura = CreateAura(AdditionalSpellInfo, SpellEffectIndex(eff), NULL, holder, this, this);
holder->AddAura(AdditionalAura, SpellEffectIndex(eff));
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Spell: %u - Aura %u added to creature (GUIDLow: %u Entry: %u)", cAura->spell_id, AdditionalSpellInfo->EffectApplyAuraName[eff], GetGUIDLow(), GetEntry());
}
}
if (!holder->IsEmptyHolder())
AddSpellAuraHolder(holder);
else
delete holder;
CastSpell(this, AdditionalSpellInfo, true);
}
}
return true;

View file

@ -798,12 +798,6 @@ void ObjectMgr::ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const*
continue;
}
if (!IsSpellAppliesAura(AdditionalSpellInfo))
{
sLog.outErrorDb("Creature (%s: %u) has spell %u defined in `auras` field in `%s` but spell doesn't apply any auras.", guidEntryStr, addon->guidOrEntry, cAura.spell_id, table);
continue;
}
++i;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11222"
#define REVISION_NR "11223"
#endif // __REVISION_NR_H__