From 77148f0e604ade594acc110b533c5013755d02ef Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 9 Sep 2010 13:29:09 +0400 Subject: [PATCH] [10459] Restore update area aura values at caster/around targets. For example, at related improvement talent learn by caster. It has been disabled in aura holder code changes. --- src/game/SpellAuras.cpp | 11 ++++++++++- src/game/SpellAuras.h | 1 + src/shared/revision_nr.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 6b59704a0..92ea8a4dc 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -961,7 +961,7 @@ void Aura::ReapplyAffectedPassiveAuras( Unit* target, bool owner_mode ) { // permanent passive or permanent area aura // passive spells can be affected only by own or owner spell mods) - if (itr->second->IsPermanent() && (owner_mode && itr->second->IsPassive() /*|| itr->second->IsAreaAura()*/) && + if (itr->second->IsPermanent() && (owner_mode && itr->second->IsPassive() || itr->second->IsAreaAura()) && // non deleted and not same aura (any with same spell id) !itr->second->IsDeleted() && itr->second->GetId() != GetId() && // and affected by aura @@ -8864,6 +8864,15 @@ bool SpellAuraHolder::IsPersistent() const return false; } +bool SpellAuraHolder::IsAreaAura() const +{ + for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) + if (Aura *aur = m_auras[i]) + if (aur->IsAreaAura()) + return true; + return false; +} + bool SpellAuraHolder::IsPositive() const { for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 4288a3447..bceed5a67 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -80,6 +80,7 @@ class MANGOS_DLL_SPEC SpellAuraHolder bool IsDeathPersistent() const { return m_isDeathPersist; } bool IsPersistent() const; bool IsPositive() const; + bool IsAreaAura() const; // if one from auras of holder applied as area aura bool IsWeaponBuffCoexistableWith(SpellAuraHolder* ref); bool IsNeedVisibleSlot(Unit const* caster) const; bool IsRemovedOnShapeLost() const { return m_isRemovedOnShapeLost; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d2b3437d7..09d2ad145 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10458" + #define REVISION_NR "10459" #endif // __REVISION_NR_H__