mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[11366] Fix wrong faction-based targeting of DynamicObject's auras
This commit is contained in:
parent
070af93262
commit
dbcca634e8
2 changed files with 6 additions and 4 deletions
|
|
@ -4004,15 +4004,17 @@ 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;
|
||||
|
||||
DynamicObject* dynObj = new DynamicObject;
|
||||
if (!dynObj->Create(m_caster->GetMap()->GenerateLocalLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, eff_idx, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, m_duration, radius))
|
||||
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))
|
||||
{
|
||||
delete dynObj;
|
||||
return;
|
||||
}
|
||||
|
||||
m_caster->AddDynObject(dynObj);
|
||||
m_caster->GetMap()->Add(dynObj);
|
||||
pCaster->AddDynObject(dynObj);
|
||||
pCaster->GetMap()->Add(dynObj);
|
||||
}
|
||||
|
||||
void Spell::EffectEnergize(SpellEffectIndex eff_idx)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11365"
|
||||
#define REVISION_NR "11366"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue