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,27 +628,20 @@ void Aura::Update(uint32 diff)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get spell range
|
// need check distance for channeled target only
|
||||||
float radius;
|
if (caster->GetChannelObjectGUID() == m_target->GetGUID())
|
||||||
SpellModOp mod;
|
|
||||||
if (m_spellProto->EffectRadiusIndex[GetEffIndex()])
|
|
||||||
{
|
{
|
||||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellProto->EffectRadiusIndex[GetEffIndex()]));
|
// Get spell range
|
||||||
mod = SPELLMOD_RADIUS;
|
float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex));
|
|
||||||
mod = SPELLMOD_RANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Player* modOwner = caster->GetSpellModOwner())
|
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());
|
m_target->RemoveAura(GetId(), GetEffIndex());
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8983"
|
#define REVISION_NR "8984"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue