mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Merge branch 'master' into 310
This commit is contained in:
commit
4236f7c75c
21 changed files with 173 additions and 98 deletions
|
|
@ -1584,7 +1584,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
|
|||
std::list<Unit *> tempUnitMap;
|
||||
|
||||
{
|
||||
MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range);
|
||||
MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range, false);
|
||||
MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck> searcher(m_caster, tempUnitMap, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher);
|
||||
|
|
@ -4739,14 +4739,14 @@ SpellCastResult Spell::CheckRange(bool strict)
|
|||
range_mod = 6.25;
|
||||
|
||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
||||
float max_range = GetSpellMaxRange(srange) + range_mod;
|
||||
float min_range = GetSpellMinRange(srange);
|
||||
Unit *target = m_targets.getUnitTarget();
|
||||
bool friendly = target ? target->IsFriendlyTo(m_caster) : false;
|
||||
float max_range = GetSpellMaxRange(srange, friendly) + range_mod;
|
||||
float min_range = GetSpellMinRange(srange, friendly);
|
||||
|
||||
if(Player* modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, max_range, this);
|
||||
|
||||
Unit *target = m_targets.getUnitTarget();
|
||||
|
||||
if(target && target != m_caster)
|
||||
{
|
||||
// distance from target in checks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue