mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8984] Fixed max channaled spell distance check at aura update.
Radius for target applied chanmaled auras around affect, not for caster diatance check. So use spell range and _only_ for explicit pointed channled target for spell.
This commit is contained in:
parent
fc3a721848
commit
a27ca31ce0
2 changed files with 12 additions and 19 deletions
|
|
@ -628,29 +628,22 @@ void Aura::Update(uint32 diff)
|
|||
return;
|
||||
}
|
||||
|
||||
// need check distance for channeled target only
|
||||
if (caster->GetChannelObjectGUID() == m_target->GetGUID())
|
||||
{
|
||||
// Get spell range
|
||||
float radius;
|
||||
SpellModOp mod;
|
||||
if (m_spellProto->EffectRadiusIndex[GetEffIndex()])
|
||||
{
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellProto->EffectRadiusIndex[GetEffIndex()]));
|
||||
mod = SPELLMOD_RADIUS;
|
||||
}
|
||||
else
|
||||
{
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex));
|
||||
mod = SPELLMOD_RANGE;
|
||||
}
|
||||
float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex));
|
||||
|
||||
if(Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(GetId(), mod, radius, NULL);
|
||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_RANGE, max_range, NULL);
|
||||
|
||||
if(!caster->IsWithinDistInMap(m_target, radius))
|
||||
if(!caster->IsWithinDistInMap(m_target, max_range))
|
||||
{
|
||||
m_target->RemoveAura(GetId(), GetEffIndex());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(m_isPeriodic && (m_duration >= 0 || m_isPassive || m_permanent))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8983"
|
||||
#define REVISION_NR "8984"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue