mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10185] fix auras adding to previously added holder
This commit is contained in:
parent
40c7356290
commit
beff2a145c
6 changed files with 12 additions and 3 deletions
|
|
@ -1827,6 +1827,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
|||
|
||||
if (addedToExisting)
|
||||
{
|
||||
AddAuraToModList(AdditionalAura);
|
||||
holder->SetInUse(true);
|
||||
AdditionalAura->ApplyModifier(true,true);
|
||||
holder->SetInUse(false);
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||
|
||||
if (addedToExisting)
|
||||
{
|
||||
target->AddAuraToModList(Aur);
|
||||
holder->SetInUse(true);
|
||||
Aur->ApplyModifier(true,true);
|
||||
holder->SetInUse(false);
|
||||
|
|
|
|||
|
|
@ -783,6 +783,7 @@ void AreaAura::Update(uint32 diff)
|
|||
|
||||
if (addedToExisting)
|
||||
{
|
||||
(*tIter)->AddAuraToModList(aur);
|
||||
holder->SetInUse(true);
|
||||
aur->ApplyModifier(true,true);
|
||||
holder->SetInUse(false);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1504,6 +1504,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
bool CheckAllControlledUnits(Func const& func, bool withTotems, bool withGuardians, bool withCharms) const;
|
||||
|
||||
bool AddSpellAuraHolder(SpellAuraHolder *holder);
|
||||
void AddAuraToModList(Aura *aura);
|
||||
|
||||
// removing specific aura stack
|
||||
void RemoveAura(Aura* aura, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10184"
|
||||
#define REVISION_NR "10185"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue