diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 12 | ||||
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 4 |
2 files changed, 14 insertions, 2 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; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 6f88cde8e02..1a6e1c7934c 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1213,11 +1213,11 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } case 54577: // U.D.E.D. { - if (!(unitTarget->GetEntry() == 29402)) + if (unitTarget->GetEntry() != 29402) return; m_caster->SummonGameObject(192693, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), unitTarget->GetOrientation(), 0, 0, 0, 0, 100); - for (int i = 1; i <= 4; i++) + for (uint8 i = 0; i < 4; ++i) m_caster->SummonGameObject(191567, float(unitTarget->GetPositionX() + irand(-7, 7)), float(unitTarget->GetPositionY() + irand(-7, 7)), unitTarget->GetPositionZ(), unitTarget->GetOrientation(), 0, 0, 0, 0, 100); unitTarget->Kill(unitTarget); |