mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 19:37:04 +00:00
[11373] Clarify Spell::GetAffectiveCaster result and add comment for recent added call case.
This commit is contained in:
parent
7b2308e483
commit
5fae870a1d
3 changed files with 6 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue