Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Принятые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=5)
-   -   [patch] Check cast Distract (http://mangos.ytdb.ru/showthread.php?t=6324)

Den 11.10.2012 11:12

[patch] Check cast Distract
 
Код:

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 913f942..554cd7b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5463,6 +5463,28 @@ SpellCastResult Spell::CheckCast(bool strict)
                }
                break;
            }
+            case SPELL_EFFECT_DISTRACT:
+            {
+                // Distract
+                if (m_spellInfo->Id == 1725)
+                {
+                    UnitList targetsCombat;
+
+                    float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
+
+                    FillAreaTargets(targetsCombat, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
+
+                    if (targetsCombat.empty())
+                        break;
+
+                    for (UnitList::iterator itr = targetsCombat.begin(); itr != targetsCombat.end(); ++itr)
+                    {
+                        if ((*itr)->isInCombat())
+                            return SPELL_FAILED_TARGET_IN_COMBAT;
+                    }
+                }
+                break;
+                        }
            case SPELL_EFFECT_SCHOOL_DAMAGE:
            {
                // Hammer of Wrath


schmoozerd 16.10.2012 22:45

are you really sure it should have a fail-cast in case one (of many) targets is in combat?

Den 17.10.2012 12:04

Yes here it is written http://www.wowhead.com/spell=1725#comments

And i checked in wotlk, cataclysm.

schmoozerd 17.10.2012 23:22

In [12216] Thank you :)


Текущее время: 15:14. Часовой пояс GMT +3.

ru-mangos.ru - Русское сообщество MaNGOS