mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11374] Another fix for Spell::EffectPersistentAA
If we use affected caster for dynamic object then we must use it for spellmods apply also.
This commit is contained in:
parent
32c42298a0
commit
79cd96af8a
2 changed files with 6 additions and 6 deletions
|
|
@ -3999,16 +3999,16 @@ void Spell::EffectCreateRandomItem(SpellEffectIndex /*eff_idx*/)
|
|||
|
||||
void Spell::EffectPersistentAA(SpellEffectIndex eff_idx)
|
||||
{
|
||||
float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[eff_idx]));
|
||||
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius);
|
||||
|
||||
Unit* pCaster = GetAffectiveCaster();
|
||||
// FIXME: in case wild GO will used wrong affective caster (target in fact) as dynobject owner
|
||||
if (!pCaster)
|
||||
pCaster = m_caster;
|
||||
|
||||
float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[eff_idx]));
|
||||
|
||||
if (Player* modOwner = pCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius);
|
||||
|
||||
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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11373"
|
||||
#define REVISION_NR "11374"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue