mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11223] Replace direct auras adding from creature*_addon tables by cast spell.
This commit is contained in:
parent
51b4556c4b
commit
5aeda4f28b
3 changed files with 2 additions and 25 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11222"
|
||||
#define REVISION_NR "11223"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue