Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Принятые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=5)
-   -   [11605][fix] Glyph of Desperation (http://mangos.ytdb.ru/showthread.php?t=4518)

Den 22.05.2011 09:14

[11605][fix] Glyph of Desperation
 
Подправляет сам спел, который и так можно было кастовать в оглушении без символа, и соответственно сам нерабочий символ.

Код:

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9c209ba..ceb65d3 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4542,6 +4542,17 @@ SpellCastResult Spell::CheckCast(bool strict)
                return SPELL_FAILED_MOVING;
        }
 
+        if (((Player*)m_caster)->hasUnitState(UNIT_STAT_STUNNED))
+        {
+            if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellInfo->SpellIconID == 2178)
+            {
+                // Glyph of Desperation
+                if (m_caster->HasAura(63248))
+                    return SPELL_CAST_OK;
+                return SPELL_FAILED_STUNNED;
+            }
+        }
+
        if (!m_IsTriggeredSpell && NeedsComboPoints(m_spellInfo) && !m_caster->IsIgnoreUnitState(m_spellInfo, IGNORE_UNIT_TARGET_STATE) &&
            (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != ((Player*)m_caster)->GetComboTargetGuid()))
            // warrior not have real combo-points at client side but use this way for mark allow Overpower use


Vladimir 05.06.2011 18:42

Spell::CheckCast имеет спец. часть кода отвечающую за иммунности.
Более логично располагать проверку там. Кстати глиф в 3.3.5a называется
Glyph of Pain Suppression.

D переписаном виде в [11605]. Спасибо.


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

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