Jump to content

[Fix] TARGET_RANDOM_NEARBY_DEST restored work


Guest Grandres

Recommended Posts

MaNGOS rev. 11258

TARGET_RANDOM_NEARBY_DEST had stopped working since this commit https://github.com/mangos/mangos/commit/3008d0f92906aae05482041711f71f0592ca886c

For example function GetClosestCreatureWithEntry and spells like:

http://wowhead.com/spell=51441

http://wowhead.com/spell=51397l

http://wowhead.com/spell=51398

http://wowhead.com/spell=51400

http://wowhead.com/spell=51401

http://wowhead.com/spell=51402

http://wowhead.com/spell=51443

Dunno, that it is proper way.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index c3f9389..bfb9de1 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -518,7 +518,6 @@ void Spell::FillTargetMap()
                    case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
                    case TARGET_ALL_FRIENDLY_UNITS_IN_AREA:
                    case TARGET_AREAEFFECT_GO_AROUND_DEST:
-                    case TARGET_RANDOM_NEARBY_DEST:
                        // triggered spells get dest point from default target set, ignore it
                        if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) || m_IsTriggeredSpell)
                            if (WorldObject* castObject = GetAffectiveCasterObject())
@@ -541,6 +540,7 @@ void Spell::FillTargetMap()
                    case TARGET_POINT_AT_NW:
                    case TARGET_POINT_AT_SE:
                    case TARGET_POINT_AT_SW:
+                    case TARGET_RANDOM_NEARBY_DEST:
                        // need some target for processing
                        SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitMap);
                        SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitMap);

Link to comment
Share on other sites

hmm, I know vladimir added this commit especially to also provide correct support for GO-traps with AoE spell (around GO)

about your spells: your spells aren't casted with originalCaster, so maybe the problem lies there, too.

I am currently wondering about this spell:

40980 and its triggered spells; I want to cast this with original caster, and it seems that the Area-Aura is applied always at the position of the original-caster and not the normal caster.

Must be fixed in [11276], thanks to vladimir

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