Jump to content

[patch] Target 104


Auntie Mangos
 Share

Recommended Posts

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

As we know blizz was replaced TARGET_IN_FRONT_OF_CASTER to target 104 for some spells. I make the same. It fixes "cone zone" for spells 120,31661,46968,47897,61391 and ranks

For which repository revision was the patch created?

8765+

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/viewtopic.php?id=10718

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

Me

DOWNLOAD

Link to comment
Share on other sites

  • 39 years later...
  • 2 months later...

like this ?

diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index db31834..013f1ef 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -1098,7 +1098,7 @@ enum Targets
    TARGET_SELF2                       = 87,
    TARGET_DIRECTLY_FORWARD            = 89,
    TARGET_NONCOMBAT_PET               = 90,
-    TARGET_IN_FRONT_OF_CASTER_30       = 104,
+    TARGET_IN_FRONT_OF_CASTER_90       = 104,
};

enum SpellMissInfo
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 6d19612..680f34a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1855,14 +1855,12 @@ void Spell::SetTargetMap(uint32 effIndex, uint32 targetMode, UnitList& targetUni
            break;
        }
        case TARGET_LARGE_FRONTAL_CONE:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE);
            break;
        case TARGET_NARROW_FRONTAL_CONE:
            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE);
            break;
-        case TARGET_IN_FRONT_OF_CASTER_30:
-            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
-            break;
        case TARGET_DUELVSPLAYER:
        {
            Unit *target = m_targets.getUnitTarget();
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 54652d4..74df2a1 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -415,7 +415,7 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB)
        case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
        case TARGET_CURRENT_ENEMY_COORDINATES:
        case TARGET_SINGLE_ENEMY:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return false;
        case TARGET_CASTER_COORDINATES:
            return (targetB == TARGET_ALL_PARTY || targetB == TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER);
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 741b363..9de3323 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -249,7 +249,7 @@ inline bool IsCasterSourceTarget(uint32 target)
        case TARGET_SELF2:
        case TARGET_DIRECTLY_FORWARD:
        case TARGET_NONCOMBAT_PET:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return true;
        default:
            break;
@@ -320,7 +320,7 @@ inline bool IsAreaEffectTarget( Targets target )
        case TARGET_AREAEFFECT_CUSTOM_2:
        case TARGET_ALL_RAID_AROUND_CASTER:
        case TARGET_AREAEFFECT_PARTY_AND_CLASS:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return true;
        default:
            break;

Link to comment
Share on other sites

Target 104 was originally used for some Ulduar boss/trash spells, which are all confirmed to have 30 degrees cone size. And this spells haven't changed in any of the patches. However in 3.2 blizzard decided to assign target 104 to some player spells too, but without reducing their cone of effect. So, on official, we have now player spells with 90 degrees cone and boss spells with only 30 degrees, while both have the same target 104. That's why we need that "if" check within one case...

Link to comment
Share on other sites

but why in original patch angle version is replaced by PUSH_IN_FRONT instead of

        case TARGET_IN_FRONT_OF_CASTER_2:
           if (m_spellInfo->SpellFamilyName == SPELLFAMILY_GENERIC)
               FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
           else
               FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE);
           break;

?

Link to comment
Share on other sites

like this ?

diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index db31834..013f1ef 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -1098,7 +1098,7 @@ enum Targets
    TARGET_SELF2                       = 87,
    TARGET_DIRECTLY_FORWARD            = 89,
    TARGET_NONCOMBAT_PET               = 90,
-    TARGET_IN_FRONT_OF_CASTER_30       = 104,
+    TARGET_IN_FRONT_OF_CASTER_90       = 104,
};

enum SpellMissInfo
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 6d19612..680f34a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1855,14 +1855,12 @@ void Spell::SetTargetMap(uint32 effIndex, uint32 targetMode, UnitList& targetUni
            break;
        }
        case TARGET_LARGE_FRONTAL_CONE:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE);
            break;
        case TARGET_NARROW_FRONTAL_CONE:
            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE);
            break;
-        case TARGET_IN_FRONT_OF_CASTER_30:
-            FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
-            break;
        case TARGET_DUELVSPLAYER:
        {
            Unit *target = m_targets.getUnitTarget();
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 54652d4..74df2a1 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -415,7 +415,7 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB)
        case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
        case TARGET_CURRENT_ENEMY_COORDINATES:
        case TARGET_SINGLE_ENEMY:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return false;
        case TARGET_CASTER_COORDINATES:
            return (targetB == TARGET_ALL_PARTY || targetB == TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER);
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 741b363..9de3323 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -249,7 +249,7 @@ inline bool IsCasterSourceTarget(uint32 target)
        case TARGET_SELF2:
        case TARGET_DIRECTLY_FORWARD:
        case TARGET_NONCOMBAT_PET:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return true;
        default:
            break;
@@ -320,7 +320,7 @@ inline bool IsAreaEffectTarget( Targets target )
        case TARGET_AREAEFFECT_CUSTOM_2:
        case TARGET_ALL_RAID_AROUND_CASTER:
        case TARGET_AREAEFFECT_PARTY_AND_CLASS:
-        case TARGET_IN_FRONT_OF_CASTER_30:
+        case TARGET_IN_FRONT_OF_CASTER_90:
            return true;
        default:
            break;

is this tested?

Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • 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