Jump to content

[Patch] AoF spells and LOS


Feanordev

Recommended Posts

So spells with unit-type and destination flag (Blizzard, Rain of Fire etc) should not be los-limited - you can see use of it on arenas for example where you cast it "around" pillars to prevent mana-restoring and such.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index c061019..5241fd6 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -7061,7 +7061,7 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff )
            // Get GO cast coordinates if original caster -> GO
            if (target != m_caster)
                if (WorldObject *caster = GetCastingObject())
-                    if (!target->IsWithinLOSInMap(caster))
+                    if (!target->IsWithinLOSInMap(caster) && m_targets.m_targetMask != 66/*unit + dest*/ && m_spellInfo->EffectImplicitTargetB[eff] != TARGET_ALL_ENEMY_IN_AREA_INSTANT)
                        return false;
            break;
    }

Yes - the != 66 is ugly, should be mask-based (& or |) but I forgot how to use it ^^

Link to comment
Share on other sites

  • 5 weeks later...

I revert commit in [11154].

Maybe for first part check you right if not attribute like way check. But posisble need instead skipp los check replace it for like

spell by outdoor check.

But adding to ignore check all 1200 spells with TARGET_ALL_ENEMY_IN_AREA_INSTANT i think not right.

This need additional research i think before adding to repo. Thread moved to under review section

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use