Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Патчи на рассмотрении (http://mangos.ytdb.ru/forumdisplay.php?f=49)
-   -   [patch] Priest T9 Healing 4P Bonus (Divine Aegis and Empowered Renew) (http://mangos.ytdb.ru/showthread.php?t=6338)

Den 14.10.2012 18:08

[patch] Priest T9 Healing 4P Bonus (Divine Aegis and Empowered Renew)
 
Код:

diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index 903ec7a..9b2bf72 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -1357,7 +1357,11 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
                // Divine Aegis
                case 2820:
                {
-                    basepoints[0] = damage * triggerAmount / 100;
+                    // Item - Priest T9 Healing 4P Bonus
+                    Aura* tier = GetDummyAura(67202);
+                    int32 tierBonus = triggerAmount * tier->GetModifier()->m_amount / 100;
+
+                    basepoints[0] = tier ? (damage * triggerAmount / 100 + tierBonus) : (damage * triggerAmount / 100);
                    triggered_spell_id = 47753;
                    break;
                }
@@ -1374,7 +1378,11 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
 
                    int32 healingfromticks = healingAura->GetModifier()->m_amount * GetSpellAuraMaxTicks(procSpell);
 
-                    basepoints[0] = healingfromticks * triggerAmount / 100;
+                    // Item - Priest T9 Healing 4P Bonus
+                    Aura* tier = GetDummyAura(67202);
+                    int32 tierBonus = triggerAmount * tier->GetModifier()->m_amount;
+
+                    basepoints[0] = tier ? (healingfromticks * triggerAmount / 100 + tierBonus) : (healingfromticks * triggerAmount / 100);
                    triggered_spell_id = 63544;
                    break;
                }


Amaru 18.10.2012 14:19

в int32 tierBonus тоже надо null проверять


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

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