Jump to content

[patch][8556] Implementing implicit target 36


Guest qsa

Recommended Posts

What bug does the patch fix? What features does the patch add?

Implementing implicit target 36

TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER(36) - 5 spells - "all enemies within .."

id    spellname_0
7969    Summon Nightmare Ectoplasm
10132    Sand Storms
10251    Biletoad Infection
11504    Walking Bomb Effect
16141    Exploding Cadaver

For which repository revision was the patch created?

8542

Who has been writing this patch? Please include either forum user names or email addresses.

Me

diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index d8ac7fb..43d296d 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -1032,6 +1032,7 @@ enum Targets
    TARGET_ALL_PARTY                   = 33,
    TARGET_ALL_PARTY_AROUND_CASTER_2   = 34,                // used in Tranquility
    TARGET_SINGLE_PARTY                = 35,
+    TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER = 36,
    TARGET_AREAEFFECT_PARTY            = 37,
    TARGET_SCRIPT                      = 38,
    TARGET_SELF_FISHING                = 39,
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 3137f39..33cf379 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1661,6 +1661,9 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
            m_targets.setDestination(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ());
            break;
        }
+        case TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER:
+            FillAreaTargets(TagUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_SELF_CENTER, SPELL_TARGETS_HOSTILE);
+            break;
        case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER:
            // special target order
            if (m_spellInfo->Id==64904)                     // Hymn of Hope

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