diff --git a/src/game/Spell.h b/src/game/Spell.h index 6fb22cf11..4f3318159 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -469,7 +469,7 @@ class Spell Unit* GetCaster() const { return m_caster; } // real source of cast affects, explicit caster, or DoT/HoT applier, or GO owner, or wild GO itself. Can be NULL WorldObject* GetAffectiveCasterObject() const; - // limited version returning NULL in cases not Unit* caster object, need for Aura (auras currently not support non-Unit caster) + // limited version returning NULL in cases wild gameobject caster object, need for Aura (auras currently not support non-Unit caster) Unit* GetAffectiveCaster() const { return !m_originalCasterGUID.IsEmpty() ? m_originalCaster : m_caster; } // m_originalCasterGUID can store GO guid, and in this case this is visual caster WorldObject* GetCastingObject() const; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9f1474751..5d2336e55 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4004,7 +4004,10 @@ void Spell::EffectPersistentAA(SpellEffectIndex eff_idx) if (Player* modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius); - Unit* pCaster = GetAffectiveCaster() ? GetAffectiveCaster() : m_caster; + Unit* pCaster = GetAffectiveCaster(); + // FIXME: in case wild GO will used wrong affective caster (target in fact) as dynobject owner + if (!pCaster) + pCaster = m_caster; DynamicObject* dynObj = new DynamicObject; if (!dynObj->Create(pCaster->GetMap()->GenerateLocalLowGuid(HIGHGUID_DYNAMICOBJECT), pCaster, m_spellInfo->Id, eff_idx, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, m_duration, radius)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9d41ef10f..f440ec2b6 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 "11372" + #define REVISION_NR "11373" #endif // __REVISION_NR_H__