Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Принятые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=5)
-   -   [11671][fix] Druid t8 Restoration 4p bonus (http://mangos.ytdb.ru/showthread.php?t=4570)

Den 28.05.2011 15:21

[11671][fix] Druid t8 Restoration 4p bonus
 
Код:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index a08c2e8..df04128 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -9123,8 +9123,22 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
        }
        case SPELLFAMILY_DRUID:
        {
+            // Rejuvenation
+            if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000010))
+            {
+                Unit* caster = GetCaster();
+                if (caster->HasAura(64760))                // Item - Druid T8 Restoration 4P Bonus
+                {
+                    Aura* aura = GetAuraByEffectIndex(EFFECT_INDEX_0);
+                    if (!aura)
+                        return;
+
+                    int32 heal = aura->GetModifier()->m_amount;
+                    caster->CastCustomSpell(m_target, 64801, &heal, NULL, NULL, true, NULL);
+                }
+            }
            // Barkskin
-            if (GetId()==22812 && m_target->HasAura(63057)) // Glyph of Barkskin
+            else if (GetId()==22812 && m_target->HasAura(63057)) // Glyph of Barkskin
                spellId1 = 63058;                          // Glyph - Barkskin 01
            else if (!apply && GetId() == 5229)            // Enrage (Druid Bear)
                spellId1 = 51185;                          // King of the Jungle (Enrage damage aura)


Vladimir 25.06.2011 04:36

В Aura::HandlePeriodicHeal уже есть всякие перерасчеты и т.д.
Там горазда проще кастовать instant heal чем из boosts

В [11671] c этим переносом. Спасибо :)


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

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