diff options
author | sarjuuk <none@none> | 2011-01-06 19:57:36 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-01-06 19:57:36 +0100 |
commit | 0cf89f635f54dca344917f8e0c4299bb70d1732f (patch) | |
tree | 9a3e6ba19b2b17cd979e0119ae38c6ca673ac77b /src/server/game/Spells/Spell.cpp | |
parent | 20b49bccb082cbfadbbe3db870dcd9d616f9d983 (diff) |
Core/Spells: Starfall skips targets in stealth, invisibility or not in LoS
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
Also minor codestyle fixes from previous commits
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c3076ae5436..819ec8eb98e 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2714,6 +2714,18 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) maxSize = m_caster->HasAura(62970) ? 6 : 5; // Glyph of Wild Growth power = POWER_HEALTH; } + else if (m_spellInfo->SpellFamilyFlags[2] == 0x0100) // Starfall + { + // Remove targets not in LoS or in stealth + for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();) + { + if ((*itr)->HasStealthAura() || (*itr)->HasInvisibilityAura() || !(*itr)->IsWithinLOSInMap(m_caster)) + itr = unitList.erase(itr); + else + ++itr; + } + break; + } else break; |