Skip to content

Commit

Permalink
Fix TARGET_RANDOM_UNIT_CHAIN_IN_AREA
Browse files Browse the repository at this point in the history
Its wrongly named.
This will fix Nightlash
I tested also spell 3439 and its ok.

More infots -> cmangos/mangos-tbc#137
  • Loading branch information
cyberium authored and Fabi committed Jan 15, 2017
1 parent 2feefb6 commit 7290d33
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/game/Spell.cpp
Expand Up @@ -1819,20 +1819,14 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
Cell::VisitAllObjects(m_caster, searcher, max_range);
break;
}
case TARGET_RANDOM_UNIT_CHAIN_IN_AREA: // TODO: Rename TARGET_RANDOM_UNIT_CHAIN_IN_AREA to something better and find real difference with TARGET_RANDOM_FRIEND_CHAIN_IN_AREA.
case TARGET_RANDOM_FRIEND_CHAIN_IN_AREA:
{
MaNGOS::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, max_range);
MaNGOS::UnitListSearcher<MaNGOS::AnyFriendlyUnitInObjectRangeCheck> searcher(tempTargetUnitMap, u_check);
Cell::VisitAllObjects(m_caster, searcher, max_range);
break;
}
case TARGET_RANDOM_UNIT_CHAIN_IN_AREA:
{
MaNGOS::AnyUnitInObjectRangeCheck u_check(m_caster, max_range);
MaNGOS::UnitListSearcher<MaNGOS::AnyUnitInObjectRangeCheck> searcher(tempTargetUnitMap, u_check);
Cell::VisitAllObjects(m_caster, searcher, max_range);
break;
}
}

if (tempTargetUnitMap.empty())
Expand Down

0 comments on commit 7290d33

Please sign in to comment.